These are chat archives for FreeCodeCamp/Help

8th
Jun 2018
Santibucho
@Santibucho
Jun 08 2018 00:34
Hi guys, im taking the free code camp course.. currently on how to use an id attribute to style an element
im a bit stucked here:: 'Try giving your form, which now has the id attribute of cat-photo-form, a green background.'
And the example is this; #cat-photo-element {
background-color: green;
}
I'd love some help as for as much logic that I put into it, I havent been able to work it out
Kyle Holm
@thekholm80
Jun 08 2018 00:36
what does your code look like?
easier to help if we know what you've tried
Santibucho
@Santibucho
Jun 08 2018 00:37
on the style part looks like this:

cat-photo-element {

background-color: green;
}
</style>
Kyle Holm
@thekholm80
Jun 08 2018 00:37
what is the id attribute supposed to be?
Santibucho
@Santibucho
Jun 08 2018 00:37
with the # to start with
Kyle Holm
@thekholm80
Jun 08 2018 00:37
'Try giving your form, which now has the id attribute of cat-photo-form, a green background.'
#cat-photo-element is not the same as #cat-photo-form
Santibucho
@Santibucho
Jun 08 2018 00:38
my form so far is: <form action="/submit-cat-photo" id="cat-photo-form">
Moisés Man
@moigithub
Jun 08 2018 00:38
u need to use the correct id
Santibucho
@Santibucho
Jun 08 2018 00:39
oh my god... it worked!!
of course... this was my error
Kyle Holm
@thekholm80
Jun 08 2018 00:39
:+1:
Santibucho
@Santibucho
Jun 08 2018 00:40
thanks guys, every task is a bit about perception... how you understand it
and im traying my brain to think like a coder, if i can say that
not easy....
Kyle Holm
@thekholm80
Jun 08 2018 00:40
it just takes practice
Santibucho
@Santibucho
Jun 08 2018 00:40
*training
Kyle Holm
@thekholm80
Jun 08 2018 00:40
the more you do it, the easier it gets
Santibucho
@Santibucho
Jun 08 2018 00:41
Cheer Kyle, Im gonna keep up! (although a lot of times gives me lots of frustration
thanks again mate
Kyle Holm
@thekholm80
Jun 08 2018 00:41
you bet
Moisés Man
@moigithub
Jun 08 2018 00:50
frustration... procrastination.. impostor syndrome.. pretty common :)
Andy
@luandy64
Jun 08 2018 02:37
I've completed the 5 JavaScript Algorithms and Data Structures Projects, how do I see my certificate?
Kyle Holm
@thekholm80
Jun 08 2018 02:38
go to Settings, scroll down and click "Claim my certificate"
or whatever the button says
Andy
@luandy64
Jun 08 2018 02:39
The academic honesty box is stuck...
Xavier
@nothinbutcode
Jun 08 2018 02:41
does anyone here or has or is working as a web dev.
i ask cause id like help with "cover letter"
or at least your thoughts
Claudio Restifo
@Marmiz
Jun 08 2018 03:08

There are two major school of thought about cover letters:

-the one that tells you to craft one specifically for each job

-the one that tell you to use the same and spam every job available with it

I'm for the first. I have used the latter only if I applied to the job just in case, but was never interested in it

Darren
@DarrenfJ
Jun 08 2018 03:14
evening fCC
Claudio Restifo
@Marmiz
Jun 08 2018 03:14
@DarrenfJ !! Long time no see :wave:
Kyle Holm
@thekholm80
Jun 08 2018 03:15
@DarrenfJ :wave:
Darren
@DarrenfJ
Jun 08 2018 03:15
hey brutha.. yah i went to Sri Lanka to train our new QA office and then follow up has kept me busy and jet-lag sleepy... the usual 3 am fCC visits became hard to do..
brutha! @thekholm80
Xavier
@nothinbutcode
Jun 08 2018 03:16

what you think about this:Determined Front End Developer with proficient skills in JavaScript, jQuery,JSON ,Ajax, HTML, and CSS. With these skills I specialize in the following:

 - Developing mobile first responsive webpages in Bootstrap, Flex Box, and CSS Grid 
 - Cross Browser Compatibility
 - Good understanding of how to incorporate Api's using JSON and AJAX
 - Use JavaScript and jQuery to add user interface and execute task
 - Use icons (font-awesome etc.) 
 - Experience writing blog content

Besides my skills I am easy to get along with,love talking to people, transparent, I don't waste time, I treat your website like its my own.

Claudio Restifo
@Marmiz
Jun 08 2018 03:19
@DarrenfJ you were a couple of timezones from where I'm at :smile:
@nothinbutcode very generic
not wrong. but generic
(in my opinion of course)
Xavier
@nothinbutcode
Jun 08 2018 03:21
ok what u see to make it ungeneric
Kyle Holm
@thekholm80
Jun 08 2018 03:21
i'm not a big fan of seeing "etc" in any sills list
Xavier
@nothinbutcode
Jun 08 2018 03:22
true !ok noted thumbs up
Kyle Holm
@thekholm80
Jun 08 2018 03:22
also, if you list anything as a skill make sure you know it. inside and out. it's better to have one awesome skill listed than 100 things you only kind of know
Claudio Restifo
@Marmiz
Jun 08 2018 03:23

@nothinbutcode I for example talk more about myself and not my skills.
Just who I am as a person and what interest me (tailored to the company)

Then I usually say something : "since I like [this] I've built [that] with [x] in mind. You can see more on my [github profile - resumee - whatever]"

