I hereby claim:
- I am stuartbates on github.
- I am stuartbates (https://keybase.io/stuartbates) on keybase.
- I have a public key whose fingerprint is 0D13 6F9D 6ED3 5DF7 3080 9ABD FA47 94AD 449C 4914
To claim this, I am signing this object:
/usr/bin/sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/History <<EOF | |
select strftime('%Y%m', datetime(last_visit_time/1000000-11644473600, 'unixepoch')), count(distinct url) from urls where url LIKE 'https://stackoverflow.com%' group by 1; | |
EOF |
suspend fun downloadMarker { | |
val furl = URL(myURL) | |
val bm = BitmapFactory.decodeStream(furl.openConnection().getInputStream()) | |
return BitmapDescriptorFactory.fromBitmap(bm) | |
} | |
val bd = withContext(Dispatchers.IO) { downloadMarker() } | |
marker.setIcon(bd) |
I hereby claim:
To claim this, I am signing this object:
class Student < User | |
has_many :class_groups | |
def high_achiever? | |
average_score > 75 | |
end | |
end |
[email protected] | Stuart | Bates |
---|
# Hexdigest the params hash down to a string representation | |
params_digest = Digest::SHA1.hexdigest(params.to_s) | |
# Use the key in combination with namespace to create cache key | |
cache_key = "collection_counts.#{params_digest}" | |
# Cache the result using Redis.cache.fetch | |
# Set a sane default expiration period | |
Rails.cache.fetch(cache_key, expires_in: 12.hours) { scope.size } |
class String | |
def arabic? | |
self[0,10].each_char.any? do |character| | |
character.ord.between?(65, 122) # Update numbers correctly | |
end | |
end | |
def english? | |
self[0,10].each_char.any? do |character| |
# api/app/controllers/spree/api/shipments_controller.rb | |
def create | |
variant = Spree::Variant.find(params[:variant_id]) | |
quantity = params[:quantity].to_i | |
@shipment = @order.shipments.create(:stock_location_id => params[:stock_location_id]) | |
@order.contents.add(variant, quantity, nil, @shipment) | |
@shipment.refresh_rates | |
@shipment.save! |
<?php $classes = $challenge_video ? ' has-video' : ''; ?> | |
<div class="challenge-intro__image split-section__half"> | |
<img class="challenge-intro__banner" src="/sites/all/themes/zen/library/img/deadline-bg.svg" alt="Challenge deadline banner" /> | |
<time class="challenge-intro__deadline" datetime="<?php echo date('j-m-Y', $challenge_end_date); ?>"><?php echo date('jS M Y', $challenge_end_date); ?></time> | |
<div class="split-section__image-wrapper split-section__image-wrapper--large rounded-corners--border box-shadow--rounded-double js-play <?php echo $classes; ?>" data-embed="#challenge-video"> | |
<?php echo '<img src="'.image_style_url('teaser_large', $challenge_image).'" alt="Latest challenge feature image" />' ?> | |
</div> | |
<?php echo $challenge_video; ?> | |
</div> |
var $ = require('jquery'); | |
require('jquery-ui/draggable'); | |
require('jquery-ui/droppable'); | |
require('remodal'); | |
$(document).ready(function(){ | |
$('.draggable').draggable(); | |
$('.droppable').droppable({ | |
drop: function(event, ui){ |