JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Nov 30, 2017 19:58
@KevinB Exactly..I think there is something wrong with ajax. But I can't figure it out.
Nov 30, 2017 19:56
@KevinB I am using multer to do that in server side. if you want I can upload app.js code too
Nov 30, 2017 19:50
Hello I am trying to submit form data and save image in upload folder. I m using AJAX and nodejs for it. I can save the image but can't can form data. when I console.log(req.body) it is undefined
[Here](https://paste.ofcode.org/Jkcqns2rX73Zjgg2XDcKvv) is my ajax code. I m referring [this](https://codeforgeek.com/2014/11/ajax-file-upload-node-js/) and [this] (https://medium.com/@nickborti/ajax-form-submission-along-with-image-upload-in-nodejs-with-multer-174dbada81a6)
 

Trash can

Like the recycle bin, but trashier.
Nov 30, 2017 19:53
@Jhoverit it's in app.js code
`app.post('/api/photo',function(req,res){
console.log(req.body)
});`
 

Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Mar 17, 2017 10:11
@khajvah yes
Mar 17, 2017 09:55
I am learning Flask. I made upload image page 139.59.32.210/upload I want to rename all uploaded image in proper name convection...like image1, image2, image3, etc...I know I can use os.rename(filename, new_name) but what can I do to save it with proper new name every time
Mar 17, 2017 09:51
cbg
Feb 24, 2017 12:30
@marxin Avocado
Feb 24, 2017 12:29
print(repr(app.config['MAIL_USERNAME']))
Feb 24, 2017 12:29
I figure it by printing username in shell
Feb 24, 2017 12:26
melon @marxin @AnttiHaapala
Feb 24, 2017 12:26
@AnttiHaapala aha...I got it...I was running python script in different tab
Feb 24, 2017 11:43
yes @marxin
Feb 24, 2017 11:39
when I do echo $MAIL_PASSWORD it shows my password
Feb 24, 2017 11:38
export MAIL_PASSWORD='fsdfdlfladfaf'
Feb 24, 2017 11:35
I am following this book
Feb 24, 2017 11:34
I run it in bash using python hello.py shell
Feb 24, 2017 11:30
Asparagus
Feb 24, 2017 11:28
(I am using python 2.7)
Feb 24, 2017 11:28
it*
Feb 24, 2017 11:28
when I replace it with my real email and password ir works
Feb 24, 2017 11:27
but it does not work
Feb 24, 2017 11:27
app.config["MAIL_PASSWORD"] = os.environ.get('MAIL_PASSWORD')
Feb 24, 2017 11:27
I have used app.config["MAIL_USERNAME"] = os.environ.get('MAIL_USERNAME')
Feb 24, 2017 11:27
I want to use variable declared in bash in python(my email and password)
Feb 24, 2017 11:25
cbg
Feb 23, 2017 18:04
It was fun making that thing...btw I m getting weather by crawling google search page
Feb 23, 2017 18:03
thing*
Feb 23, 2017 18:03
n then show somewhere this notification thind
Feb 23, 2017 18:03
@paul23 I was trying my hands on web crawling
Feb 23, 2017 18:01
@Kevin Agreed
Feb 23, 2017 18:00
it is just for fun kind of thing!
Feb 23, 2017 17:59
@paul23 that's not a point
Feb 23, 2017 17:59
it shows up every 5 mins
Feb 23, 2017 17:58
Feb 23, 2017 17:58
So I don't think there is way I can do it in general for any OS
Feb 23, 2017 17:54
@WayneWerner in form of desktop notification
Feb 23, 2017 17:53
@idjaw I already have temperature...i need a way t display it
Feb 23, 2017 17:50
@Kevin yes
Feb 23, 2017 17:50
now i want to display that in form of notification
Feb 23, 2017 17:49
@idjaw I made web crawler which gets temperature of your current location from google
Feb 23, 2017 17:48
I saw people using pynotify but it is not working for me...so I guess it is only for linux
Feb 23, 2017 17:47
@idjaw I am not sure what you meant by "system information"
Feb 23, 2017 17:44
any magical python library
Feb 23, 2017 17:43
@idjaw I know that...that's why I am asking is there a way by which I can make it work on any OS
Feb 23, 2017 17:42
@idjaw yes
Feb 23, 2017 17:41
@idjaw yes my friend did and he told me it does not work
Feb 23, 2017 17:39
it works on mac but i don't think it will work on win
Feb 23, 2017 17:39
currently I am using `os.system("""
osascript -e 'display notification "{}" with title "{}"'
""".format(location, temprature))`