Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
CamperBot
@camperbot
njm8 sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 2206 | @ndburrus |http://www.freecodecamp.org/ndburrus
Norvin Burrus
@ndburrus
@NJM8 ...sounds neat :sparkles:
A link for you to learn about! haha
Norvin Burrus
@ndburrus
@NJM8 wow, nice info... thank you :smile:
CamperBot
@camperbot
ndburrus sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 401 | @njm8 |http://www.freecodecamp.org/njm8
Nate Mallison
@NJM8
@rajkumart08_twitter the first time it print undefined because that console log appears before you add the letter to the object, so there is nothing there so it returns undefined. It looks like your function is working as it should from the results
zootechdrum
@zootechdrum
have a front end question
i found this code that does what i want it to do but i cant understand why it does what it does
here is a link to my codepen
question is about the div and the *div in the css part . Why does the asterisk make it behave a different way than just putting top margin and bottom margin in the regular div
div{
  display:flex;
  border:solid red;

}
div *{
  margin-top:auto; 
  margin-bottom:auto;
}
why cant these two things be combined into one . I tried it and it stretches my button element and span element out
Nate Mallison
@NJM8
@zootechdrum I think maybe div *
is the same as div > * ? that means that code affects all the div's children, not the div itself
I'm not a css expert though
Daniel Simeonov
@dbsimeonov
div * I think selects all elements inside each div element ?
Nate Mallison
@NJM8
same as div > *
is child selector
oops
Ken Haduch
@khaduch
@mstellaluna - well you can probably just grab the text from the dropdown when the color change listeners are triggered and pass them in? Or maybe that doesn't work with an event listener?
I made a change in a copy of your pen where I put a slightly different function to be called as the callback for the color change listener, and that gets the directional text from the select element, and then passes that to the setGradient function.
Nate Mallison
@NJM8
>
zootechdrum
@zootechdrum
@dbsimeonov thanks
CamperBot
@camperbot
zootechdrum sends brownie points to @dbsimeonov :sparkles: :thumbsup: :sparkles:
:cookie: 265 | @dbsimeonov |http://www.freecodecamp.org/dbsimeonov
mstellaluna
@mstellaluna
@khaduch I'm thinking it has to be done the same way as the change direction but with the color inputs cuz as you said it doesn't change the color when you change either of the 2 inputs... time to make a code backup and start tinkering with it
rk
@rajkumart08_twitter
@NJM8 hey but how come I am seeing undefined...since a[i] will return sokme value right...can you please explain
roxxlen
@roxxlen
still not working ...
rk
@rajkumart08_twitter

I am trying to create a simple directive
It should allow numbers only in the text box.
wrote code but not sure what logic should I put inside the code for directive.
right now I am getting an error
can you guys tell me how to fix it.
providing the code below.

https://stackblitz.com/edit/angular-cam5jd?file=app/fontcolor.directive.ts

import { Directive, ElementRef, Renderer } from '@angular/core';

@Directive({ selector: '[appFontcolor]' })

export class FontcolorDirective {
        constructor(elem: ElementRef, renderer: Renderer) {
           renderer.setElementStyle(elem.nativeElement, 'color', '#EEBA33');
        }

    validateNumeric(event) {
    const key = window.event ? event.keyCode : event.which;
    if (event.keyCode === 8 ||
        event.keyCode === 9 ||
        event.keyCode === 37) {} else if (key < 48 || key > 57) {
        return false;
    } else {
      return true;
    }
  }
}

Error in /turbo_modules/@angular/compiler@5.2.8/bundles/compiler.umd.js (528:34)
Template parse errors:
No provider for NgControl ("t" class="textfield" value="" id="extra7" name="extra7" onkeypress="return isNumber(event)" /> -->

[ERROR ->]<input type="text" class="form-control pl-3"
placeholder="Contact" formControlName="contact"
(keyp"): ng:///AppModule/AppComponent.html@16:0
Evaluating main.ts
Booting application

Tanmay Halde
@tanmayHalde

Greetings all,

Would like some feedback on the stock market app. https://th-chartstock.herokuapp.com/
Its not complete yet and there are some feature enhancements, cosmetic changes & code optimizations that can be worked on. But I guess I have tried to cover all the basic use cases.

Thanks,
th

Nate Mallison
@NJM8
@rajkumart08_twitter , just to clarify you are asking about this line right?
    console.log("alphabet--->" + alphabet);
        console.log("counts[alphabet]--->" + counts[alphabet]);
in the first run through the loop, yes it gets alphabet (arr[i]) as 'a', but you haven't inserted anything into the object yet, so counts === {}, so counts[a] === undefined
rk
@rajkumart08_twitter
@NJM8 hey I am confused...can you tell me how this hash map is working...please
@NJM8 can we have a call
Brad
@bradtaniguchi
@rajkumart08_twitter Your stackblitz is crashing cuse you didn't import the ReactiveFormsModule in your app.module. Your trying to use reactiveForm stuff with formControlName in your template which uses stuff from the said module.
There are other issues (such as no formGroup for your formControl) but that is why its not working right now. Also the error you got is pretty wack and unhelpful. Must be how stack blitz works, as locally youd get a much more nicer error
Liam Docherty
@liamdocherty
Hi guys, does anyone have any good python tutorial videos?
Tiago Correia
@tiagocorreiaalmeida
free or paid @liamdocherty ?=
Ehsan Shadmehri
@ehsansh
hi everyone. I am learning vue, express. I have a question. How should I deploy the project in this article?
https://medium.com/@anaida07/mevn-stack-application-part-1-3a27b61dcae0
for the production I should run: npm run build and it creates a folder for the client codes but how should I use the client and server codes?
Brad
@bradtaniguchi
@ehsansh Your server should be able to serve the folder made with build. So when you go to locahost:8080 or whatever port you run the server on (not your dev server with nodemon, but your "prod" version of express) the stuff from your build folder should appear
Liam Docherty
@liamdocherty
@tiagocorreiaalmeida Thanks for the reply, I found some all good.
CamperBot
@camperbot
liamdocherty sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 514 | @tiagocorreiaalmeida |http://www.freecodecamp.org/tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Ehsan Shadmehri
@ehsansh
@bradtaniguchi Thanks but I am confused. In the article server receives some requests and it sends some data. It does not have any code for rendering the build folder. So should I make server.js file to serve the build older? But how?