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
How to Unblock a Number on Android

How to Unblock a Number on Android

Open the Phone app and tap the three-dot icon in the search box. Select “Settings” followed by “Blocked Numbers.” Find the number you want to unblock and hit the X button next to it. Confirm your choice by tapping “Unblock.” If you’d like to start receiving calls and , you’ll have to unblock that number on your Android phone. It’s quick and easy to do this on most phones and we’ll show you how. Note that if your blocked number has tried to reach out to you in the past, you won’t see their missed calls in your call log…
Read More
How to Empty the Trash on Android

How to Empty the Trash on Android

In this guide, we’ll cover how to empty the trash for Google Photos and Files by Google, which are two of the popular gallery and file manager apps for this operating system. If you use a different app, check the “Recently Deleted” folder, “Trash,” or similar places to find and . Clear the Trash in Google Photos To and videos, first, launch the Google Photos app on your Android phone. In Photos’ bottom bar, tap “Library.” On the “Library” screen, at the top, tap “Trash.” On the “Trash” page, in the top-right corner, tap the three dots. From the three-dot…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.