Category Archives: pixels

WordPress Slider Auto Start

http://wordpress.org/support/topic/twenty-fourteen-slider-not-slide?replies=4#post-5046422

Here’s the code to be added to functions.php for the twentyfourteen template

function add_script_in_footer(){
?>
<script type="text/javascript" charset="utf-8">
    jQuery(document).ready(function(){
        var change_every = 5; // The number of seconds that the slider will auto-advance in
        var current = 1;
        function auto_advance(){
            if(current == -1) return false;
            jQuery('#featured-content .slider-next').eq(current % jQuery('#featured-content .slider-next').length).trigger('click', [true]);
            current++;
        };
        setInterval(function(){auto_advance()}, change_every * 1000);
    });
</script>
<?php
}
add_action('wp_footer', 'add_script_in_footer');

1 million meter year

Close to a million meter year, I wrote a function to calculate the average miles per week remaining.

zrfinzomrun3

function goMiles()
{
var minutes = 1000*60;
var hours = minutes*60;
var days = hours*24;

//used this to get date into the correct format for
var dd = new Date();
var ddom = dd.getDate();
var dmoy = dd.getMonth() + 1; //add one bc returns 0-11
var dyr = dd.getFullYear();
var ddate = dmoy + “/” + ddom + “/” + dyr;

//var cdate = document.getElementById(‘myDate’).value;  // get manual date input
//var foo_date1 = getDateFromFormat(“02/23/2014”, “M/d/y”); // sample from author
//var foo_date1 = getDateFromFormat(cdate, “M/d/y”); // apply manual input
var foo_date1 = getDateFromFormat(ddate, “M/d/y”); //automatic input of date

var foo_date2 = getDateFromFormat(“04/04/2014”, “M/d/y”);
var cmile = document.getElementById(‘myMiles’).value;
var miles = 621.37 – cmile; //second number for miles
var diff_date = Math.round((foo_date2 – foo_date1)/days);
var dayAve = miles / diff_date;
var weekAve = dayAve * 7;
var rndWeek = Math.round(weekAve);
runMsg.innerHTML=”Average ” + rndWeek + ” miles per week.<br>” +
“You have ” + Math.round(miles) + ” miles to go.<br>” + “You have ” + diff_date + ” days remaining. <br>” +
“Today is ” + ddate;
//alert(“Average ” + rndWeek + ” miles per week to meet the million meter goal” + cdate );
}

final_china_concept

Digital Painting

I’m working on my final project for a digital painting course.

I shot the first image in street market in Xian China in 08.  I always thought it would be a good subject for a painting; High iso noise left it a little lacking as a digital image. It’s a work in progress,  I’m slowly adding resolution with oils and palette knife.  I’ve found it’s easy to overwork the images if I’m not careful.
The second is a scan from a 2 ¼ slide I shot with a Yashica Mat 124 G (I really miss some aspects of shooting film)  My tripod was knee deep in muck on the banks of lake Powel.  The sunset was shopped in from a sunset I shot in Sedona.
I’m going to be printing one of them on canvas and I want to add brush stroke texture to the printed canvas with an acrylic gel.   I’m talking with my prof. about technique.  I’m also researching the intertubes a bit.

jQuery slideshow

http://slidesjs.com/


<head>
<title>Titletitle>

<style type="text/css" media="screen">
.slides_container {
width:570px;
height:270px;
}

.slides_container div {
width:570px;
height:270px;
display:block;
}

style>

<script src="http://code.jquery.com/jquery-latest.min.js">script>
<script src="slides.js">script>

<script>
$(function(){
$("#slides").slides();
});
script>
head>
<body>
<div id="slides">
<div class="slides_container">
<div>
<img src="http://placehold.it/570x270">
div>
<div>
<img src="http://placehold.it/570x270">
div>
<div>
<img src="http://placehold.it/570x270">
div>
<div>
<img src="http://placehold.it/570x270">
div>
div>
div>
body>

Options

preload (boolean)

Set true to preload images in an image based slideshow.  Show example

 Default value is false.

preloadImage (string)

Name and location of loading image for preloader.  Show example

 Default path is “/img/loading.gif”.

container (string)

Class name for slides container.  Show example

 Default class name is “slides_container”.

generateNextPrev (boolean)

Auto generate next/prev buttons.  Show example

 Default value is false.

next (string)

Class name for custom next button.  Show example

 Default class name is “next”.