@nothinbutcode also as @thekholm80 said. If I see "proficient" I immediately start being sort of skeptical.
every great developer I know says they know nothing about coding :smile:
Kyle Holm
@thekholm80
Jun 08 2018 03:24
exactly! I know just enough to realize how little I know
Claudio Restifo
@Marmiz
Jun 08 2018 03:25
^ Socrates for the win
or was Aristoteles?
Kyle Holm
@thekholm80
Jun 08 2018 03:26
plato said i know only that i know nothing
or something like that
Claudio Restifo
@Marmiz
Jun 08 2018 03:26
Google confirmed Socrates
Xavier
@nothinbutcode
Jun 08 2018 03:26
lol i dont want to seem dumb either cause i dont know everything but at sametime not stupid of and this is for that upwork freelance thing so i dont know the company
Kyle Holm
@thekholm80
Jun 08 2018 03:26
oh upwork
so this is more for your profile, not a cover letter for a traditional job?
Claudio Restifo
@Marmiz
Jun 08 2018 03:27
@nothinbutcode you have to seems confident and skilled. That is different than "showing off"
Xavier
@nothinbutcode
Jun 08 2018 03:27
yes theres this field have to fill out
Claudio Restifo
@Marmiz
Jun 08 2018 03:27
but that's just my approach. I may be wrong

The same can be achieved with a:
" I've gained [ experience - confidence - skill ] in [insert technology here] while building [this - that and the other]."

that "I am proficient at"


again personal opinion. I'm sure someone else will tell you differently.
follow your heart. There's no right or wrong in this :smile:

Xavier
@nothinbutcode
Jun 08 2018 03:30
i understand ...i was watching youtube on people in there first dev job and talking about the imposter syndrome ..so i only put what im comfortable with but at the same time i am a dev and researching what dont no is part of the job and im like soooooo confusing i wrote like 50 cverlettrers lol
i appriciate the input !! Alot people to bouce ideas off
psyperl
@psyperl
Jun 08 2018 03:32

@nothinbutcode
on June 8, 2018 10:16 AM

I treat your website like its my own.

I wonder if that sounds like hijacking ownership ? :trollface:

Kyle Holm
@thekholm80
Jun 08 2018 03:33
lol
Xavier
@nothinbutcode
Jun 08 2018 03:33
lol!!!!
royalties and all lol
psyperl
@psyperl
Jun 08 2018 03:34
:D
Xavier
@nothinbutcode
Jun 08 2018 03:41
anyone know any good place to get cheaper laptopsor something im on a vista lol FCC no longer supports since the update lol lol:D
Kyle Holm
@thekholm80
Jun 08 2018 03:42
ebay?
Chase Sawyer
@shadowimmage
Jun 08 2018 03:43
How cheap are you looking for?
Xavier
@nothinbutcode
Jun 08 2018 03:44
like $3 lol jkjk ummmm 200
Andy
@luandy64
Jun 08 2018 03:44
would a chromebook work for you?
Xavier
@nothinbutcode
Jun 08 2018 03:46
depends....what the diff. between reg. laptop
Chase Sawyer
@shadowimmage
Jun 08 2018 03:47
A chromebook might be a good option, depending on needs - here's an article I found that seems to lay out the benefits and limitations pretty well https://headmelted.com/coding-on-a-chromebook-84335cce96c8
Kyle Holm
@thekholm80
Jun 08 2018 03:48
oh dang, you can install node on chromebook
k_zone
@kzone0520
Jun 08 2018 03:48
@thekholm80 taobao
Xavier
@nothinbutcode
Jun 08 2018 03:48
ok thanks! .....looking now
Chase Sawyer
@shadowimmage
Jun 08 2018 03:49
Something that really has changed lately is the ablility to code on things like codepen [insert name of other thing a lot of FCC demos are on] and Cloud9 / Google VM coding environments - you might be able to get away without anything other than a browser - which a Chromebook is great at.
Claudio Restifo
@Marmiz
Jun 08 2018 03:50

you can install node on chromebook

pretty sure I can install node on my coffe machine @ work.
JS all the things! :sparkles:

Kyle Holm
@thekholm80
Jun 08 2018 03:51
node run coffee
Claudio Restifo
@Marmiz
Jun 08 2018 04:01

I've just finished writing a CLI internal for the office to send messages to everyone about who wants coffe / who start the machine.

now I really need node on the machine to make it start remotely so I don't have to stand up

