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
#!/usr/bin/env node | |
console.log ( 'incrementing version' ); | |
var fs = require ( 'fs' ), | |
xml2js = require ( 'xml2js' ); | |
var parser = new xml2js.Parser ( ); | |
fs.readFile ( "config.xml", function ( err, data ) { |
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
<!-- html; put this in your code where you want to display the image stored in the database --> | |
<a href="index.php"><img src="data:image/png;base64,<?php echo base64_encode($MyClass->getLogo())?>" alt="Logo" width="233" height="65" /></a> | |
<!-- php function that queries the database and returns the blog image data --> | |
public function getLogo() | |
{ | |
if ($this->getId()) |
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
function getColor() | |
{ | |
$tod = localtime(); | |
$now = $tod[1] + ($tod[2] * 60.0); | |
$now = $now * (1.0 / (24.0 * 60.0)); | |
$rgb_array = HSV_TO_RGB($now, 0.5, 0.5); | |
$rgb = dechex($rgb_array['R']) . dechex($rgb_array['G']) . dechex($rgb_array['B']); | |
return ($rgb); | |
} |