TECHNOLOGY

Node.js NPM

Node.js NPM

What is NPM? NPM is a package manager for Node.js packages, or modules if you like. www.npmjs.com hosts thousands of free packages to download and use. The NPM program is installed on your computer when you install Node.js NPM is already ready to run on your computer! What is a Package? A package in Node.js contains all the files you need for a module. Modules are JavaScript libraries you can include in your project. Download a Package Downloading a package is very easy. Open the command line interface and tell NPM to download the package you want. I want to…
Read More
Node.js HTTP Module

Node.js HTTP Module

The Built-in HTTP Module Node.js has a built-in module called HTTP, which allows Node.js to transfer data over the Hyper Text Transfer Protocol (HTTP). To include the HTTP module, use the require() method: var http = require('http'); Node.js as a Web Server The HTTP module can create an HTTP server that listens to server ports and gives a response back to the client. Use the createServer() method to create an HTTP server: Example var http = require('http');//create a server object: http.createServer(function (req, res) { res.write('Hello World!'); //write a response to the client res.end(); //end the response }).listen(8080); //the server object…
Read More
MySQL Create Table

MySQL Create Table

Creating a Table To create a table in MySQL, use the "CREATE TABLE" statement. Make sure you define the name of the database when you create the connection: Example Create a table named "customers": var mysql = require('mysql'); var con = mysql.createConnection({ host: "localhost", user: "yourusername", password: "yourpassword",   database: "mydb" }); con.connect(function(err) { if (err) throw err; console.log("Connected!"); var sql = "CREATE TABLE customers (name VARCHAR(255), address VARCHAR(255))"; con.query(sql, function (err, result) { if (err) throw err; console.log("Table created"); }); }); Run example » Save the code above in a file called "demo_create_table.js" and run the file: Run "demo_create_table.js"…
Read More
Node.js Upload Files

Node.js Upload Files

  The Formidable Module There is a very good module for working with file uploads, called "Formidable". The Formidable module can be downloaded and installed using NPM: C:UsersYour Name>npm install formidable After you have downloaded the Formidable module, you can include the module in any application: var formidable = require('formidable'); Upload Files Now you are ready to make a web page in Node.js that lets the user upload files to your computer: Step 1: Create an Upload Form Create a Node.js file that writes an HTML form, with an upload field: Example This code will produce an HTML form: var http…
Read More
How to Get Lock Screen Widgets on Android

How to Get Lock Screen Widgets on Android

Android actually supported lock screen widgets long before the iPhone did. It was officially added way back in 2012 with . However, the feature was removed two versions later with Android 5.0 Lollipop. So let’s bring it back. Lock Screen Widgets for Android Since Android doesn’t officially support lock screen widgets, we’ll need the help of a third-party app. Keep in mind that this is a bit of a hacky method, so it may not work perfectly. The app we’ll be using is called “,” and it costs $1.49. After installing the app, you’ll be greeted with a few pages…
Read More
What is the new language to replace PHP? If someone were to make a social networking site like Facebook, what language would you recommend to them, taking into consideration the few million people on at any single given time, speed, efficiency, etc.?

What is the new language to replace PHP? If someone were to make a social networking site like Facebook, what language would you recommend to them, taking into consideration the few million people on at any single given time, speed, efficiency, etc.?

PHP is dying, Java is dying, C# is dying, SQL is dying, Javascript is dying, C is dying. And yet each one of these has probably more currently-ongoing projects than all others combined. Yes, things that have been supplanted by other things tend to slowly fade out but it’s a very slow fade and it doesn’t mean that they’re bad. (Edit: So many people seem to be reading the first paragraph and completely missing the point so I’ll just say it very explicitly. Talking about a programming language dying is pointless. Now let’s get back to the interesting part of the question.)…
Read More
Here’s How to Get Google Assistant on the Galaxy Watch 4

Here’s How to Get Google Assistant on the Galaxy Watch 4

Samsung revealed earlier this week that Google Assistant was finally rolling out to the Galaxy Watch 4, which has only had Samsung’s Bixby virtual assistant since the watch was released last year. The good news is that it’s showing up on watches automatically without the need to do anything — in my case, the Assistant icon appeared at the bottom of my watch’s app list, and tapping it started the setup process. If you don’t see Google Assistant yet, Droid Life pointed out you can force the installation by for “Google Assistant for wearables,” and then choosing your watch as…
Read More
Android Notifications Are Still Miles Ahead of the iPhone

Android Notifications Are Still Miles Ahead of the iPhone

I’ve been using for over a decade, but I recently started using an iPhone full-time. The notifications situation is one area that I have a lot of thoughts about. Android’s notification system has more or less been the same since the beginning, yet I still think it’s better. Lock Screen vs. Notification Center Let’s start things off with perhaps the most frustrating area of iPhone notifications. Not including home screen badges, there are two places where notifications appear: the and the . The lock screen and Notification Center are treated as completely separate things. Technically, you only see recent notifications—-ones that…
Read More
People Won’t Stop Selling Unreleased Google Pixel Phones

People Won’t Stop Selling Unreleased Google Pixel Phones

The bizarre series of events started with a Pixel 7 prototype appearing for sale on eBay (after reportedly showing up on Facebook Marketplace first). The listing didn’t reveal any new surprising details, but it’s not every day that a phone that won’t be officially released for several months (an October launch is likely) shows up for sale. Even better, the reflection in the eBay photos revealed a Pixel 7 Pro was used as the camera. The listing was taken down after a few hours — presumably when someone at Google noticed. 9to5Google/eBay Not long after, someone on Reddit with the…
Read More
Google Explains Your Android Phone’s Broken Notifications

Google Explains Your Android Phone’s Broken Notifications

Modern versions of Android strike a decent balance between extending battery life (by pausing or limiting background tasks) and still staying connected to cloud servers that provide push notifications. However, some manufacturers take that a step further for their devices, by implementing more battery-saving techniques that can lead to background services breaking. OnePlus has had issues over the years with unreliable notifications, as well as the . Some of Google’s Android team held a Q&A panel at Google I/O this week, where an app developer asked what they could do in their app to work around aggressive battery life management…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.