These are chat archives for FreeCodeCamp/Help

30th
Jan 2019
asimfrancis
@asimfrancis
Jan 30 01:09
Anybody have experience working with GIS databases?
I am working on building a business directory database application that will return results based upon your geo location and filters.
asimfrancis
@asimfrancis
Jan 30 01:14
I have a sample dataset of about 12000 records I'll be putting into a database but will need some assistance with the GIS. Not sure if I should do this in MongoDb or SQL Server.
Philip Durbin
@pdurbin
Jan 30 01:41
I hear PostGIS is popular.
asimfrancis
@asimfrancis
Jan 30 02:51
@pdurbin any experience with this yet?
kinopotato
@kinopotato
Jan 30 06:59
Hello, how do you make a persistent calendar using js? is persistent calendar even the right word??
Kaz Baig
@kbaig
Jan 30 07:20
@kinopotato an example of what you mean would be helpful
kinopotato
@kinopotato
Jan 30 07:21
I don't exactly know myself. But I want to make a payroll system, so I need a calendar that also functions as an organizer. I'll need to be able to automatically calculate the salary of the employees based on the information on the calendar and particular date. I just don't know how to begin
Kaz Baig
@kbaig
Jan 30 07:23
Sounds like you need to start with the most basic functionality you know you need and keep adding on more
kinopotato
@kinopotato
Jan 30 07:39
@kbaig what do you think if I do something like this, I'll create script that finds the date and automatically calculates salaray based on 8 hours of work unless edited by the staff. I can easily do something like that and connect it to the database so I will have persistent data. problem is, I don't know if I can make it look like an actual calendar :| or there may be other problems I'm not able to think about
Kaz Baig
@kbaig
Jan 30 07:41
Better to have something rather than nothing
kinopotato
@kinopotato
Jan 30 07:44
that's true, but if I'm not even a little bit careful, I might have to scrap everything because a single feature won't fit the current errr, code?
Kaz Baig
@kbaig
Jan 30 07:44
That's pretty unlikely. Also, you've gotta try to make your projects modular in general for this reason
kinopotato
@kinopotato
Jan 30 07:46
well I suppose since I have no experience, even if I figure out this shit, the other shit will screw me over anyway. haha, you're right, better to just do it with whatever I have right now.
Kaz Baig
@kbaig
Jan 30 07:46
Yep. Those mistakes are how you learn
kinopotato
@kinopotato
Jan 30 07:47
haha, nothing to it then. Thanks! I'll go with coding until something resembles anything that makes sense and at least doesn't make the browser crash, haha. Thanks again!
Kaz Baig
@kbaig
Jan 30 07:48
:smile:
Zaza
@ForkInSpace
Jan 30 08:50
Hey guys. Could one add css padding to child elements progressively?
tundeiness
@tundeiness
Jan 30 13:16
need help on this project https://codepen.io/highness/pen/xmMMoG?editors=0011 can someone help please? I am totally lost.
_
Tom
@moT01
Jan 30 14:15
@tundeiness whats the problem?
tundeiness
@tundeiness
Jan 30 14:16
@moT01 plenty problem :cry:
@moT01 I am a bit confused on accessing the data I set up in the child component from a function I set up in the parent component. I know react has it own way of listening for events but the one I know does not seem to cover the current topic. I have made research and all the docs were pointing to is input from forms. I can call the function I setup in the parent from the child but the confusing thing is how to access data which resides as state in the child component. I also need advise on the best event function to use in this project is it onClick or onKeyPress? I wont mind reading docs that deals with the issues I raised or particular pointers to my challenge.
Tom
@moT01
Jan 30 14:21
well, first off - you probably need both the onclick and keypress
cause you need to be able to do either, as it says in the user stories
tundeiness
@tundeiness
Jan 30 14:23
@moT01 okay...
Tom
@moT01
Jan 30 14:24
how about moving the data to parent component, and pass it down to the child when you need it
Tom
@moT01
Jan 30 14:30
looks like that's kinda how I did it... have your array in the parent, map over it in the parent, and create a child for each letter/array item and pass in the data that you need as props
tundeiness
@tundeiness
Jan 30 14:36
@moT01 hmmmmm
@moT01 let me explore that option
@moT01 any more heads up?
Tom
@moT01
Jan 30 14:46
I suppose another way to go for you would possibly be to pass the function you have in the parent, down to the child
and instead of trying to use state to get data - put an argument into the function
tundeiness
@tundeiness
Jan 30 14:55
@moT01 hmmm, working on it.
SaintoftheGallows
@SaintoftheGallows
Jan 30 15:04
#prompt user for an integer
#change integer to percent
#prompt user for "Base" integer
#multiply the integer(base) and percent
#add the outcome with the base
#multiply the base and percent
#add the outcome with the base
#repeat until $1000 is reached





print('how many times will you need to trade to get to 1000')

percent=int(input('What is the percentage'))
import decimal
percent=decimal.decimal(percent) / decimal.decimal(percent)
decimal(percent)
dollar=int(input('How much money are we starting with?'))
base=dollar*percent
print('Gross price is $',format(base,'.2f'),sep='')
How do I get a decimal out put for the percent?
or better yet, how do I just get a percent without converting the integer to a decimal?
print('how many times will you need to trade to get to 1000')

