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
@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);
View basicResponsive.css
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
View uploader2.py
from gdata.youtube import YouTubeVideoEntry
from gdata.youtube.service import YouTubeService
import gdata
from gdata.service import BadAuthentication, CaptchaRequired
from optparse import OptionParser
import sys
import time
import os
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 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
You can’t perform that action at this time.