Xavier
@nothinbutcode
Jun 08 2018 04:02
nah wouldnt work
thankstho!
php? or python print()
Xavier
@nothinbutcode
Jun 08 2018 04:08
gnight guys hope have a swell day lol and thanks for the help
May Kittens Devour Your Soul
@diomed
Jun 08 2018 06:38
node run my-errands
LiuBo
@liuboaibc
Jun 08 2018 07:42
https://codepen.io/liuboaibc/pen/xzErmJ As I drag the mouse, why does the content in the <div class= "row" > appear at the top.
Tarun Garhwal
@eoo
Jun 08 2018 07:57
im setting up mongoDB for the first time, what is the size of preallocated files by default? im askking because i have small storage space on my laptop
@liuboaibc idk but that looks ugly af
LiuBo
@liuboaibc
Jun 08 2018 08:03
@eoo thankyou. I've solved this problem.
aenkirch
@aenkirch
Jun 08 2018 08:04
@GitHub-Henry So how I can do if I just want my amount of h to be included between 3 and 6 and return false when in this limit ,
*?
aenkirch
@aenkirch
Jun 08 2018 08:16
@GitHub-Henry I figured out what was the solution, thanks m8 ;)
Henry
@GitHub-Henry
Jun 08 2018 08:52
@aenkirch good job, what was your solution?
aenkirch
@aenkirch
Jun 08 2018 10:44
@GitHub-Henry Here it is : let ohStr = "Ohhh no";
let ohRegex = /Oh{3,6} no/; // Change this line
let result = ohRegex.test(ohStr);
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 11:46
Guys in Javascript when you use a method such as splice() it's just done like array.splice(" ");. However, I'm trying to make a function where the parameter takes an argument of the type of method or a property of an object so say: function doStuff(target, method) {} where the parameter method will be a string which is a method such as splice or a property such as name, and the target is the thing you want to use the property or method to access. So if I wanted to use split() method I store "split()" in a variable, enter it as the second argument of the function doStuff, with the first argument being the target such as a string I want to split.
The problem is I don't know how to apply methods and properties this way, where they are stored in a variable first. E.g. an object which has property name if I do Object.name I can get the name, but if i store let n = "name" and then do Object.n or even replace the quotation marks with replace() from n then do Object.n it still doesn't work. if I console.log(n) it is the same as "name" so why won't it work if I do it directly like Object.n?
ehutchllew
@ehutchllew
Jun 08 2018 11:51
@darkphotonKN If you want to access or create an object's propeties dynmically use bracket notation: Object[name]
As far as passing in methods, it's a really weird way to do it, but I'm pretty sure you'd have to send in the Array's method's prototype reference to get that to work, which doesn't sound ideal.
for instance: const method = Array.prototype.slice and then call it with method(), but again this isn't a great solution.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 11:56
@ehutchllew thanks that really helped, with methods tho is it true there arent any people wanting to make a function where you can specify in the parameter which method to use?
ehutchllew
@ehutchllew
Jun 08 2018 11:57
Well it's just there really seems no point to such a function, why not just use the method directly? It's great to abstract code and make it modular, but there comes a point where it's too abstracted.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 11:59
@ehutchllew well say depending on the method / function mentioned in the parameter, it applies that to another parameter mentioned and does some algorithm. Without the function wouldn't you need to repeatedly do this algorithm many times instead of just calling this function?
ehutchllew
@ehutchllew
Jun 08 2018 11:59
But furthermore, you can't just pass in a method as a string name, then parse it and have it work. You need to pass in a reference, and using the prototype is the only wayt o do that.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 11:59
@ehutchllew ah i see that's why it won't work. Much appreciated for that explanation
@ehutchllew i don't know why this isn't considered useful, your argument can be made for anything right, if you can just directly do a sum or algorithm on a variable, why store it in a function? If it's useful to put variables, arrays, etc into functions as parameters to do some work to save time why won't it save time to put functions or methods into the params especially when inside the function it does something but doesnt always do the same thing. You could do a switch for it, say second param = 1 you do a split(), =2 you do a append(), =3 you do something else but then that's not dynamic enough. Maybe I'm missing something thinking its useful lol sorry xD
ehutchllew
@ehutchllew
Jun 08 2018 12:27
@darkphotonKN It's just not that useful, you already have a method, which is a function, that executes the code you need.
can yout hink of a situation where your function would be better than just calling the method?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 12:50
@ehutchllew I mentioned that in what I wrote, for example an algorithm that uses a method many times, and there is more than one method you can use, if you supply a different one to the parameter of the function it works with the algorithm inside that function.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 12:59
@ehutchllew my example is imagine a function where it takes two parameters, the first: a string, second: a number. Depending on the number, with a switch statement (or even just if-statements) you can have different things happen to that string, say maybe for a game that whenever a player enters a word depending on the state you apply a different method to it. So if you needed to do a specific split of the string for the output, you saved that split algorithm to the "3rd" case and so your params are: thatFunction(string, 3) and that access the 3rd method type. If you can directly supply the type of method to use though you can save some time as everywhere inside the code of that function you put a reference to that param so that method is called at those points. If you can't do it this way, then you need to call that method multiple times outside the function ever y single time you do this algorithm instead of just calling the function and supplying it as a param. I mean i'm confused why it saves time to put numbers into the params to a do an equation that a function may calculate but why does the same logic not work for methods. If you can just apply a method directly every time you use it and that's completely efficient, why not just do an equation everytime it's needed instead of saving it as a function and accept params to calculate the equation when its needed.
Charlie Waite
@charliearlie
Jun 08 2018 13:04
@darkphotonKN why can't you pass the function itself as the second parameter, not a number signalling what function to call?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:05
@charliearlie thats what im asking
psyperl
@psyperl
Jun 08 2018 13:05
or just call the function directly since you already know the number before calling that function
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:06
im talking about if say there are parts of the code inside that function such as "variable.param", so that method / function can be used on that variable or whatever it is object or something. Then you can dynamically have a different method or function supplied as a param into that function every time
you call it
but the way you can do that is not intuitive as I was told by echutchllew
i was wondering why
like you can't do "function(string, doSomething)" and have the doSomething be a "split()" or "splice()" or whatever depending on what you supply it, and inside the code there's string.doSomething
psyperl
@psyperl
Jun 08 2018 13:15
not sure if this is what you want to do .. but i don't think it's practical
const firstFunc = str => str + str
const secFunc = str => str + "blah"
const tooComplicate = (str, f) => f(str)

// too complicated
const a = tooComplicate("waa", firstFunc)
const b = tooComplicate("waa", secFunc)

// might as well
firstFunc("waa")
// or
secFunc("waa")
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:17
@psyperl so my question is, isn't it more efficien if inside that tooComplicate function is an algorithm which uses the function many times. And so you are saving time b doing firstFunct("waa") many times
psyperl
@psyperl
Jun 08 2018 13:21
I don't think it affects efficiency.. the program flow will just flow in whichever condition set during run time.. the different is that you wether you are calling another wrapping function ( in this case is 'tooComplicate') or not.
but i do have a sense that i don't understand what you are trying to point out though
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:24
@psyperl ok so imagine a complex algorithm that's stored inside a function. It does a bunch of stuff to a string. Multiple parts of can use either "firstFunc" OR "secFunc". You decide which in your param, and it applies at the correct reference points. So you do complicatFunction(param1, param2... firstFunc) OR complicatFunction(param1, param2... secFunc). Doesn't that save complexity, especially depending on the algorithm inside that function? Or imagine you got to write out the entire algortihm every time you change the different components which has these methods
which use these methods*
psyperl
@psyperl
Jun 08 2018 13:27
i would say that might increase the complexity instead..
Mohamed Osama Khan
@Assaonator
Jun 08 2018 13:27
how come we can't find this chat room on the normal site?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:28
@psyperl so how does rewriting the same thing twice = more complexity than writing it once as a function and supply the part that changes as a param?
psyperl
@psyperl
Jun 08 2018 13:31
because it adds more function that does nothing but proxying to another function?
if it's a sequence of a function .. then that's another thing .. you are grouping several actions/function calls
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:32
@psyperl
// what im asking 
func1(n1, n2) {
(n1+n2/n1*n2/0.32+(1/3)n1)n2
}
func1(n1,n2)
func2(v1,v2)
// + .. however many times this process is needed with different params

