jQuery is a way of manipulating the DOM (Document Object Model) on a website using JavaScript.

First you set up a basic html document.

<html>
<head>
</head>
<body>
</body>
</html>

Add some paragraphs and buttons which we will be using later to the body:

<body> <p id="paragraph1" class="class1">Paragraph 1</p> <br /> <br /> <p id="paragraph2" class="class1">Paragraph 2</p> <br /> <br /> <p id="paragraph3" class="class2">Paragraph 3</p> <br /> <br /> <p id="paragraph4" class="class3">Paragraph 4</p> <br /> <br /> <p id="paragraph5">Paragraph 5 Text</p> <br /> <br /> <button id="button1">button1</button> <br /> <br /> <button id="button2">button2</button> <br /> <br /> <button id="button3">button3</button> <br…


Once you know JavaScript, you can immediately cause changes in your browser by manipulating the DOM. You can use JavaScript or jQuery to add or remove elements or change values when things are clicked and create an interactive website. However, DOM manipulation requires some excessive steps. If you want to change a displayed number on a website with DOM manipulation, you need to manually reassign the value or text of that element to the new one. If you have a lot of elements that update on changing a single thing, then you need to manually reassign for all of them…


This article will explain some of the basics of PHP and how to use it.

Create a folder.

php_test

CD into the folder and create a new file inside it named:

info.html

First set up a basic HTML page inside of info.html.

<html>
<head>
</head>
<body>
<h1>hi</h1>
<form action="php_test.php" method="post">
First Name:
<br />
<input type="text" name="firstname" />
<br />
Last Name:
<br />
<input type="text" name="lastname" />
<br />
<input type="submit" />
</form>
</body>
</html>

The action inside of form lets you link the page with a PHP file. …


My previous article on the basics of Node.js (https://medium.com/future-vision/basics-of-node-js-46bf6e7a1a3b) explained some of the basics of Node.js as well as how it might function as an API.

This article will go more in depth and combine Node.js with MongoDB to make a full-on backend api involving accounts.

1. Create a folder and cd into it.

2. npm init

3. npm install express nodemon

(nodemon makes it so that the changes in the files are automatically detected and the server restarted, so that you don’t have to keep restarting it manually).

4. Inside the file package.json …


Node.js is a runtime environment for executing JavaScript code based on Google’s JavaScript Engine, V8

Node.js is basically like going to your console inside of a web browser. It is good for building APIs, and is one of the few ways to create a backend using JavaScript.

One of the main benefits is that Node.js is asynchronous, meaning that when fetching from an API rather than waiting until they get the result before the next step, Node will proceed to next next step while waiting. Now lets jump into some basics!

Download node here: https://nodejs.org/en/

mkdir app-namecd app-nameatom . (or editor of your choice)touch app.js

Enter some random code:

function sayHello(name) {…


SQL stands for Structured Query Language, and is used to communicate with a database. This article will go through some of the basics of SQL!

1. Create Database

CREATE DATABASE database_nameCREATE DATABASE hero_database

2. Create Table

CREATE TABLE table_name (
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
);
CREATE TABLE heroes(
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER,
ability TEXT
);

3. Constraints

Used when a table is created (or altered later) to limit the type of data put inside. There are column level and table level restraints.

CREATE TABLE table_name ( id INTEGER PRIMARY KEY, name…


Some of the basic concepts when getting started with Java!

0. Printing Stuff

System.out.println(statement);

Prints out whatever the statement is to the console. This is Java’s version of puts/prints/console.log.

  1. Variables

Variables are written using camel case.

variable
variableTwo

When declaring a variable it you should include its data type. There are 8 basic data types, a byte (8 bit signed integer between -128 to 127), a short (16 bit signed integer between -32,768 to 32,767), an int (32 bit signed integer between -2³¹ to 2³¹-1), a long (64 bit signed integer between -2⁶³ to 2⁶³-1), a float (decimal number), a…


I will go over how to set up routing in react!

React routing works by manipulating your window. If you open up the console and type “window.history” you get back something like:

History {length: 4, scrollRestoration: "auto", state: null}

You can change the state by doing:

window.history.pushState({newState: "This is a new state!"}, "new state", "new-state")

If you type “window.history” again you will see that the result has changed. You set the state to the object {newState: “This is a new state!”}, and you will see at the end of the url there is now a “new-state” added to it.

If…


Hello! Previously I wrote an article on how to set up a GraphQL server using Ruby on Rails (https://medium.com/@nickyliu91/setting-up-graphql-with-ruby-on-rails-f0494e6e35c0). Now I will go over how to connect it to a React.js application using Apollo!

Install Apollo and all of its dependencies.

npm install apollo-boost react-apollo graphql-tag --save

At this point I got the following error:

react--apollo@2.5.6 requires a peer of apollo-client@beta but none is installed. You must install peer dependencies yourself.

You can fix this error by running:

npm install apollo-client@beta react-apollo graphql-tag --save# the part after "apollo-client@" will probably be modified based on what the error said you…


Restful APIs are pretty useful, but there is often the problem of over-fetching. The only way to get the name of a person is to fetch a person and get all of their attributes, including needless information like height, gender, race, etc. This is where graphQL comes in! In graphQL you have the ability to fetch specific attributes only, so say goodbye to fetching too much data! Today I will go over the basics of how to create a graphQL backend.

Start by creating a file.

rails new sample-graphqlcd sample-graphqlrails db:createrails s

Add gem “graphql” to the…

Nicky Liu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store