Showing posts with label Software. Show all posts
Showing posts with label Software. Show all posts

SQL Quick Guide

SQL is standard language for access databases. SQL (Structured Query Language) is use for storing, manipulating and retrieving data from database. There are many relational database management system that use SQL as standard database system. For example: MySQL, SQL Server,  MS Access, Oracle, etc.

Tables

A table is composed of records and fields that hold data. All data in one table having relation as the table name. Tables are called datasheets too.

Records

A record is composed of fields. One record is contain different fields that have the same ID. Records are also called row.

Fields

A Field is composed of one data. A Field is the intersection between a row and a column. If you have 2 rows and 2 columns, then you have 4 fields.

Some common syntax of SQL:

SQL Select:
SELECT column_1, column_2, ...column_n
FROM table_name;
SQL Insert:
INSERT INTO  table_name ( column_1, column_2, ...column_n )
VALUES ( value_1, value_2, ...value_n );
SQL Update:
UPDATE table_name SET
column_1 = value_1, column_2 = value_2, column_n = value_n
WHERE column = value;
SQL Delete:
DELETE FROM table_name
WHERE column = value;

SQL Where:
WHERE column= value;
SQL Order By:
ORDER BY column { ASC | DESC };
SQL Create Table:
CREATE TABLE table_name {
column_1 datatype (size),
column_2 datatype (size);
column_n datatype (size);
PRIMARY KEY (one or more columns);
}
SQL Drop Table:
DROP table_name;
SQL Alter Table:
ALTER TABLE table_name { ADD | MODIFY | DROP } column { datatype };
SQL Create Database:
CREATE DATABASE database_name;
SQL Drop Database:
DROP DATABASE database_name;



How To Overclock a GPU

Helolo everyone!


Today I will be showing you how to overclock a GPU.
In this case, I will be using a MSI variant of the GTX 1050 Ti paired with MSI Afterburner for our overclocking needs!

 If you don't know what Afterburner is then read this "MSI Afterburner is the world’s most recognized and widely used graphics card overclocking utility which gives you full control of your graphics cards. It also provides an incredibly detailed overview of your hardware and comes with some additional features such as customizing fan profiles, benchmarking and video recording. MSI Afterburner is available completely free of charge and can be used with graphics cards from all brands." ~MSI.com

Also just to let you know, WE ARE NOT RESPONSIBLE FOR DAMAGE OF YOUR PC AND/OR PC PARTS!

Now... that is out of the way, let's begin our OVERCLOCKING!!!

To begin, install and open up MSI Afterburner.
You should be greeted with a window looking similar to this.
Every thing is at stock speeds right now, so let's bring them up!
On my GPU the Core Voltage is locked so I cannot use that.
If you have an unlocked Core Voltage GPU, than you can use Google for that.(I will not cover that in this post ;)

First, bring the power limit all the way up to 100%.
Then, add +10 to the Core Clock and +100 to the Memory Clock.
After doing that, hit the check mark to apply changes.
Now you need to do some stability testing with Unigine Valley.
(Download and install it)
Open that up, set it to "Extreme HD" and click "Run".

Than click the Benchmark button at the top, and let it do its work.
If your GPU is stable, it will complete the benchmark and give your results.
If it crashes, then go back to Afterburner and bring things down.

Repeat these steps until you reach your MAXIMUM overclock.

You should now have your GPU at its maximum potential.
If this post helped you, be sure to leave a comment down below!

How To Use Bootstrap



What is Bootstrap?
Bootstrap is a free front-end framework that includes typography, form, tables, navigation, image design and many other. This framework is easily to use and very useful to make responsive webdesign. Responsive webdesign is a web which automatically adjust their size and performance on all device, so it can be looks good in mobile size until desktop size.

Where to get bootstrap?
You can get bootstrap from:
- open source (bootstrap CDN)
What you need is just to include this jquery below to host a bootstrap from a CDN (Content Delivery Network)


 <!-- CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<!-- JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

- download bootstrap
You can download bootstrap and host it by yourself. Go to getbootstrap.com to get the latest version of bootstrap.

Create a Webpage Using Bootstrap

There are three things that you need to know in making a webpage using bootstrap:

1. Add HTML5 doctype
 Bootstrap is using HTML5 for all webpage. So, you need to add HTML5 doctype:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  </head>
</html>

 2. Add meta tag for mobile responsive
 Bootstrap is support for mobile responsive that called bootstrap3. Add this meta tag in head element to ensure touch zooming and proper rendering:

 <meta name="viewport" content="width=device-width, initial-scale=1">

3. Choose containers
There are two type of basic containers in bootstrap:

- .container: this class provides a responsive fixed container
- .container-fluid: this class provides a full width container

Example of Bootstrap Page
This is a very simple example of webpage that using bootstrap, we hope this can help you get any idea about how to use bootstrap.

 <!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h1>Bootstrap Page Example</h1>
  <p>Here is some text that you can put.</p>
</div>

</body>
</html>



How To Setup a Minecraft Server on Raspberry Pi

Helolo everyone!

Setting up the Raspberry Pi Minecraft Server

Okay, first we will need to install Raspbian on the Raspberry Pi. 
If you have not done this yet, a quick Google search should help you out ;)
  1. First let's update the Raspberry Pi to the latest versions using this:
    sudo apt-get update
    sudo apt-get upgrade
  2. Now open raspi-config so we can change some settings:
sudo raspi-config
(if you want more help with the raspi-config, tell me below)
  1. Now inside of raspi-config, go to Advanced Options->Memory Split, and change it to 16. (This will make more memory free for the server)
  2. Also you do NOT want to boot into Raspbian desktop so make sure you Enable Boot to desktop/scratch goes to command line.
  3. Set overclocking to High. (If possible, :( I could not on my Pi )
  4. Finally enable SSH so we can connect the Pi remotely if required (Unless you already have it enabled drrrr).
  5. Now go to finish and reboot/restart.
  6. I will want the IP address of your Pi for when I try to connect to to your server. LOL just kidding!     We need to get our Pi's IP address for when we try to connect to our servers. Get you IP by typing this command:
sudo hostname -I
  1. Next we NEED to install Java, because the Raspberry Pi Minecraft Server NEEDS IT to run. To do this we will need to get it from the Java website.(If you’re on the latest version of Raspbian (Raspbian Jessie with PIXEL) you can skip to step 13 as Java is pre-installed on Raspbian Jessie with PIXEL.)
sudo wget --no-check-certificate http://www.java.net/download/jdk8u60/archive/b25/binaries/jdk-8u60-ea-bin-b25-linux-arm-vfp-hflt-21_jul_2015.tar.gz
  1. Now YOU MUST run the following command to unzip the file into the opt folder.
sudo tar zxvf jdk-8u60-ea-bin-b25-linux-arm-vfp-hflt-21_jul_2015.tar.gz -C /opt
  1. To check that it unzipped properly and is usable I COMMAND YOU TO run the following command:
sudo /opt/jdk1.8.0_60/bin/java -version
  1. Now we will need the Minecraft server file, we’re going to use a builder tool that is supplied by spigot, to get this enter the following commands:
sudo mkdir /home/minecraft
cd /home/minecraft
sudo wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
  1. Now you will want to run the build tools file so it creates your spigot server. It will take about 15-60 minutes to finish. Add --rev 1.10.2 to the end of the command to get the latest version. Don’t forget to change 1.10.2 in the command to the latest version number.
    Note: If you’re on the latest version of Raspbian you can remove /opt/jdk1.8.8_60/bin/ from this command and any other command that contains it).
sudo /opt/jdk1.8.0_60/bin/java -jar BuildTools.jar
Important: If you have a Raspberry Pi B+/B or any variation before the Raspberry Pi 2 then the build tools WILL, AND MUST, FAIL! You can instead download the spigot.jar directly from file mirror using the following command:
sudo wget http://www.mediafire.com/download/pg7xzshq5cdmfjx/spigot-1.10.2.jar
If you want a older version for some reason(I did it for the Moon mod, yeah!) you can simply change the number at the end (e.g. 1.10.2 changed to 1.7.10 ect).
  1. To make sure the spigot server successfully downloaded and saved simply type ls and should see spigot.jar.
ls
Make sure you remain in the /home/minecraft folder as we want all the server files to be created in here. If you start the server in a different folder it will create the files in there.
  1. Now you can start your server. (You may need to change the version number depending on what version you’re using eg. spigot-1.10.2.jar)
Raspberry Pi
sudo /opt/jdk1.8.0_60/bin/java -Xms256M -Xmx496M -jar /home/minecraft/spigot-1.10.2.jar nogui
Raspberry Pi 2 & 3
sudo /opt/jdk1.8.0_60/bin/java -Xms512M -Xmx1008M -jar /home/minecraft/spigot-1.10.2.jar nogui
Now the server should HALT right away because you MUST agree to the Eula. You (and I :P)can do this by opening the Eula by typing(Man..that words been used to many times) sudo nano eula.txt and change "false" to "TRUE" or "true" or "True" or "truE" or whatever way you want.
  1. Now start it up AGAIN, it will take a while to create a map so give it about 5-15 minutes. If you ever reboot it will only take 30-60 seconds to load if the map has already been created.
  2. The server should now be running and connectable over your local network.
  3. The Raspberry Pi Minecraft server will now run fine but YOU may want to do some "optimizations" to speedup that slug(server).
So I hope you had fun!(I did :P)
And make sure to comment if you want some speederupping tricks.

Thanks for reading!
Techie Pocket