// Your suggested way:
n1+n2/n1*n2/0.32+(1/3)n1)n2
v1+v2/v1*v2/0.32+(1/3)v1)v2
// + .. however many times this process is needed with different params
@psyperl sorry not sure how to make that into code
Charlie Waite
@charliearlie
Jun 08 2018 13:33
three back ticks above
three below
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:33
@charliearlie thanks got it still editing tho :P
Charlie Waite
@charliearlie
Jun 08 2018 13:34
Happens to me every time I insert code here
spend 5 minutes editing it
psyperl
@psyperl
Jun 08 2018 13:35
@darkphotonKN ok sure.. if there are sequence of operation then of course it would be efficient to create the function
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:36
@psyperl yeah so my question was why can't we then use a method in the param, so like
func1(n1, split())
it doesn't work
or just fuc1(n1, split)
where you do let split = split() or something along those lines
if you can see where I am going with this
psyperl
@psyperl
Jun 08 2018 13:37
but the function part should be taken out
so n2 and v2 is the function?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:38
no, but it COULD be, that's what im asking if you need to reuse and it could be different function in the place not just the 1, doesn't it save time to be able to do it like that
so in that example v2 and n2 is the function, do you need to write it out like the second part on the bottom there right everything out every time
psyperl
@psyperl
Jun 08 2018 13:39
/// assume this code works
funcX(n1, n2) {
 (n1+n1+n1).n2()
}

