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
<div class="twitterbutton"> | |
<a href="http://twitter.com/share" | |
class="twitter-share-button" | |
data-url="<?php the_permalink() ?>" | |
data-text="<?php the_title(); ?>" | |
data-count="none" | |
data-via="rossharper"> | |
</a><!--<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>--> | |
</div> | |
<div class="facebookbutton"> |
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
<?php | |
function register_sharing_scripts() | |
{ | |
if( is_single() || is_home() ) | |
{ | |
wp_enqueue_script('twitter-share', 'http://platform.twitter.com/widgets.js', null, null, true); | |
wp_enqueue_script('facebook-share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', null, null, true); | |
wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null, true); | |
} | |
} |
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
.twitterbutton, | |
.googleplusonebutton, | |
.facebookbutton { | |
float: left; | |
margin: 0px 10px 0px 0px; | |
} | |
.facebookbutton { | |
padding: 1px 0px 0px 0px; | |
} |
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
<?php | |
function register_sharing_scripts() | |
{ | |
if( is_single() || is_home() ) | |
{ | |
wp_enqueue_script('twitter-share', 'http://platform.twitter.com/widgets.js', null, null, true); | |
wp_enqueue_script('facebook-share', 'http://static.ak.fbcdn.net/connect.php/js/FB.Share', null, null, true); | |
wp_enqueue_script('google-plusone', 'https://apis.google.com/js/plusone.js', array(), null, true); | |
wp_enqueue_script('pinterest', 'http://assets.pinterest.com/js/pinit.js', array(), null, true); | |
} |
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
.pinterestbutton { | |
float: left; | |
margin: 0px 10px 0px 0px; | |
} |
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
<?php | |
function rh_article_image() | |
{ | |
// If there is an image attached to the post... | |
if(has_post_thumbnail()) | |
{ | |
// .. get its uri and echo it | |
$imgarr = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full', false ); | |
echo $imgarr[0]; | |
} |
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
class RomanNumeralGeneratorTest { | |
private var generator: RomanNumeralGenerator = RomanNumeralGenerator() | |
@Test | |
fun shouldReturnIfor1() { | |
assertThat(generator.arabicToRoman(1), equalTo("I")); | |
} | |
@Test | |
fun shouldReturnIIfor2() { |
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
@RunWith(Parameterized.class) | |
public class JavaTest { | |
private final int paramOne; | |
private final String paramTwo; | |
@Parameterized.Parameters | |
public static List<Object[]> data() { | |
return Arrays.asList(new Object[][] { | |
{1, "I"}, // First test: (paramOne = 1, paramTwo = "I") | |
{1999, "MCMXCIX"} // Second test: (paramOne = 1999, paramTwo = "MCMXCIX") |
OlderNewer