Amit wrote, "Just heard Satya Nadella speak at Starbucks! Key takeaways for me since some asked:"
Colin Mayer, British AAcademy Review NO.30, SUMMER 2017, ISSN 2047-1866
/* Melbus CDCHGR Emulator | |
* Program that emulates the MELBUS communication from a CD-changer (CD-CHGR) in a Volvo V70 (HU-xxxx) to enable AUX-input through the 8-pin DIN-contact. | |
* This setup is using an Arduino Nano 5v clone | |
* | |
* The HU enables the CD-CHGR in its source-menue after a successful initialization procedure is accomplished. | |
* The HU will remove the CD-CHGR everytime the car starts if it wont get an response from CD-CHGR (second init-procedure). | |
* | |
* Karl Hagström 2015-11-04 | |
* mod by S. Zeller 2016-03-14 | |
* |
import gps, os, time | |
session = gps.gps() | |
while 1: | |
os.system('clear') | |
session.query('admosy') | |
# a = altitude, d = date/time, m=mode, | |
# o=postion/fix, s=status, y=satellites |
Amit wrote, "Just heard Satya Nadella speak at Starbucks! Key takeaways for me since some asked:"
Colin Mayer, British AAcademy Review NO.30, SUMMER 2017, ISSN 2047-1866
def get_width(self, width): | |
"""Returns an acceptable width from a requested width. | |
Per https://developers.facebook.com/docs/plugins/embedded-posts/, FB | |
embeds must be between 350 and 750 pixels wide. | |
If no width passed, default to 360, else get as close to requested | |
width as possible while following FB's guidelines. | |
""" | |
if not width: |
from django import forms | |
from haystack.forms import SearchForm | |
from datetime import datetime, timedelta | |
ORDER_BY_CHOICES = ( | |
('r', "Relevance"), | |
('d', "Descending"), | |
('a', "Ascending") | |
) |
{% load static from staticfiles %} | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content="Crop Imported Image"> | |
<title>Cropper</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css"> |
- Customizeable copyright element in channel | |
- Customizeable logo image element in channel | |
- Related items are now tollerant of unicode characters (i.e. Feed doesn't 500 when related item titles contain unicode) |
from django.test import TestCase | |
from django.test.client import Client, RequestFactory | |
from dd.grabit.views import save_image_from_url | |
from django.contrib.auth.models import User | |
class GrabitViewsTestCase(TestCase): | |
def setUp(self): | |
self.user = User.objects.create_superuser('foo', 'foo@bar.com', 'bar') | |
self.rf = RequestFactory() |
SpokenLayer.prototype.setPlayerFile = function() { | |
//We prefer Mp3 | |
if(this.browserMp3Support){ | |
this.setSrc(this.articleMp3); | |
this.setReady(true); | |
}else if(this.browserOggSupport){ | |
this.setSrc(this.articleOgg); | |
this.setReady(true); | |
}else{ | |
this.log('No audio support detected'); |
try { | |
if(this.Modernizr.audio){ | |
// Ogg | |
if(this.Modernizr.audio.ogg === "probably"){ | |
this.log('This browser probably supports ogg vorbis'); | |
this.browserOggSupport = true; | |
} | |
if(this.Modernizr.audio.ogg === "maybe"){ | |
this.log('This browser may support ogg vorbis'); | |
this.browserOggSupport = true; |