Sponsored Content
Top Forums Programming Programming a Telegram Bot Using Node-RED, PHP, and MySQL Post 303045168 by Neo on Friday 13th of March 2020 12:31:55 AM
Old 03-13-2020
Yes, I agree many company will not permit an app like Telegram, especially a big company like yours.

On this point, I cannot advise how to proceed because your companies risk management team will set the policy of what can and cannot be done.

Always work with your IT risk management team in a step-by-step manner, because they are important partners in IT projects!
This User Gave Thanks to Neo For This Post:
 

7 More Discussions You Might Find Interesting

1. Red Hat

Can't uninstall MYSQL from RED HAT ES

Hi Everyone Could you kindly advise on how I should do a chkconfig and uninstalling mysql rpm on Red hat ES.Please check the errors that I'm getting below. :eek: I need to uninstall MySQL completely from my linux system ver 2.4.21-37 and use the chkconfig command to switch it on... (15 Replies)
Discussion started by: CollenM
15 Replies

2. What is on Your Mind?

Telegram Bots - Bot Code Examples

I'm currently looking into ways to integrate the Telegram API into the forums: Telegram Bots - Bot Code Examples I'm thinking, first off, to use the Telegram API to get forum alerts and notifications (to Bot or Not?). Second, I thinking of ways to more deeply integrate Telegram into the... (5 Replies)
Discussion started by: Neo
5 Replies

3. Web Development

Node.js and mysql - ER_ACCESS_DENIED_ERROR

This problem has been killing me all day, and I cannot solve it. Basically, I am using node.js with the mysql module and it will not connect to the database. Here is the JS code snippet in node.js: app.get("/test", function(req, res) { var mysql = require("mysql"); var con =... (4 Replies)
Discussion started by: Neo
4 Replies

4. Infrastructure Monitoring

Using Node-RED and MQTT to Monitor Server and Application Stats

After setting up MQTT and testing some ESP8266 and ESP32 modules, where I noted that testing in Programming ESP32 (ESP-WROOM-32) as an MQTT Client Subscribed to Linux Server Load Average Messages, I was so impressed with MQTT that I installed MQTT on three different computers, instantly and... (2 Replies)
Discussion started by: Neo
2 Replies

5. Programming

Publish and Subscribe to AES-256 Encrypted MQTT Messages to Node-RED from PHP Scripts

Various Node-Red crypto modules do not work with PHP, so to send an encrypted message from a PHP script (in this case from a Ubuntu server) to Node-RED we need our own code. After a few hours of searching, testing various libs, more testing and debugging, I got this PHP to Node-RED code... (0 Replies)
Discussion started by: Neo
0 Replies

6. Programming

Node-RED: Writing MQTT Messages to MySQL DB with UNIX timestamp

First, I want to thank Neo (LOL) for this post from 2018, Node.js and mysql - ER_ACCESS_DENIED_ERROR I could not get the Node-RED mysql module to work and searched Google until all my links were purple! I kept getting ER_ACCESS_DENIED_ERROR with the right credentials. Nothing on the web was... (0 Replies)
Discussion started by: Neo
0 Replies

7. What is on Your Mind?

MQTT, Node-RED, Linux, Apache2, MySQL, PHP, Telegram, ESP32, ESP8266, Arduino

I have just completed the first phase of integrating all these devices and technologies: MQTT, Node-RED, Linux, Apache2, MySQL, PHP, Telegram, ESP32, ESP8266, and the Arduino Uno The glue that binds all this together is MQTT. In fact, MQTT makes this kind of integration nearly trivial to... (1 Reply)
Discussion started by: Neo
1 Replies
Node(3pm)						User Contributed Perl Documentation						 Node(3pm)

NAME
Tree::RedBlack::Node - Node class for Perl implementation of Red/Black tree SYNOPSIS
use Tree::RedBlack; my $t = new Tree::RedBlack; $t->insert(3, 'dog'); my $node = $t->node(3); $animal = $node->val; DESCRIPTION
A Tree::RedBlack::Node object supports the following methods: key () Key of the node. This is what the nodes are sorted by in the tree. val ($) Value of the node. Can be any perl scalar, so it could be a hash-ref, f'rinstance. This can be set directly. color () Color of the node. 1 for "red", 0 or undef for "black". parent () Parent node of this one. Returns undef for root node. left () Left child node of this one. Returns undef for leaf nodes. right () Right child node of this one. Returns undef for leaf nodes. min () Returns the node with the minimal key starting from this node. max () Returns the node with the maximal key starting from this node. successor () Returns the node with the smallest key larger than this node's key, or this node if it is the node with the maximal key. predecessor () Similar to successor. WARNING: NOT YET IMPLEMENTED!! You can use these methods to write utility routines for actions on red/black trees. For instance, here's a routine which writes a tree out to disk, putting the byte offsets of the left and right child records in the record for each node. sub dump { my($node, $fh) = @_; my($left, $right); my $pos = tell $fh; print $fh $node->color ? 'R' : 'B'; seek($fh, 8, 1); print $fh $node->val; if ($node->left) { $left = dump($node->left,$fh); } if ($node->right) { $right = dump($node->right,$fh); } my $end = tell $fh; seek($fh, $pos+1, 0); print $fh pack('NN', $left, $right); seek($fh, $end, 0); $pos; } You would call it like this: my $t = new Tree::RedBlack; ... open(FILE, ">tree.dump"); dump($t->root,*FILE); close FILE; As another example, here's a simple routine to print a human-readable dump of the tree: sub pretty_print { my($node, $fh, $lvl) = @_; if ($node->right) { pretty_print($node->right, $fh, $lvl+1); } print $fh ' 'x($lvl*3),'[', $node->color ? 'R' : 'B', ']', $node->key, " "; if ($node->left) { pretty_print($this->left, $fh, $lvl+1); } } A cleaner way of doing this kind of thing is probably to allow sub-classing of Tree::RedBlack::Node, and then allow the Tree::RedBlack constructor to take an argument saying what class of node it should be made up out of. Hmmm... AUTHOR
Benjamin Holzman <bholzman@earthlink.net> SEE ALSO
Tree::RedBlack perl v5.10.0 2008-07-31 Node(3pm)
All times are GMT -4. The time now is 12:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy