Sponsored Content
Top Forums Programming Programming a Telegram Bot Using Node-RED, PHP, and MySQL Post 303044841 by Neo on Thursday 5th of March 2020 12:55:32 AM
Old 03-05-2020
Quote:
Originally Posted by RavinderSingh13
Thanks a TON Neo for sharing this Smilie It really helps to all of us who want to learn.
After getting inspired from your highly, I too started, yesterday installed node-red in windows system and created a very basic flow of reading a csv file and reading Earthquake data from tutorial itself as of now Smilie

you are really GREAT in learning things FAST(I.T techs), I have never seen a person learning this much fast honestly saying Smilie

Let me see if I could prepare one and share it here too with all of us Smilie

Thanks,
R. Singh
Thanks Ravinder,

Yes, everyone who knows me well, knows I am a systems engineer at heart love, learning new things and building new apps, cross domain, with new tech. That's just me. I have no "system or domain" religion about tech. It's all use a "tool in the big toolbox" as far as I am concerned.

Thanks for the kind words, Ravinder.

I always try to keep the mind of the beginner, even after many decades of IT experience, and so I keep trying, learning and building new things.

But that approach also can bring criticism from those who love to use (or remain nostalgic for) the same old technology introduced decades (or just a few years) ago, religiously; and my "tech style" also will result in criticism from those who are more of tech "purists".

Honestly, the criticism does not bother nor influence me. Everyone should dance to the music of their own life. To each his or her own, as they say!

Cheers and Thanks Again for the Kind Words, Ravinder!

Anyway, Node-RED is fun and easy to use, I think, especially if you love to program already. I already program "OK" (not great) in Javascript, so this makes Node-RED much easier, I think; and since I already write a lot of PHP code, it's also easy to call PHP scripts (any scripts, actually) from Node-RED as well.
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
criticism(3pm)						User Contributed Perl Documentation					    criticism(3pm)

NAME
criticism - Perl pragma to enforce coding standards and best-practices SYNOPSIS
use criticism; use criticism 'gentle'; use criticism 'stern'; use criticism 'harsh'; use criticism 'cruel'; use criticism 'brutal'; use criticism ( -profile => '/foo/bar/perlcriticrc' ); use criticism ( -severity => 3, -verbose => '%m at %f line %l' ); DESCRIPTION
This pragma enforces coding standards and promotes best-practices by running your file through Perl::Critic before every execution. In a production system, this usually isn't feasible because it adds a lot of overhead at start-up. If you have a separate development environment, you can effectively bypass the "criticism" pragma by not installing Perl::Critic in the production environment. If Perl::Critic can't be loaded, then "criticism" just fails silently. Alternatively, the "perlcritic" command-line (which is distributed with Perl::Critic) can be used to analyze your files on-demand and has some additional configuration features. And Test::Perl::Critic provides a nice interface for analyzing files during the build process. If you'd like to try Perl::Critic without installing anything, there is a web-service available at <http://perlcritic.com>. The web- service does not yet support all the configuration features that are available in the native Perl::Critic API, but it should give you a good idea of what it does. You can also invoke the perlcritic web-service from the command line by doing an HTTP-post, such as one of these: $> POST http://perlcritic.com/perl/critic.pl < MyModule.pm $> lwp-request -m POST http://perlcritic.com/perl/critic.pl < MyModule.pm $> wget -q -O - --post-file=MyModule.pm http://perlcritic.com/perl/critic.pl Please note that the perlcritic web-service is still alpha code. The URL and interface to the service are subject to change. CONFIGURATION
If there is exactly one import argument, then it is taken to be a named equivalent to one of the numeric severity levels supported by Perl::Critic. For example, "use criticism 'gentle';" is equivalent to setting the "-severity => 5", which reports only the most dangerous violations. On the other hand, "use criticism 'brutal';" is like setting the "-severity => 1", which reports every violation. If there are no import arguments, then it defaults to 'gentle'. If there is more than one import argument, then they will all be passed directly into the Perl::Critic constructor. So you can use whatever arguments are supported by Perl::Critic. The "criticism" pragma will also obey whatever configurations you have set in your .perlcriticrc file. In particular, setting the "criticism-fatal" option to a true value will cause your program to immediately "die" if any Perl::Critic violations are found. Otherwise, violations are merely advisory. This option can be set in the global section at the top of your .perlcriticrc file, like this: # Top of your .perlcriticrc file... criticism-fatal = 1 # per-policy configurations follow... You can also pass "('-criticism-fatal' => 1)" as import arguments, just like any other Perl::Critic argument. See "CONFIGURATION" in Perl::Critic for details on the other configuration options. DIAGNOSTICS
Usually, the "criticism" pragma fails silently if it cannot load Perl::Critic. So by not installing Perl::Critic in your production environment, you can leave the "criticism" pragma in your production source code and it will still compile, but it won't be analyzed by Perl::Critic each time it runs. However, if you set the "DEBUG" environment variable to a true value or run your program under the Perl debugger, you will get a warning when "criticism" fails to load Perl::Critic. NOTES
The "criticism" pragma applies to the entire file, so it is not affected by scope or package boundaries and "use"-ing it multiple times will just cause it to repeatedly process the same file. There isn't a reciprocal "no criticism" pragma. However, Perl::Critic does support a pseudo-pragma that directs it to overlook certain lines or blocks of code. See "BENDING THE RULES" in Perl::Critic for more details. AUTHOR
Jeffrey Ryan Thalhammer <thaljef@cpan.org> COPYRIGHT
Copyright (c) 2006-2007 Jeffrey Ryan Thalhammer. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.12.4 2011-11-08 criticism(3pm)
All times are GMT -4. The time now is 05:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy