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
Switching Between iPhone and Android Is Easier Than You Think

Switching Between iPhone and Android Is Easier Than You Think

iPhone vs. Android is one of the biggest rivalries in the tech world. Switching between the platforms is not something people take lightly. I recently made the switch, and you know what? It’s really not that big of a deal. After using Android phones exclusively for over a decade, I’ve been using an for a few weeks. A lot of differences between the platforms have jumped out at me, but one big thing I noticed was making the switch wasn’t as hard as I thought it would be. You might be overthinking it too.. A Smartphone is a Smartphone There…
Read More
How to Make the Android Home Screen Look Like an iPhone

How to Make the Android Home Screen Look Like an iPhone

iPhone Home Screen Essentials What will we need to replicate the iconic iPhone home screen? First and foremost, it’s the icons—they all have the same rounded-square shape. Up to four apps can be put into the dock at the bottom of the screen, which also has rounded corners. Folders on the iPhone are the same shape as the app icons. They show a preview of up to nine app icons that are in the folder. When you open a folder, it expands to take up the entire screen with the name of the folder at the top. A subtle thing…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.