percent=int(input('What is the percentage'))
percent/100
dollar=int(input('How much money are we starting with?'))
base=dollar*percent
print('Gross price is $',format(base,'.2f'),sep='')
this is actually what im working with, I couldn't get that decimal import to work.
any ideas?
Christopher McCormack
@cmccormack
Jan 30 15:37
@tundeiness I didn't see you shared this here too (you should try not to post in multiple channels) - Check HelpJavaScript for my answers
SaintoftheGallows
@SaintoftheGallows
Jan 30 15:41
This is python, helpjavascript is a website?
Christopher McCormack
@cmccormack
Jan 30 15:46
@SaintoftheGallows not sure what you mean, this is the FreeCodeCamp/Help channel, not dedicated to Python
SaintoftheGallows
@SaintoftheGallows
Jan 30 15:55
Im just saying Im working in python, I thought javacript and python are different. Im using the python.org to sort things out atm. Theres so much information out, its easy to get confused, or spend a lot of time doing something simple. Im going to school for programming, so I appreciate your help and not just giving me an answer. Programming is a lot of fun! This is a side project of mine.
Christopher McCormack
@cmccormack
Jan 30 16:04
Yes JavaScript and Python are different. FreeCodeCamp mostly focuses on full-stack web development using HTML CSS and JavaScript. I believe there was some effort to also include Python in the curriculum but I am not sure how that has progressed. There is a python channel on the freeCodeCamp gitter https://gitter.im/FreeCodeCamp/python if you want to discuss Python with other folks
@SaintoftheGallows Ah I see you were responding to your code block, I was responding to another user
@SaintoftheGallows percent/100 this isn't doing anything - you need to assign the result of this expression - percent = percent/100
SaintoftheGallows
@SaintoftheGallows
Jan 30 16:23
I figured that out
print('how many times will you need to trade to get to 1000')

num=int(input('What is the percentage were looking to make?'))
percent=num/100

base=int(input('How much are we investing?'))

real=base*percent
print(percent)
this is what im up to now. The result will be the amount of times it would take for (lets say) 3% of 100, to get to 1000
SaintoftheGallows
@SaintoftheGallows
Jan 30 16:31
Its easy to write on paper, but to change the percent over and over is a lot of writing. If you were to do 100% of 100, it would take four times to get above 1000. 100;200;400;800;1600
100100%=100; 100+100=200;200100% and so forth
Christopher McCormack
@cmccormack
Jan 30 16:35
@SaintoftheGallows are you asking a question or just stating?
SaintoftheGallows
@SaintoftheGallows
Jan 30 16:41
I stated my problem, I guess im stuck with what the question would be that would provide me a proper solution. So im just in trial and error mode.
SaintoftheGallows
@SaintoftheGallows
Jan 30 17:04
print('How many times will you need to trade to get to 1000')

num=int(input('What is the percentage your looking for?'))
percent=num/100

cash=int(input('What is the starting capital?'))

gains=cash*percent
base=gains+cash
print(base)
So my question is, what do I use, to repeat this until I have 1000
Christopher McCormack
@cmccormack
Jan 30 17:33
@SaintoftheGallows are you familiar with loops?
SaintoftheGallows
@SaintoftheGallows
Jan 30 17:45
Not very, but I have been trying to get a while loop working.
I saw it working with fibonaccis math
that's ideally what I would like to do here
SaintoftheGallows
@SaintoftheGallows
Jan 30 18:15
I have to get to work, you can one on one if ya want for this project. Im sure Ill figure it out. Ive only been using python for 3weeks, s
Christopher McCormack
@cmccormack
Jan 30 18:37
@SaintoftheGallows I would suggest reading up on the language first, we can help answer specific questions but it's up to you to do your research first
May Kittens Devour Your Soul
@diomed
Jan 30 19:54
(╯°□°)╯︵ ┻━┻
Christopher McCormack
@cmccormack
Jan 30 19:54
@diomed what's caught in your craw :cat: ?
May Kittens Devour Your Soul
@diomed
Jan 30 19:57
@cmccormack squishing bugs
like a true webdev
Christopher McCormack
@cmccormack
Jan 30 20:03
lol
Niraj Nandish
@Nirajn2311
Jan 30 20:22
Lollll 😹
Richard
@rylew0925
Jan 30 22:53
For the CSS portion such as radial or linear-gradients, colors, hex codes, and so on, is it recommended to know every formula and colors or do most coders just refer to the charts?
I'm a bit overwhelmed by these formulas and positional orders so I was wondering if most coders really do out of their way to memorize each sequence of codes or do they just simply look them up on reference guides?
Christopher McCormack
@cmccormack
Jan 30 23:01
@rylew0925 the idea is to introduce you to these concepts so you know they exist and what to refer to if you run across a need for something similar. You shouldn't have to memorize everything, and those that do probably use it a lot.
Richard
@rylew0925
Jan 30 23:33
@cmccormack Thanks for clarifying. I was stuck on each lesson memorizing each formula!
Christopher McCormack
@cmccormack
Jan 30 23:34
@rylew0925 probably not bad to have a good understanding of it at least
doubt anyone knows all the colors, but you play with them long enough you'll know some good combinations