This file contains hidden or 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
has foo => ( | |
is => 'ro', | |
lazy => 1, | |
default => sub { $_[0]->_foo_bar->[0] }, | |
); | |
has bar => ( | |
is => 'ro', | |
lazy => 1, | |
default => sub { $_[0]->_foo_bar->[1] }, |
This file contains hidden or 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
javascript:(function(){function R(w){try{var d=w.document,j,i,t,T,N,b,r=1,C;for(j=0;t=["object","embed","applet","iframe"][j];++j){T=d.getElementsByTagName(t);for(i=T.length-1;(i+1)&&(N=T[i]);--i)if(j!=3||!R((C=N.contentWindow)?C:N.contentDocument.defaultView)){b=d.createElement("div");b.style.width=N.width; b.style.height=N.height;b.innerHTML="<del>"+(j==3?"third-party "+t:t)+"</del>";N.parentNode.replaceChild(b,N);}}}catch(E){r=0}return r}R(self);var i,x;for(i=0;x=frames[i];++i)R(x)})(); javascript:(function(){var newSS, styles='* { background: white ! important; color: black !important; text-shadow: none !important } :link, :link * { color: #0000EE !important } :visited, :visited * { color: #551A8B !important }'; if(document.createStyleSheet) { document.createStyleSheet("javascript:'"+styles+"'"); } else { newSS=document.createElement('link'); newSS.rel='stylesheet'; newSS.href='data:text/css,'+escape(styles); document.getElementsByTagName("head")[0].appendChild(newSS); } })(); javascript:(function(){var d |
This file contains hidden or 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
my $int = uint128(0); | |
return $int if $size == 0; | |
my @unpacked = unpack( 'NNNN', $self->_zero_pad_left( $buffer, 16 ) ); | |
for my $piece (@unpacked) { | |
$int <<= 32; | |
$int |= $piece; | |
} |
This file contains hidden or 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
ipv6str = malloc(strlen(ipstr) + 2); | |
strncat(ipv6str, "::", 2); | |
strncat(ipv6str, ipstr, strlen(ipstr)); |
This file contains hidden or 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
static int lookup(MMDB_root_entry_s * root, const char *ipstr) | |
{ | |
struct in_addr ip; | |
struct in6_addr ip6; | |
int ai_flags = AI_NUMERICHOST|AI_V4MAPPED; | |
int status; | |
int depth = root->entry.mmdb->depth; | |
if (ipstr == NULL) { |
This file contains hidden or 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
DO $$ | |
DECLARE c INTEGER; | |
BEGIN | |
SELECT COUNT(*) INTO c FROM pg_type WHERE typname = 'footype'; | |
IF c > 0 THEN | |
RETURN; | |
END IF; | |
CREATE DOMAIN footype AS TEXT CONSTRAINT len CHECK ( length(VALUE) > 1 ); | |
END$$; |
This file contains hidden or 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 | |
$id = pods_var( 'last', 'url' ); | |
$tag = $GLOBALS['Pods_TAG'] = pods( 'volunteer_opportunity_tag', $id, true ); | |
echo "ID = " . $id . ", TOTAL = " . $tag->total(). ", FOUND = " . $tag->total_found(), ", EXISTS = " . $tag->exists(); | |
$GLOBALS['Pods_TITLE'] = $tag->display('title') . ' Volunteer Opportunity'; |
This file contains hidden or 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 | |
$tag = $GLOBALS['Pods_TAG']; | |
$id = $tag->field('slug'); | |
$pods = pods('volunteer', array( 'where' => "volunteer_opportunity_tag.slug = '$id'", orderby => 'name ASC')); | |
if ( $pods->exists() ){ | |
$opp = $pods->title() > 1 ? 'opportunities' : 'opportunity'; | |
$is = $pods->title() > 1 ? 'are' : 'is'; |
This file contains hidden or 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
<ul class="exhibitors"> | |
<?php | |
while ( $obj->fetch() ) : | |
$exhibitor_url = $obj->field('exhibitor_url', TRUE); | |
$yelp_url = $obj->field('yelp_url', TRUE); | |
$vegguide_url = $obj->field('vegguide_url', TRUE); | |
?> | |
<li> | |
<?php |
This file contains hidden or 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
<li> | |
<a href="/volunteer/category/{@slug}">{@name}</a> | |
{@description} | |
</li> |