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
Ruben Dario
@rubendmatos1985
hello guys i gpt stuck here
could you help me
i dont know what i mus to do
the task names it seek and destroy
Hemakshi Sachdev
@hemakshis
@rubendmatos1985 What are you not able to understand
Ken Haduch
@khaduch
@rubendmatos1985 - you have to write a function that will take arguments consisting of an array, which is the initial argument, and then any number of arguments that follow it. A typical invocation of the function will look like this: destroyer([1, 2, 3, 1, 2, 3], 3, 2); - the array is the first argument [1, 2, 3, 1, 2, 3], and the 3 and 2 are the additional arguments. They have provided a link for the arguments object - you use that to access all of the function arguments, and in this case, you want to use it to get the arguments that follow the initial array. The problem statement says: Remove all elements from the initial array that are of the same value as these arguments. So you find any arguments in the initial array that are contained in the list of the arguments that follow the initial array and remove them, return an array that has any remaining arguments. For the example that I put above, you would remove any 2 and 3 from the initial array, and return [1, 1] You have to be able to handle any number of additional arguments, so this one has two, some have three, but you can write code that will handle any number of arguments, so don't just hard code 2 and 3 as the count of values.
Ken Haduch
@khaduch
@rubendmatos1985 - as I said, they give a link to the documentation for the Arguments object, and the array .filter() method. You can also use for loops and just do all of the code that way, or use some of the higher-order functions like filter() to do the job.
Teo
@Teo03
Can someone take a look. I created a modal but when I click on the "Add recipe" button it shows nothing. Here is my code:
import React from 'react';
import Modal from 'react-bootstrap-modal';
import ReactDOM from 'react-dom';
export class AddRecipe extends React.Component {
    constructor(){
        super();
        this.state = {
            show: false
        }
        this.closeModal = this.closeModal.bind(this);
        this.showModal = this.showModal.bind(this);
    }
    showModal(){
        this.setState({
            show: true
        });
    }
    closeModal(){
        this.setState({
            show: false
        });
    } 
       render(){
        return (
        <div>
           <button onClick={this.showModal}>Add Recipe</button>

           <Modal show={this.state.show} onHide={this.closeModal}>
           <Modal.Header>
               <Modal.Title>Add Recipe:</Modal.Title>
           </Modal.Header>
           <Modal.Body>
               <h2>Name:</h2>
             <input />
                <hr />
           <h3>Instructions</h3>
             <textarea></textarea>
           </Modal.Body>
           <Modal.Footer>GG</Modal.Footer>
       </Modal>
        </div>
        );
    }
}
ReactDOM.render(<AddRecipe />, document.getElementById('app'));
Spacetime
@justinemar
Why are you calling the function for the modal ? do you want the modal to close once a recipe is added?
Oh nevermind, i never than this project you meant to open the modal.
Teo
@Teo03
The problem is that when I click it doesen't open
Spacetime
@justinemar
can you inspect the page and see if the modal is there ? there's some cases that it's just out of the viewport.
Teo
@Teo03
I checked it's ok
Still when I click nothing appears
Sweet Coding :)
@SweetCodingInc
@Teo03 any errors on console?
Teo
@Teo03
Only this: TypeError: Cannot read property 'createClass' of undefined
Sweet Coding :)
@SweetCodingInc
That means react is not loaded correctly
How did you create this app?
Using create-react-app?
Teo
@Teo03
No, should I send you my package.json?
Sweet Coding :)
@SweetCodingInc
share you build file instead
is it webpack?
no worries...
Teo
@Teo03
yes it's webpack
Sweet Coding :)
@SweetCodingInc
is it there on github?
Teo
@Teo03
I haven't still pushed it
I can do it now if you need
Sweet Coding :)
@SweetCodingInc
yes please
Teo
@Teo03
@SweetCodingInc Here is a link: https://github.com/Teo03/recipe_box
Sweet Coding :)
@SweetCodingInc
@Teo03 hold on
Teo
@Teo03
@SweetCodingInc Ok no problem
Sweet Coding :)
@SweetCodingInc
@Teo03 just a note.. never push your node_modules to the repo
is it okay if I fork and submit pull request?
Teo
@Teo03
@SweetCodingIn Yes of course
Ghost
@ghost~5a4a80acd73408ce4f859755
how can i align something to the center? not just the text, i mean an element
in html*
A. J. Bozdar
@moajday

@MuhammedKarim

< YourElement style = text-align: center; >  </YourElement>

The grammar is same for whatever you want to align to the center of your page.

Ghost
@ghost~5a4a80acd73408ce4f859755
thanks bro but its not working for me :( ill send it to you privately
Luc Martin
@fmartin5
@ajbozdar Your capitalize function looks correct, but it will only change the first letter of user input
And maybe you should add a check for the empty string
A. J. Bozdar
@moajday
@MuhammedKarim You can sure contact me via private messages, but if you paste your code here, someone will help you out in case I am not available.
@fmartin5 Check for the empty string? Could you please explain this more?
Luc Martin
@fmartin5
Yes because text[0] will be undefined if textis empty @ajbozdar
Example if(text == "") return "";
Sweet Coding :)
@SweetCodingInc
@Teo03 looks like there is some issue with the library itself
Ghost
@ghost~5a4a80acd73408ce4f859755
how can i center that iframe with the youtube vid?
Sweet Coding :)
@SweetCodingInc
@Teo03 jquense/react-bootstrap-modal#54 known issue with react v16 +
Ken Haduch
@khaduch
@MuhammedKarim - one way that it works is to wrap it in a div, and set a class on the div with the CSS property text-align: center;
Ghost
@ghost~5a4a80acd73408ce4f859755
just got it bro @khaduch iframe {margin:auto; display:block}