// what i suggest is 
funcY(n1) {
  return n1+n1+n1
}
// then
funcY(n1).n2()
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:40
@psyperl yes so what if like the example above, the function is in multiple places of the algorithm (like the n2), and may be different (v2 the second time around). Rewrite each time?
psyperl
@psyperl
Jun 08 2018 13:41
is not rewrite .. you either call the func directly or you called the proxy func .. same thing...
explain what you meant by rewrite though .. maybe i didn't get the thing you are seeing
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:41
@psyperl so look at the example I wrote above where it says // what im asking is..
@psyperl would you write every operation like the way it does at the bottom? provided v2 is a function param
psyperl
@psyperl
Jun 08 2018 13:42
nope
but what is n2 ? a function calls?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:43
@psyperl in our example yeah both n2 and v2 and functions
or methods
psyperl
@psyperl
Jun 08 2018 13:43
i agree with the sequence of operation being in a function .. but not the function calls .. that's what i meant
what language is this anyway?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:43
im saying even the function call can save time or am i wrong?
js
your example works becaus eit's small
like funcY(n1).n2() right?
but what if .n2() appears 15 times inside funcY?!
you nee dto split that up
and do .n2() every point
of the place where it's needed
psyperl
@psyperl
Jun 08 2018 13:45
if n2 appears 15 times then yes .. you can use the function to tidy up
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:45
@psyperl but i was told it's not doable
psyperl
@psyperl
Jun 08 2018 13:45
why is it not doable?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:46
funcX(n1, n2) {
 (n1+n1+n1).n2()
}
as you wrote is inefficient
but I said if n2() happens 15 times then maybe its worth it
psyperl
@psyperl
Jun 08 2018 13:46
well because that is calling once .. not 15 times
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:46
but why would i ask this if its just once haha xD
psyperl
@psyperl
Jun 08 2018 13:46
happens more than once is worth it .. but give me example of that
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:46
I said complex algorithm with it many times
so say split() is used in mutliple parts of a algorithm that gives an output for a word game that does some stuff to an array of strings
but you can't put split() as a parameter
psyperl
@psyperl
Jun 08 2018 13:47
maybe try Array.prototype.split
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:47
@psyperl ah ok so that's what im missing
@psyperl thanks lol I just didn't know how to look up this problem cuz I don't know how to phrase it
psyperl
@psyperl
Jun 08 2018 13:48
np
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:49
@psyperl you have a lot of patience lol I was probably crazily overthinking it xD
psyperl
@psyperl
Jun 08 2018 13:49
one thing you need to consider though .. different function may requires different parameters
ehutchllew
@ehutchllew
Jun 08 2018 13:49
@psyperl I mentioned having to pass the prototype reference above, but that's cumbersome and, if anything, adds more complexity.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:50
@ehutchllew oh sorry I missed that.. I know it does, that's why im trying to give an example of it seeing use, did you see the example?
ehutchllew
@ehutchllew
Jun 08 2018 13:50
I can't think of a situation where having a function dynamically run instance methods is more beneficial than just calling said method when and where you need it.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:50
@ehutchllew i just tried to show psyperl that.. its not common I'm sure but it doesnt seem impossible
ehutchllew
@ehutchllew
Jun 08 2018 13:51
creating such a function is possible, just not practical.
psyperl
@psyperl
Jun 08 2018 13:52
@ehutchllew well it is adding more complexity, i agree with you .. but he mentioned the function calls several times .. so .. i dunno .. depends on the algorithm possibly
ehutchllew
@ehutchllew
Jun 08 2018 13:53
yeah, but not one that passes in an instance method as an argument
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:53
@ehutchllew i guess those situations there are other languages for it, because in maths complex alhgorithms where different components are swapped in and out (params) and if those params cannot be functions / methods, it's further adding to the complexity where at each time you do and repeat the algorithm you need to cut the function and apply the method at different points
ehutchllew
@ehutchllew
Jun 08 2018 13:53
i get the switch one, that's quite common to have parameters like that
you can pass functions as arguments to other functions
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:53
@ehutchllew so just not methods like split()
ehutchllew
@ehutchllew
Jun 08 2018 13:54
but passing in say slice() as an argument to then just reference it's argument reference doesn't make sense.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:55
@ehutchllew ok got it, I understand better now, it doesn't make sense when you put it that way
ehutchllew
@ehutchllew
Jun 08 2018 13:55
if say your function parameter is 'm' which you assign split() to
there's no benefit to calling m() over just split() directly.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:56
@ehutchllew my above example was that m() and hence split() appears multipole times in a complex algorithm. And so all you do is func1(n, m) instead of multiple points you see what im trying to get at?
ehutchllew
@ehutchllew
Jun 08 2018 13:57
yes, but to know to pass in the method like split() you already know your datatype, so why not just directly use split() on that piece of data, rather than calling a function>?
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:57
@ehutchllew that brings us back to the beginning, where there is a replacement method that can take it's place
@ehutchllew so func1(n, m), func1(n, m2) etc
ehutchllew
@ehutchllew
Jun 08 2018 13:57
if you're worried about errors, you could just do a try catch block as well. Unless I'm just not viewing this outside the box enough, I don't see a benefit to abstracting the method to another function.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 13:59
@ehutchllew i know i think im insane lol, im really overthinking it but this really helped anyway to understand why it's overly complex. but yeah i just wanted to make sur eI wasn't missing something etc
psyperl
@psyperl
Jun 08 2018 14:00
another alternative possibly to make it like
yourFuncSplit(x) and yourFuncSplice(x)
then you won't need to check wether the function passed is the one you expected or not
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:00
@psyperl ahhh yeah i didnt think of that either
ehutchllew
@ehutchllew
Jun 08 2018 14:02
running to my office, afk for a while.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:02
@ehutchllew ok thanks again
ehutchllew
@ehutchllew
Jun 08 2018 14:02
np, hopefully we can come up to a solution to your ideas heh.
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:03
heh yeah i will come with more concrete examples if they crop up with what im trying to do :P
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:03
hwllo
does anyoone heer know less
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:04
@diomed sorry couldn't know less about it
psyperl
@psyperl
Jun 08 2018 14:04
only if you know more
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:05
lol psyperl
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:05
@psyperl did you dust yourself after raising from grave?
haven't seen you here in ages
psyperl
@psyperl
Jun 08 2018 14:06
yeah well the main chat dissapeared .. that's why i am here lol
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:07
main chat found its way to discord, I guess
psyperl
@psyperl
Jun 08 2018 14:07
lol yeah .. i am there as well
i am still trying to log back in to fcc.. but seems like the auth changed or some such.. can't login with github anymore
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:09
really? haven't tried it
psyperl
@psyperl
Jun 08 2018 14:10
check it out... it has the new curicullum i think
gotta do all the challenges all over again haha
Kyle Holm
@thekholm80
Jun 08 2018 14:11
image.png
psyperl
@psyperl
Jun 08 2018 14:11
i could probably do 1 challenge a day or something
or once a week
ty @thekholm80
yeah i noticed that text button ... but i decided .. nah.. i will click it another time haha
Kyle Holm
@thekholm80
Jun 08 2018 14:12
"life's too short to click it today"
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:12
lol, no wonder u can't sign it
how come FCC wants more data from us? are they in data mining business?
psyperl
@psyperl
Jun 08 2018 14:13
hehe
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:13
are they gonna sell our souls someday? just like FB did
Kyle Holm
@thekholm80
Jun 08 2018 14:18
image.png
psyperl
@psyperl
Jun 08 2018 14:22
so glad i never have a facebook account
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:22
heh, funny how they have template for that
next will be Google... etc etc
psyperl
@psyperl
Jun 08 2018 14:23
i have friendster account i think .. not sure if that still exists or not
Kyle Holm
@thekholm80
Jun 08 2018 14:24
#makeMySpaceGreatAgain
psyperl
@psyperl
Jun 08 2018 14:24
lol
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:24
they're on a break @psyperl
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:24
I used to have a myspace but lets be honest it was for girls (at least for me lol)
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:24
so you can cheat on them, it's safe
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:24
lol thats not what I meant but ok
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:25
my sentence was not related to yours
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:25
I never used myspace to casually add guy friends and keep up with them, msn took care of that
@diomed LOL it made so much sense though
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:25
ah yes, msn. where all the gay people were
:yum:
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:26
subtle
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:33
@thekholm80 do you know anything about mouse scroll in JS?
Kyle Holm
@thekholm80
Jun 08 2018 14:34
are you looking for anything in particular?
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:37
have u met me?
I'm always particular
looking for a way to scroll over these cards
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:38
has anyone used .then() following fetch() before?
Kyle Holm
@thekholm80
Jun 08 2018 14:40
@diomed http://idangero.us/swiper/api/#mousewheel should have done it, i'm not convinced your swiper is functioning properly
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:41
.then(data => console.log(data)) works and stuff but I can't store the data somehow, like assign it to a variable and stuff. I would like to return that value it gets in the function its in but I don't know how cuz it's accessible inside that then()
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:41
@thekholm80 can you please take a look, if it's not much of a hassle for you :pray:
Kyle Holm
@thekholm80
Jun 08 2018 14:42
i did take a look, it doesn't seem like your page works
oh wait
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:43
@diomed dude that page and animation is awesome
@diomed also I loled at the last city
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:44
@darkphotonKN yeah, I know, I made it. (by clicking on FORK button) still - I made it :smile:
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:44
@diomed ah I see plagirism but thats fine
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:45
plagiarism is perfectly fine in open source world
yeah, that last city is somewhat strange
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:45
@diomed it was sarcasm man just messing with you
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:46
I'm from Croatia. we don't understand sarcasm.
Smootimus
@Smootimus
Jun 08 2018 14:46
lol
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:46
please tell me every time you use it.
Kyle Holm
@thekholm80
Jun 08 2018 14:50
@diomed i give up
your pug crap gives me a headache
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:50
don't worry. so did I :|
@thekholm80 if u want I can switch it to html
Kyle Holm
@thekholm80
Jun 08 2018 14:51
nah
switch it to react
Smootimus
@Smootimus
Jun 08 2018 14:51
Reaaaaaaact
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:51
@thekholm80 it gave me a headache too but it doe s look neater than html. btw your github nightlife project for FCC did FCC tell you to make it in react?
Kyle Holm
@thekholm80
Jun 08 2018 14:52
@darkphotonKN no, we don't have to use any framework for the back end projects
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:52
@thekholm80 I plan to make this in vue
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:52
I want to learn vue too but i spent too much time gettnig started on react now
@thekholm80 ok thanks
Kyle Holm
@thekholm80
Jun 08 2018 14:53
i need to rebuild my nightlife front end, it's the ugliest thing ever lol
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:53
@thekholm80 do you do web back end or anything like that for a living or just learning FCC? you seem to be very good
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:54
@thekholm80 why u no use webdesigner?
Kyle Holm
@thekholm80
Jun 08 2018 14:54
i don't work in tech, my job is more PR/Communications. i write code for fun
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:54
@thekholm80 thats awesome
Kyle Holm
@thekholm80
Jun 08 2018 14:54
everyone needs a hobby. mine is making crappy UI
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:55
that is so sads
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:55
lol. I read you do python or have done too, is it a difficult transition you think?
well not done but learned / written
Kyle Holm
@thekholm80
Jun 08 2018 14:55
i think python is easy to learn, especially after learning javascript
May Kittens Devour Your Soul
@diomed
Jun 08 2018 14:55
gosh, I miss that other Kyle
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:56
nice that sounds good, i still got to learn it for some job prospects
Kyle Holm
@thekholm80
Jun 08 2018 14:56
python is pretty awesome
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:56
does it rely on you knowing a bunch of libraries to do stuff?
Kyle Holm
@thekholm80
Jun 08 2018 14:56
yes and no
depends on what you want to do
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:57
ah yeah true. I read for AI they have very good libraries for machine learning etc
Kyle Holm
@thekholm80
Jun 08 2018 14:57
technically you can do anything without libraries, but in a lot of cases you will just end up writing a (probably worse) version of an existing library
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:57
were you writing backend with python then like with django or just writin python in general not web stuff
Kyle Holm
@thekholm80
Jun 08 2018 14:58
i played with django a bit, but it's a little heavier than i like so i've never done a full project in django. flask is pretty cool though - very minimal
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 14:59
oh so you were writing proper python like core python
Kyle Holm
@thekholm80
Jun 08 2018 14:59
i'm not sure what you mean by that
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:00
as in with django its set up so you can do stuff with backend for websites and just standalone sites but standard python is just you write scripts, programs, tools etc like a normal programming language like java
i basically meant non-web
Kyle Holm
@thekholm80
Jun 08 2018 15:01
i prefer Node/Express for building back ends so i will use those over any py library
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:01
so were you just doing problem solving / challenges with python then or writing actual scripts or programs etc?
Kyle Holm
@thekholm80
Jun 08 2018 15:01
pretty much
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:02
lol sorry i dont mean to pry just really interested
May Kittens Devour Your Soul
@diomed
Jun 08 2018 15:02
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:02
lol
Kyle Holm
@thekholm80
Jun 08 2018 15:02
i love that movie
May Kittens Devour Your Soul
@diomed
Jun 08 2018 15:02
I love that gif. very relatable.
movie was overall hard to watch
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:03
basically your life in a short and concise format man
movie was great :O
did one of you mention the main chat that disappeared moved to discord?
May Kittens Devour Your Soul
@diomed
Jun 08 2018 15:04
yes
Kyle Holm
@thekholm80
Jun 08 2018 15:04
kind of. the main chat disappeared and the people who hung out there moved to discord
but the discord and gitter are unrelated
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:04
i was wondering what happened to it :(. damn so they just removed it from gitter entirely?
one morning my bookmark didnt work anymore
Kyle Holm
@thekholm80
Jun 08 2018 15:05
yep
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:05
you look like walter white btw if that is your real picture
Kyle Holm
@thekholm80
Jun 08 2018 15:06
lol thank you?
May Kittens Devour Your Soul
@diomed
Jun 08 2018 15:06
he is the one who knocks
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:06
its a compliment man he looked badass :P
Kyle Holm
@thekholm80
Jun 08 2018 15:06
brb going to buy a fedora
Kranti Nebhwani
@darkphotonKN
Jun 08 2018 15:06
hahah
stop hiding man you got one under the table
Kyle Holm
@thekholm80
Jun 08 2018 15:21
@texas2010 that's pretty neat
Lance
@texas2010
Jun 08 2018 15:21
ikr lol
Kyle Holm
@thekholm80
Jun 08 2018 15:22
i've done an extension in regular html/css/js so i figured it was possible
Lance
@texas2010
Jun 08 2018 15:24
yeah
dq0324
@dq0324
Jun 08 2018 15:42
How to use the SRC?
Tarun Garhwal
@eoo
Jun 08 2018 15:50
anyone have any experince with exress.js?
i cant seem to load a static html file on localhost
code and everything is correct IMO but the when i try to open it, it gives me a error "cannot GET file.html"
Kyle Holm
@thekholm80
Jun 08 2018 15:52
@eoo is your code somewhere i can see it?
Tarun Garhwal
@eoo
Jun 08 2018 15:52
gimme a sex
*sec
the directory /public contain the personform.html
basically, the only line that should display the personform.html is app.use( express.static('/public') );
i dont think there's anything wrong with this. i've already spent hours bangin my head
Kyle Holm
@thekholm80
Jun 08 2018 15:58
hmm
I don't use ejs, so i'm not entirely sure. loading the static middleware should allow you to access the files in the public directory through http://localhost:yourPort/personform.html
are you, at any point, actually starting the server?
something like app.listen(port)
Tarun Garhwal
@eoo
Jun 08 2018 16:02
yea yea im starting it at the end obviously, but when i do http://localhost:3000/personform.html it cannot GET the file
this is so frurstrating
Kyle Holm
@thekholm80
Jun 08 2018 16:02
have you checked the console to see what response is sent?
Tarun Garhwal
@eoo
Jun 08 2018 16:03
nothing on the console
Kyle Holm
@thekholm80
Jun 08 2018 16:04
in chrome, you're looking for the tab marked Network
Tarun Garhwal
@eoo
Jun 08 2018 16:04
oh the chrome console? lemme check
Kyle Holm
@thekholm80
Jun 08 2018 16:04
then when you make the request you should be able to see the request and the response
image.png
Mehdi Amlal
@mehdiamlal
Jun 08 2018 16:05
Hey guys
Do all APIs return JSON data?
Like Google's geolocation API does
Kyle Holm
@thekholm80
Jun 08 2018 16:06
clicking on the request should then give you the headers
image.png
@mehdiamlal hi
json is pretty common
Mehdi Amlal
@mehdiamlal
Jun 08 2018 16:06
So even other APIs return json data?
Tarun Garhwal
@eoo
Jun 08 2018 16:07

@thekholm80 i cant make anything out of the network tab but the console gives this output `Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.

`

Kyle Holm
@thekholm80
Jun 08 2018 16:07
i'm not going to say all apis return json, but all that i've dealt with have returned json
Mehdi Amlal
@mehdiamlal
Jun 08 2018 16:08
I was reading about some apis that return data in other formats
Such as simple strings
Kyle Holm
@thekholm80
Jun 08 2018 16:08
that would mean the answer to your question is "no"
Tarun Garhwal
@eoo
Jun 08 2018 16:09
@thekholm80 firefox network tab shows 404 error :/
Kyle Holm
@thekholm80
Jun 08 2018 16:11
the way i generally do it is i define routes and explicitly serve files, so something like
app.get('/path', (req, res) => {
  res.sendFile('./file');
});
Mehdi Amlal
@mehdiamlal
Jun 08 2018 16:12
@thekholm80 Thanks dude
Kyle Holm
@thekholm80
Jun 08 2018 16:13
@mehdiamlal i vaguely remember some apis (wiki, maybe?) giving the option to request other data types, but i always chose json because i felt it was easy to work with
Mehdi Amlal
@mehdiamlal
Jun 08 2018 16:14
Yeah I think that too, simply because after you parse it, then you can manipulate data as a js object
bingxl
@bingxl
Jun 08 2018 16:14
I also meet some api is xml type, but in front ,json is popular
Kyle Holm
@thekholm80
Jun 08 2018 16:15
i think xml would be okay if i had a tool like BeautifulSoup to parse it, but JS can natively handle json
bingxl
@bingxl
Jun 08 2018 16:19
(ಡωಡ)hiahiahia, yeah, i also like json type,
Tarun Garhwal
@eoo
Jun 08 2018 16:20
@thekholm80 okay so i created a new node app for testing this shit, i used the the method you provided but it cant locale the file /public/testing.html

here's index.js
`var express = require('express');
var app = express();

//app.use( express.static('/public') );
app.use('/test', (req, res) => res.sendFile('/public/testing.html') );

app.listen(3000, () => console.log('listening on port 3000 lulz'));
`

man.. it was working just fine till yesterday
does mongo db have anything to do with it? i installed it today only
nope, it does not
FUCK
Kyle Holm
@thekholm80
Jun 08 2018 16:31
try adding
const path = require('path');

app.use(express.static(path.join(__dirname, 'public')));  // replaces your current app.use(express.static())
i believe this is the preferred method
the path library is native, you don't have to install it
Tarun Garhwal
@eoo
Jun 08 2018 16:32
omfg
this little shit
i changed my express.static('public') to express.static(__dirname + '/public')
and it works
Kyle Holm
@thekholm80
Jun 08 2018 16:33
yeah
if you use eslint it will throw an error for concatenating the file path, that's what the path.join() is for
Tarun Garhwal
@eoo
Jun 08 2018 16:34
i looked the the express wiki and just overlooked the __dirname because they said to only use this if /public is somewheere else
Chase Sawyer
@shadowimmage
Jun 08 2018 16:35
it also works if you use app.use(express.static('./public'))
Tarun Garhwal
@eoo
Jun 08 2018 16:36
WHY THO?
Chase Sawyer
@shadowimmage
Jun 08 2018 16:36
need the './' for relative directory
because '/public' means from the root of your drive
not relative to where the code is executing
Tarun Garhwal
@eoo
Jun 08 2018 16:36
its not a relative directory, its right where the index.js is.
the wiki clearly says app.use(express.static('public')) is the code to use when serving static files
and i read on 20 stackoverflow questions that thats how it is done
what the actual fuck
and app.use(express.static('public')) was working till yesterday, so it suddenly stops wokring?
somebody pls make sense out of this
Chase Sawyer
@shadowimmage
Jun 08 2018 16:40
I mean, you're not wrong -- I think I struggled with that in the past, too
Tarun Garhwal
@eoo
Jun 08 2018 16:43
i was following this course and everything was working fine will yesterday, and suddenly today, everyhitng falls apart.
i didnt even touch any file
Chase Sawyer
@shadowimmage
Jun 08 2018 16:45
maybe something how node is getting started - to be honest I fought with node/express over the location of my static files for a while and just tried a bunch of stuff and looked around the internet till it worked out. I just tried it out with my portfolio site in dev, and saying 'public' alone definitely broke all my static files.
Mehdi Amlal
@mehdiamlal
Jun 08 2018 16:45
Guys, any advice on how can I start contributing to open source, while still learning new web development concepts/technologies?
gishy1
@gishy1
Jun 08 2018 16:46
hello has anyone done the attributes checkbox challenge?
Tarun Garhwal
@eoo
Jun 08 2018 16:47
I'm pretty sure somebody more intelligent/experienced than me could make sense out of all this, but for now i'll say node and express sucks
Chase Sawyer
@shadowimmage
Jun 08 2018 16:47
Tarun Garhwal
@eoo
Jun 08 2018 16:49
aah fuck, i have other problems now.
you fix one bug, 15 others show up

thisismylifenow

Kyle Holm
@thekholm80
Jun 08 2018 16:50
Ankur Sharma
@AnkurSharma102
Jun 08 2018 17:09
how to viewport units while defining width
use*
Chase Sawyer
@shadowimmage
Jun 08 2018 17:17
[this is very Windows-centric, but probably applies to other systems, too]
@eoo If you dig into how express.static loads paths, you'll eventually get to path.js that has a resolve() function that turns the string you give it ('public') into an absolute path ('C:\Users\username\yourproject\public')
Where this breaks is if you give static a path of '/public' - that resolves to an absolute path - meaning you told Express that your 'public' directory was "c:\public" - not wherever your node app is living.
This is also why './public' (and 'public') works: the dot (or just the folder name) at the beginning tells resolve to resolve a relative path to where node is running.
I dunno if that really helps -- if you wanna take a look at how it's loading stuff up, walking it through with debugger can be helpful, or maybe just more confusing. Haha
Tarun Garhwal
@eoo
Jun 08 2018 17:19
@shadowimmage idk man. take a look at the wiki, it clearly says using express.static('public') will serve all the static files under public subdirectory of the main js file, and it was working very fine until today it decided to fuck itself up
Chase Sawyer
@shadowimmage
Jun 08 2018 17:20
yep - the code you originally posted was with a slash at the beginning
Tarun Garhwal
@eoo
Jun 08 2018 17:20
I also found some other threads on the internet where the same problem is addressed but no proper answer
i had already tried public, /public, and ./public
none worked
but __dirname + 'public' somehow worked
AND NOW RES.REDIRECT('PUBLIC/PERSONFORM.HTML') DOES NOT WORK
OOPS
*sorry for caps
Chase Sawyer
@shadowimmage
Jun 08 2018 17:26
I'll give you that the docs aren't the best out there. And running into problems like that are really frustrating. But I bet if you dig into all those function calls with debugger, the resolved path will be something you're not expecting, and it won't work because that path doesn't exist.
Tarun Garhwal
@eoo
Jun 08 2018 17:27
how would i go about debigging this? any pointers?
Chase Sawyer
@shadowimmage
Jun 08 2018 17:28
what's your environment?
Like, are you using Visual Studio Code, Sublime Text, online editor?
Tarun Garhwal
@eoo
Jun 08 2018 17:28
sublime
locally
wtf man now even express.static('public') works too
all is right in the world again
Chase Sawyer
@shadowimmage
Jun 08 2018 17:39
mmmk. so. since you're not using an IDE with a built in debugging client (unless sublime has this and I don't know about it..) You can use Chrome
but basically:
  1. node --inspect app.js (or whatever your main app where express starts is called)
  2. open chrome and go to chrome://inspect
