Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    admingermany
    @admingermany
    This ?
    admingermany
    @admingermany

    local cameraIP = 0.0.0.0
    local ltn12 = require(ltn12)
    local mime = require(mime)
    local smtp = require(socket.smtp)
    local http = 0.0.0.0 require(socket.http)
    local soapContent = '<s:Envelope xmlns:s=http://www.w3.org/2003/05/soap-envelope"><s:Body xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema><GetSnapshotUri xmlns=here http link/ver10/media/wsdl><ProfileToken>720p media profile</ProfileToken></GetSnapshotUri></s:Body></s:Envelope>' local r, c, h = http.request url =here http link:10080/onvif/media_service=method = POST source =ltn12.source.string(soapContent)
    headers =
    [action] = http://www.onvif.org/ver10/media/wsdl/GetSnapshotUri
    [content-type] = application/soap+xml
    [content-length] = string.len(soapContent)

    local result, content = luup.inet.wget(here http link/ip/snaponvif.jpg

    local attachment=0.0.0.0 ltn12.source.chain
    ltn12.source.string(content)
    ltn12.filter.chain mime.encode(base64) mime.wrap

    local source = smtp.message

    headers =
    from = name <email>
    to = name <email>
    subject = name from pic

    body =
    preamble = Helloi!
    1 =
    headers =
    [content-type] = image/jpeg/name=picname.jpg
    [content-disposition] = attachment filename=picname.jpg

    [content-description] = Camera picture
    [content-transfer-encoding] = BASE64

    body = attachment r, e = smtp.send

    from = email here
    rcpt = email here
    source = source
    server = smtpcorp.com
    port = here port nummber

    maximilianomonzon
    @maximilianomonzon
    My problem is other
    I can't access to onclick function
    admingermany
    @admingermany
    One click ? I have the doppel click from googel in my http 2.0
    maximilianomonzon
    @maximilianomonzon
    O
    Oh
    mmmm
    Can you show it to me?
    admingermany
    @admingermany
    Load gohstery on phone cross the trucker from googel in system . Load Balance from doppel click
    Farhan
    @Frrank1
    hey anyone up
    Preetam
    @Preetam007
    using request npm Etag is missing in response header but using postman/browser etag is coming ….please suggest
    Farhan
    @Frrank1
    resp.data.addressError undefined
    how iam seeing this error
    anyidea anyone
    Cramirez
    @Crizstian

    Hello community this week, i’m bringing to you the third part of the series in "Build a NodeJS cinema microservice", that i wrote @medium and it’s fully charged of nodejs development, as always i’m open to get feedback, contributions, or just a comment below =]

    https://medium.com/@cramirez92/build-a-nodejs-cinema-booking-microservice-and-deploying-it-with-docker-part-3-9c384e21fbe0#.4il886ym9

    jing51
    @jing51
    blob
    Bigyan Karki
    @bigyank22
    Hello from Nepal
    Antony Francis
    @Antony-Francis-K
    is there any way to convert html to pdf without phantom js as dependency ?
    ayman bakri
    @aymanbakri9_twitter

    hey , I'm trying to create a node server that require json object and register url

    const categoriesJson = require('./categoriesJson')
    router.register("/api", categoriesFunc);

    this function work

    function categoriesFunc(request, response,) {
        const fs = require('fs');
        fs.readFile("newJson.json", function (err, content) {
            if (err) {
                response.writeHead(200);
                response.end();
            }
            else {
                var jsonObj = JSON.parse(content)
                var newJson = jsonObj.slice(1, 12);
                var data = JSON.stringify(newJson);
                response.writeHead(200, { 'Content-Type': 'application/json' });
                response.write(data);
                response.end();
    
            }
        })
    }

    and when i change it to

    function categoriesFunc(request, response) {
        var urlParts = url.parse(request.url);
        var pathname = urlParts.pathname;
        var pathname = pathname.substr(1, pathname.length);
        const fs = require('fs');
    
        fs.readFile("categoriesJson.json", function (err, content) {
            if (err) {
                response.writeHead(200);
                response.end();
            }
            else {
                var jsonObj = JSON.parse(content)
                for (var key in jsonObj) {
                    if (pathname == key) {
                        var categories = jsonObj[key];
                        var newJson = categories.slice(1, 12);
                        var data = JSON.stringify(newJson);
                    }
                }
    
                response.write(data);
                response.writeHead(200, { 'Content-Type': 'application/json' });
                response.write(data);
                response.end();
            }
        })
    }

    i get the error: throw new TypeError('first argument must be a string or Buffer');

    can anyone help ?? thanks

    Eliézer
    @augustoeliezer
    @aymanbakri9_twitter see my project: eloader
    O Still evalua
    pranshu1595
    @pranshu1595
    while using facebook authentication using passport an Oauth, i am getting an error message -

    while using facebook authentication using passport an Oauth, i am getting an error message -
    "User is already connected using this provider"

    Kindly Help

    Rohith Kumar
    @2rohith2_twitter

    Hi All,

    Anyone here is using google apis???
    I need some information about uploading my files to my gdrive.

    Code Panda
    @GetCodePanda
    Hi all, I am new for cli development, I want to create a cli like Yeoman. i try shelljs for terminal support and i dont know how to run external application comment like 'ng new test' inside of that . how to do .. Thanks in Advance
    XieChaoQin
    @Xcq5678
    天国在等你们回心转意
    Akhil chhetri
    @akhil123pp
    Hi all, I am learning node.js and Express.js building an simple login validation system.
    But i got terrible error as "TypeError: User.createUser() is not function"
     ![alt](https://www.facebook.com/photo.php?fbid=1272641499533499&set=pcb.326547281180799&type=3&theater&ifg=1)
    alt
    MARY ROSE DE VEGA
    @maryroseMXXXVI
    No one can help you guys it's about you knowing if you doing the right things as I say you can't have it in an instant access you've going in a long way thru stopped playing of those if you want to study tried to work without internet connection cause that what I does
    And just there you can make your owned system connection
    Community
    @GoddessMaat
    Ok
    birdymayo
    @birdymayo1_twitter
    Where is m
    Mine
    can anyone tell me what im doing wrong here?
    deva95
    @deva95
    @RubyRonin do you use mongoose.
    try this User.find({key : value}).exec( (error,data) => {
    if(!error){
    code here use data.___ like data.user
    }
    });
    LYF
    @pod4g
    Hi. there is a statistical analysis tool for performance testing https://github.com/pod4g/hiper/
    Fagner
    @fagner_nsz_gitlab
    Good night guys, I'm new to the node and I'm looking for knowledge about it .. I'm preparing a Centos7 server for production and I would like to know if someone can pass me material on installation and configuration of server for nodejs.Thank you all.
    mansoorshaik0201
    @mansoorshaik0201
    Has any one implemented zipping of files using nw
    Alessandro Pio Ardizio
    @pioardi
    Hi , you can find a library to build distributed services here https://github.com/pioardi/ring-election
    alaa almasri
    @alaaalmasri12
    hey
    how are u all
    fati-pouk
    @fati-pouk
    Hi everyone
    Rohit Pawar
    @roh8t
    var express= require("express")
    var bodyParser=require("body-parser")
    
    var app= express()
    var http=require('http').Server(app)
    
    var io = require('socket.io')(http)
    
    var mongoose=require('mongoose')
    var port=process.env.PORT || 5000
    
    app.use(express.static(__dirname))
    app.use(bodyParser.json())
    app.use(bodyParser.urlencoded({extended:false}))
    
    var dbUrl='mongodb+srv://user:*******@cluster0.jbbh5.mongodb.net/<dbname>?retryWrites=true&w=majority'
    var Message=mongoose.model('Message',{
    
        name:String,
        message:String
    })
    
    
    app.get('/messages', (req,res) =>{
        Message.find({},(err,messages) =>{
            res.send(messages)
    
    
        })
    
    
    
    
    })
    
    app.post('/messages',(req,res)=>{
        var message=new Message(req.body)
        message.save((err)=>{
    
            if(err)
            sendStatus(500)
    
    
            io.emit('message',req.body)
            res.sendStatus(200)
        })
    
    })
    io.on('connection',(socket)=>{
        console.log('user connected')
    })
    
    mongoose.connect(dbUrl,{useUnifiedTopology: true, useNewUrlParser: true},(err) =>{
    
        console.log('mongodb connection successfull')
    })
    
    var server= http.listen(port, () => {
    
        console.log("Server is listening on port %d",port)
    })

    above is js file

    <!DOCTYPE html>
    <html>
    
    <head>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
        <script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <link rel="shortcut icon" href="#">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
    
    
    
    
    </head>
    <body>
        <div class="container">
            <br>
            <div class="jumbotron">
                <h1 class="display-4">Send Message</h1>
                <br>
                <input  id ="name" class="form-control" placeholder="Name">
                <br>
                <textarea  id ="message" class="form-control" placeholder="Message"></textarea>
                <br>
                <button id="send" class="btn btn-success">Send</button>
    
    
    
            </div>
            <div id="messages">
    
    
            </div>
    
    
    
        </div>
        <script>
    
            var socket=io()
    
            $(()=>  {
                $("#send").click(() =>{
    
               var message={name: $("#name").val(),message: $("#message").val()}
               postMessage(message)
            })
            getMessages()
            })
            socket.on('message',addMessage)
    
            function addMessage(message){
    
                $("#messages").append(`<h4> ${message.name} </h4> <p> ${message.message} </p>`)
            }
            function getMessages(){
    
                $.get('https://tranquil-bastion-57621.herokuapp.com/messages',(data)=>{
    
                    data.forEach(addMessage);
                })
            }
    
            function postMessage(message){
    
                  $.post('https://tranquil-bastion-57621.herokuapp.com/messages',message)
    
    
            }
    
    
        </script>
    
    
    
    
    
    </body>
    
    
    
    
    
    
    </html>

    above is html file
    https://tranquil-bastion-57621.herokuapp.com/messages
    cannot access it pls help

    Rohit Pawar
    @roh8t
       $("#messages").append(`<h4> ${message.name} </h4> <p> ${message.message} </p>`)
            }
            function getMessages(){
    
                $.get('https://tranquil-bastion-57621.herokuapp.com/messages',(data)=>{
    
                    data.forEach(addMessage);
                })
    i want to channge these function to assync Function