This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? (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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.URL; | |
import javax.xml.parsers.SAXParser; | |
import javax.xml.parsers.SAXParserFactory; | |
import org.xml.sax.InputSource; | |
/** | |
* | |
* @author goddard | |
*/ | |
public class XMLReader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TotalAmount | |
FROM INVOICE | |
WHERE TotalAmount > 100.00 AND CustomerNumber = | |
( | |
SELECT FirstName, LastName | |
FROM CUSTOMER | |
WHERE CustomerID = CustomerNumber | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define F_CPU 1000000 // by default we have the 1MHz internal oscillator | |
#include <avr/io.h> // this contains all the IO port definitions | |
#include <util/delay.h> | |
int main(void) { | |
DDRB = (1 << PB5); // set PORTB5 to an output | |
DDRC = (1 << PC1); // set PORTC1 to an output | |
while (1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 ."'%'")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Description of the class or document. | |
* | |
* @author Ryein C. Bowling | |
* @version CS162 Lab 9, 5.28.2010 | |
*/ | |
import java.io.*; | |
import java.util.*; |
NewerOlder