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
Mohammed Boudad
@matrixersp
Googling it doesn't give me any results
AJ Brommy
@AJ-Brommy
unfortunately i don't even know what npm is lol
think i've found the answer to that now - a package manager for JavaScript?
Mohammed Boudad
@matrixersp
@AJ-Brommy It's okay friend, Yeh I know what npm is, what I don't understand is the flag -D I haven't seen it before
AJ Brommy
@AJ-Brommy
-D: --save-dev
I think this might be what you are looking for : https://docs.npmjs.com/misc/config

save-dev
Default: false
Type: Boolean
Save installed packages to a package.json file as devDependencies.

When used with the npm rm command, it removes it from the devDependencies object.

Only works if there is already a package.json file present.

Mohammed Boudad
@matrixersp
@AJ-Brommy Ah okay, thanks a lot
You saved my day
AJ Brommy
@AJ-Brommy
no probs :) glad it's helped :)
Mohammed Boudad
@matrixersp
I feel stupid, I should've taken a look at the doc
AJ Brommy
@AJ-Brommy
no worries - all part of learning :)
Mohammed Boudad
@matrixersp
Yeh, it happens sometimes, we get stuck at trivial things
AJ Brommy
@AJ-Brommy
yup
Spyrantis Theodoros
@thodorisanta
quick question. Is it "wrong" or bad practice or anything that to align something vertically i put display: flex; align-items: center; ? i mean..im only putting flex on it to display it in the center vertically. even if it is a single item.
AJ Brommy
@AJ-Brommy
there are vertical align options
but i don't think they work initial quite as one my think, i can't remember. I think you need to get the height to be 100% first or something.
Victor Popescu
@VicPopescu
@thodorisanta align-items: center; will vertically align items inside that element
not a bad practice
you can use align-self too
AJ Brommy
@AJ-Brommy
yeah seems i might have been wrong - i can't get things to work as i thought lol
so yeah might be the simplest option
AJ Brommy
@AJ-Brommy
ok... I think... you can use this..
margin-top:25vh;
AJ Brommy
@AJ-Brommy
sorry that probably needs explanation, numbers depends on others. it's functionality probably isn't right but I came up with this.
https://codepen.io/AJ-Brommy/pen/XxqxVQ
shivendrarox
@shivendrarox
Confused on learning data science or continue learning web dev.
Dušan Todorović
@krckyboy
Hey, guys. I'm a junior front-end developer and this is my first project design so I'd like to hear what you think of it and what I could improve. I uploaded home page for desktop and mobile view: https://imgur.com/a/ZFw5BKn
Danny McVey
@dannymcvey
Hi folks. I’ll be here working on my tribute page so if anybody needs help with HTML/CSS, PM me.
Joseph Henshaw
@Big-jo
Hi, I want to create a button that adds input boxes whenever it's clicked, is there a way to do that in angular
P
Rahul Bhatia
@rbhatia46
Hi everyone! I just published an article about Kubernetes. If you are interested in it, please give it a read. Only 3 mins
Hussein Zaki
@Hussein90
hi to @all
can anyone help me in react.js
@all please help me
@planigan can you help me

the problem is @Hussein90
I stuck on getting data from local json db i get one group from 2 groups ```
{
"posts": [
{
"title": "CopyRight Automatico",
"tags": "[JS]",
"id": 1,
"userId": 1,
"name": "Shopping",
"dueDate": null,
"priority": "high",
"categoryId": 1
},
{
"title": "HtmlWebpackPlugin Multiples HTML files",
"tags": "[JS, webpack]",
"id": 2,
"userId": 1,
"name": "Cooking",
"dueDate": null,
"priority": "low",
"categoryId": 1
}
],
"categories": [
{
"id": 1,
"name": "Personal"
},
{
"id": 2,
"name": "Work"
}
]
}

this is the json file i can get data from posts only but i want also from categories also 
this is the code of my work until now

componentDidMount(){
let url="http://localhost:3001/categories"

fetch(url)
.then(resp => resp.json())
.then(data =>{
let categories = data.map((category, index) =>{
return(
<div key={index}>
<ul>
<li>
UserName: {category.name}
</li>
<li>
UserID: {category.id}
</li>
</ul>
</div>
)
})

this.setState({categories: categories});

})
}
``` this is the code componentdidmount only accept one
@all can anyone help me

Aditya
@ezioda004
@Hussein90 Please format your code: press crtl + shift + m for markdown help
Hussein Zaki
@Hussein90
okay
the json db is
{
  "posts": [
    {
      "title": "CopyRight Automatico",
      "tags": "[JS]",
      "id": 1,
      "userId": 1,
      "name": "Shopping",
      "dueDate": null,
      "priority": "high",
      "categoryId": 1
    },
    {
      "title": "HtmlWebpackPlugin Multiples HTML files",
      "tags": "[JS, webpack]",
      "id": 2,
      "userId": 1,
      "name": "Cooking",
      "dueDate": null,
      "priority": "low",
      "categoryId": 1
    }
  ],
  "categories": [
    {
      "id": 1,
      "name": "Personal"
    },
    {
      "id": 2,
      "name": "Work"
    }
  ]
}
A-J Roos
@Asjas
@Hussein90 Please stop pinging All. It's a single person you are pinging. You don't have a priviliges to ping everyone.
Hussein Zaki
@Hussein90
@Asjas sorry
A-J Roos
@Asjas
Also format your first codeblock as @ezioda004 suggested. It's extremely hard to see what the code does.
Hussein Zaki
@Hussein90
the code is
class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      categories:[]

    };
  }
  componentDidMount(){
   let url="http://localhost:3001/categories"

   fetch(url)
   .then(resp => resp.json())
   .then(data =>{
    let categories = data.map((category, index) =>{
            return(
               <div key={index}>
               <ul>
               <li>
               UserName: {category.name}
               </li>
               <li>
               UserID: {category.id}
               </li>
               </ul>
               </div>
)
          })

    this.setState({categories: categories});
  })
 }


  render() {
    return (
      <div className="App" >
       {this.state.categories}

      </div>
    );
  }
}

export default App;

when i try to add

let url="http://localhost:3001/posts"

to get two groups it only accept posts or categories

i am sorry to bother any one here
Aditya
@ezioda004
@Hussein90 Sorry, I dont get your question. Can you elaborate whats not working?
Hussein Zaki
@Hussein90
@ezioda004 look i want to get data from the local json db the posts group and also the categories group i get one only but i want to get the both of them or more like if iwant to add groups also to be appear
@ezioda004 look at the json up there is a two groups one is under posts and the other is under a categories