Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2021 12:31
    @texas2010 banned @therichaverma
  • Jun 19 2020 20:05
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:26
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Aug 17 2019 01:43
    @bjorno43 banned @linkin-park
  • Jun 20 2019 21:20
    @bjorno43 banned @shenerd140
  • May 10 2019 09:13
    @bjorno43 banned @zhaokunhaoa
  • Apr 27 2019 19:47
    @mstellaluna banned @zhonghuacx
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Jan 08 2019 22:00
    @mstellaluna banned @dertiuss323
  • Dec 15 2018 23:36
    @mstellaluna banned @18835579411
  • Dec 13 2018 23:57
    @mstellaluna banned @brandon6190
  • 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:13
    User @bjorno43 unbanned @androuino
I am Josh.
@notarypublic
at my current role, i'm transitioning a spaghetti-code, patchwork app to angular
mainly just using angular for 2-way binding of templates right now, still letting jquery do most of the magic
Alex Evans
@alex-evans
Hi, I'm looking at the nodejs documentation for http.get and I'm not following what it is saying as possible options for it. Is there a clean way of seeing all of the options for http.get? https://nodejs.org/api/http.html#http_http_get_options_callback
Same as http.request I guess.
Never mind
Rafael J. Rodriguez
@Rafase282
does anyone knows how to add a new property to a mongoose schema andhave the old documents implement it onthe next document update?
Mafalda
@otmeek
thank you @chrisdziewa
CamperBot
@camperbot
otmeek sends brownie points to @chrisdziewa :sparkles: :thumbsup: :sparkles:
:star: 546 | @chrisdziewa | http://www.freecodecamp.com/chrisdziewa
Darryl Pargeter
@darrylpargeter
@Rafase282 as far as I'm aware you will need to update each document with the new property. but you could build a seed document and mongoimport
Chuah Chee Shian
@shian48263
@Rafase282 Or you can update them manually in mongo shell
Philip Linghammar
@xapax
Does anyone here know if mongoose-schema is enough to be safe agains Server Side Javascript Injection?
Or is it required to validate all data using regex?
Darryl Pargeter
@darrylpargeter
@xapax I don't think the schema will be a check for that, so would be best to validate all data from users though I think angular has a safe guard when it comes to that if I remember right
Philip Linghammar
@xapax
@darrylpargeter okay, thanks. But angular can only validate it on the client-side right? So you can just inject the evil-code directly in the request-header and thereby bypass the angular safe-guard, right?
CamperBot
@camperbot
xapax sends brownie points to @darrylpargeter :sparkles: :thumbsup: :sparkles:
:star: 740 | @darrylpargeter | http://www.freecodecamp.com/darrylpargeter
Darryl Pargeter
@darrylpargeter
@xapax I don't know but I shall be googling about it now XD
Philip Linghammar
@xapax
Yeah I'm a bit confused by all of this. I image that using mongoose schema to define the type of data would be enough to validate the input data. And that json.parse would be enough to validate querys. So that the user doesn't send dangerous queries. But i'm not rally sure about any of this.
And when I google about it I feel like I never really get any clear answers.
Darryl Pargeter
@darrylpargeter
if I found anything thats helpful I will post it here
Philip Linghammar
@xapax
Cool!
Moisés Man
@moigithub
im still stuck on map generatoin.. but found this.. probably gonna copy/paste after check the algorithm... http://bigbadwofl.me/random-dungeon-generator/
did cellular automata but it only build a big room with walls
Rafael J. Rodriguez
@Rafase282
@darrylpargeter seed document?
Darryl Pargeter
@darrylpargeter
a json document, that holds all your data that you can import
Andre Alonzo
@paycoguy
@moigithub I followed something like this http://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/
I followed everything before "A dark and twisty passageway"
general idea for me was
Sprinkle a bunch of randomly located, non-overlapping rooms.
Draw random corridors to connect them.
Freddy
@Lemony-Andrew
Hello how's it going! Does anyone know if Buffers automatically add a null terminator?
specifically* in this case: new Buffer("a string");
tigger
@tanya53
working on image-search abstraction, have the mongo working for retrieving and storing searches, do I want to use google's api, if so where is the best place to read about it?
Darryl Pargeter
@darrylpargeter
@tanya53 bing or imgur api is better googles api is a pain and only gives you 100 calls a day
tigger
@tanya53
what is the best site to learn how to use the bing api?
Darryl Pargeter
@darrylpargeter
erm, bing?
http://www.bing.com/toolbox/bingsearchapi might be a good place to start
tigger
@tanya53
@darrylpargeter thanks, any change you have done this one or how hard it will be to figure out how to get the images?
CamperBot
@camperbot
tanya53 sends brownie points to @darrylpargeter :sparkles: :thumbsup: :sparkles:
:star: 741 | @darrylpargeter | http://www.freecodecamp.com/darrylpargeter
Darryl Pargeter
@darrylpargeter
@tanya53 I’ve done it, I can’t tell you how hard bings api is to use I didn’t use it, I used google and wish I hadn’t but @HermanFassett used it if I remeber so he might be able to help more if he isn’t busy
tigger
@tanya53
thanks for the help
Darryl Pargeter
@darrylpargeter
no prob
Jess Johnson
@jessjo
@tanya53 for what it's worth, I found an external module for bing's API that made it a ton easier
Jess Johnson
@jessjo
I'm a little stuck on the file-metadata. I can do a console.log and output file size but I haven't figured out how to use a post to update the screen. I've found it using javascript but then I don't get how to access the variable I need from the javascript...
Code I have
app.post('/', upload.single('upl'), function(req,res){
      console.log(req.file.size); //form file size
      res.status(204).end();
  })
this works great
but I don't know how to update the screen as a res.send wasn't working
Darryl Pargeter
@darrylpargeter
@jessjo try res.json
Jess Johnson
@jessjo
thanks @darrylpargeter ! that worked! :)
CamperBot
@camperbot
jessjo sends brownie points to @darrylpargeter :sparkles: :thumbsup: :sparkles:
:star: 742 | @darrylpargeter | http://www.freecodecamp.com/darrylpargeter
Darryl Pargeter
@darrylpargeter
@jessjo no prob =D