then you can set breakpoints in the code and see all the variables as they change, freeze code on errors, etc.
Mehdi Amlal
@mehdiamlal
Jun 08 2018 18:24
Hey guys, I have an issue with the Google geolocation api: when I try to request it from my app, I get this message
{
"errormessage": "You have exceeded your daily request quota for this API. We recommend registering for a key at the Google Developers Console: https://console.developers.google.com/apis/credentials?project=",
"results": [],
"status": "OVER_QUERY_LIMIT"
}
Smootimus
@Smootimus
Jun 08 2018 18:24
Waiting for the Arduino to show up :)
Be here any min
Christopher McCormack
@cmccormack
Jun 08 2018 18:35
@mehdiamlal yes if you use google's api you need to get a key and pass that as a query param
Mehdi Amlal
@mehdiamlal
Jun 08 2018 18:37
How can I do that?
DMCooper
@SilentGamelan
Jun 08 2018 19:55
The maps api has changed its conditions
Be very careful if you've already given your credit card details
Google has drastically altered the billing arrangements, and require you submit a credit card in order to access it even for free use. If your website unexpected exceeds the free tier, they will automatically bill you
CS50 has very recently had to update one of their challenges to avoid individuals having to have their own API keys.
The change was a few weeks ago - I was lucky enough to have submitted my project before it came into effect
DMCooper
@SilentGamelan
Jun 08 2018 20:21
@mehdiamlal ^^
aenkirch
@aenkirch
Jun 08 2018 20:33
capture.jpeg
Hi guys I'm at this exercise and my doesn't work ( : https://repl.it/repls/FemaleBadRelationalmodel ) can you help me ? Thanks in advance !
Chase Sawyer
@shadowimmage
Jun 08 2018 20:48
@aenkirch Have you tried using this? https://regexr.com/ - it's one of my go-tos for testing out and seeing what regexes do.
Smootimus
@Smootimus
Jun 08 2018 21:05
Arduino kit just got here :D
Kyle Holm
@thekholm80
Jun 08 2018 21:11
:fire:
Bjorn van de Peut
@bjorno43
Jun 08 2018 23:36
:wave:
Kyle Holm
@thekholm80
Jun 08 2018 23:45
@bjorno43 hey bob, how's life?
Bjorn van de Peut
@bjorno43
Jun 08 2018 23:45
@thekholm80 Yo. Good. Working on a bot for Gitter. Well "js injection bot", ghehe
Kyle Holm
@thekholm80
Jun 08 2018 23:45
sounds fun
Bjorn van de Peut
@bjorno43
Jun 08 2018 23:45
But it's proving difficult so far
Getting conflicting data returned continuesly
Kyle Holm
@thekholm80
Jun 08 2018 23:46
sounds frustrating
Bjorn van de Peut
@bjorno43
Jun 08 2018 23:48
It is
Like, on the first message received I'm getting the wrong data
But on the second message, it's right data
Kyle Holm
@thekholm80
Jun 08 2018 23:49
maybe the have a RNG determine what to send you
Bob rolls a 1, gets a transcript from cspan instead of gitter chat
Bjorn van de Peut
@bjorno43
Jun 08 2018 23:50
Maybe. I'm not sure
Wait
I'm getting something interesting now
Kyle Holm
@thekholm80
Jun 08 2018 23:50
pics of cats?
Bjorn van de Peut
@bjorno43
Jun 08 2018 23:51
lol
Let's see
!eightball test