Skip to content

Instantly share code, notes, and snippets.

@nomanson
nomanson / default.css
Created September 14, 2014 20:25
46h 2014E, 1. semester, Exercise 3.2 - layout.html: Basic HTML layout using relative positioning and floats.
/* general tag styles */
html {
/* background: #ccc url('../images/960_grid_12_col.png') top center no-repeat; */
}
body {
font-family:verdana,helvetica,sans-serif;
width:960px;
margin:auto;
color:#fff;
@nomanson
nomanson / boxes.html
Created September 14, 2014 20:16
Boxes: Exercise in HTML element Flow and relative positioning.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="Jan Ingemansen" name="author">
<link href="css/reset_html5.css" rel="stylesheet" type="text/css">
<link href="css/default.css" rel="stylesheet" type="text/css">
<title>
Boxes
</title>
@nomanson
nomanson / fiddle.css
Last active December 15, 2015 00:19
Form Validation I
.errorMessage {
color: red;
}
@nomanson
nomanson / makeItLink.php
Created August 4, 2012 20:50
PHP make it link class
@nomanson
nomanson / debugFile.php
Created August 4, 2012 20:48
PHP create debug file
$myFile = 'testFile.txt';
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = 'project: ' . $project . "\n";
$stringData .= 'executed: ' . date('l jS \of F Y h:i:s A') . "\n";
fwrite($fh, $stringData);
fclose($fh);
@nomanson
nomanson / formatDateTime.php
Created August 4, 2012 20:46
PHP function for formatting date and time
function format_datetime($examine_query)
{
$split_query = explode("FROM", $examine_query);
$result = mysql_query($examine_query);
$numfields = mysql_num_fields($result);
for ($i = 0; $i < $numfields; $i++)
{
$field_info = mysql_field_type($result, $i);
$field_name = mysql_field_name($result, $i);
@nomanson
nomanson / makeHTMLTable.php
Created August 4, 2012 20:32
PHP make html table function
function make_table($sql)
{
$res = mysql_query("$sql");
if (!$res)
{
die("Query to show fields from table failed");
}
$rows_num = mysql_num_rows($res);