Skip to content

Instantly share code, notes, and snippets.

View ShaneCunn's full-sized avatar

Shane Cunningham ShaneCunn

  • Sleepless
  • Galway, Ireland
View GitHub Profile
package Question1;
import java.util.LinkedList;
public class Question1 implements Runnable {
// Linkedlist is faster if your search for data in the beginning or the
// middle of the array
private static final LinkedList<Character> infiList = new LinkedList<>();
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package calculator;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
{
"id": 1,
"name": "A green door",
"price": 12.50,
"tags": ["home", "green"]
}
@ShaneCunn
ShaneCunn / cv.txt
Created April 25, 2017 13:59
cv desc
Presently completing a Java 8 Programmer Certification course to complement my IT skills and knowledge. Also Completed a Higher Diploma in Software Design and Development with MCSA. With four years’ experience as a system administrator for E-commerce website’s and a sound understanding of configuring and installing Microsoft and Linux operating systems. Highly skilled in creating visual user guides to reduce IT support requests.
I was previously engaged in a software internship developer internship with Sidero Ltd which included testing software and servers during a system upgrade. My greatest strengths are being able to write Java programs in accordance with a brief, investigate and analyse defects. I consider myself to be a result-oriented, dependable, and capable worker; who is not easily affected by job stress and will be a strong asset to your department and organisation in a variety of duties. I am certainly receptive to any company training and I am a fast learner in any on the job training situation
@ShaneCunn
ShaneCunn / bootstrap.html
Last active August 14, 2018 07:28
bootstrap cdn
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="description" content=""/>
<meta name="author" content=""/>
@ShaneCunn
ShaneCunn / configDB.php
Last active May 1, 2023 12:37
Ajax php mysql DataTables example that get data from mysql database using ajax, that calls a php method
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'passwordForDB');
define('DB_NAME', 'DatabaseName');
$DBconnect = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
@ShaneCunn
ShaneCunn / scripts.html
Last active March 20, 2018 21:22
CSS and Javascript Scripts
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap.min.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/r/dt/dt-1.10.9/datatables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"></script>
<div class="container">
<div class
<div class="header"><h1>Server side DataTable demo in Php,Mysql and Ajax </h1></div>
<div class="container">
<table id="employee-grid" class="table table-striped table-bordered" style="width:100%">
<thead>
<tr>
<th>Employee name</th>
<th>Salary</th>
<th>Age</th>
$(document).ready(function () {
var dataTable = $('#employee-grid').DataTable({
"responsive": true,
"processing": true,
"serverSide": true,
"ajax": {
url: "ajax/response.php", // json datasource
data: {action: 'getEMP'}, // Set the POST variable called action to contain getEMP
type: 'post', // method , by default get
},
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'passwordForDB');
define('DB_NAME', 'DatabaseName');
$DBconnect = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
//echo "Connect Successfully. Host info: " . mysqli_get_host_info($DBconnect);
if (!$DBconnect) {
die("Connection failed: " . mysqli_connect_error());
}