Skip to content

Instantly share code, notes, and snippets.

🎰
Coding

Ryein Goddard Goddard

🎰
Coding
Block or report user

Report or block Goddard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View palindrome.java
/**
* Description of the class or document.
*
* @author Ryein C. Bowling
* @version CS162 Lab 9, 5.28.2010
*/
import java.io.*;
import java.util.*;
View pdo prepare update
$sql2 = "UPDATE users SET logintime=?, iplog = CONCAT(iplog, ?) WHERE id=? AND iplog NOT LIKE ?";
$query2 = $DB->prepare($sql2);
$query2->execute(array($date_time, $ip ."':'", $id, "'%'". $ip ."'%'"));
View register query
$sql3 = "INSERT INTO vault (username, displayname, password, passwordmd5, email, creationdate, ip)VALUES(?, ?, ?, ?, ?, ?, ?)";
$query3 = $DB->prepare($sql1) or trigger_error($lang_error['INSERT_ERROR'], E_USER_ERROR);
$query3->execute(array($username, $codename, $password, $passwordmd5, $email, $date_time, $ip));
View blink 2 leds
View gist:623532
SELECT TotalAmount
FROM INVOICE
WHERE TotalAmount > 100.00 AND CustomerNumber =
(
SELECT FirstName, LastName
FROM CUSTOMER
WHERE CustomerID = CustomerNumber
)
@Goddard
Goddard / Findgl.cmake
Created Mar 22, 2012
This is the gl cmake module
View Findgl.cmake
INCLUDE (FindPackageHandleStandardArgs)
FIND_PACKAGE(PkgConfig ${gl_FIND_REQUIRED} ${gl_FIND_QUIETLY})
IF (PKG_CONFIG_FOUND)
SET(PKG_CONFIG_PATH_ENV_VAR $ENV{PKG_CONFIG_PATH})
IF (NOT PKG_CONFIG_PATH_ENV_VAR)
IF (gl_FIND_REQUIRED)
MESSAGE (FATAL_ERROR "Environment variable PKG_CONFIG_PATH not set. Setting this variable is required in order for pkg-config to locate installed software packages.")
ENDIF (gl_FIND_REQUIRED)
ENDIF (NOT PKG_CONFIG_PATH_ENV_VAR)
PKG_CHECK_MODULES (gl gl)
View XMLReader.java
import java.net.URL;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.InputSource;
/**
*
* @author goddard
*/
public class XMLReader
@Goddard
Goddard / install-node-npm-ubuntu-raring.sh
Created May 2, 2013 — forked from stephanetimmermans/gist:5496788
Install Node Js and NPM in Ubuntu 13.04
View install-node-npm-ubuntu-raring.sh
sudo apt-get install build-essential libssl-dev curl
# The install script
# Adapted from https://gist.github.com/579814
echo '# Added by install script for node.js and npm in 30s' >> ~/.bashrc
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
echo 'export NODE_PATH=$HOME/local/lib/node_modules' >> ~/.bashrc
. ~/.bashrc
@Goddard
Goddard / form.php
Created Jul 12, 2014
semi-fixed form.php file from ohana
View form.php
<? (defined('_JEXEC') && defined('KOOWA')) or die('Restricted access'); ?>
<style src="media://com_ohanah/lib/cleditor/jquery.cleditor.css" />
<style src="media://com_ohanah/css/jquery-ui.css" />
<style>
.authorInfo {
overflow: hidden;
}
.debug {
color: #555;
margin: 20px;
View imageview.cpp
void ImageView::paintEvent(QPaintEvent*)
{
if (this->imageBuffer.empty()){ return; }
double widgetWidth = this->width();
double widgetHeight = this->height();
QRectF target(0, 0, widgetWidth, widgetHeight);
QImage tempQImage = *this->imageBuffer.at(this->imageBuffer.count()-1);
tempQImage = tempQImage.scaled(rect().size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
You can’t perform that action at this time.