Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| CREATE TABLE `user` ( | |
| `twitter_id` int(10) unsigned NOT NULL, | |
| `created_at` timestamp NOT NULL default '0000-00-00 00:00:00', | |
| `name` varchar(80) NOT NULL, | |
| `screen_name` varchar(30) NOT NULL, | |
| `location` varchar(120) default NULL, | |
| `description` varchar(640) default NULL, | |
| `profile_image_url` varchar(400) NOT NULL, | |
| `url` varchar(100) default NULL, |
| // Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
| L.TileLayer.Common = L.TileLayer.extend({ | |
| initialize: function (options) { | |
| L.TileLayer.prototype.initialize.call(this, this.url, options); | |
| } | |
| }); | |
| (function () { | |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| <?php | |
| /** | |
| * Given a string containing any combination of YouTube and Vimeo video URLs in | |
| * a variety of formats (iframe, shortened, etc), each separated by a line break, | |
| * parse the video string and determine it's valid embeddable URL for usage in | |
| * popular JavaScript lightbox plugins. | |
| * | |
| * In addition, this handler grabs both the maximize size and thumbnail versions | |
| * of video images for your general consumption. In the case of Vimeo, you must | |
| * have the ability to make remote calls using file_get_contents(), which may be |
| I've tried now for several hours understanding how to use Git with webfaction. | |
| And even with the documentation I cannot get it to work. | |
| I have a Django app at: webapps/django_app/project_name/ | |
| I have a Git repo at: webapps/git_app/repos/my_repo.git | |
| I assume the following workflow: | |
| Make som local changes |
| import sys | |
| import csv | |
| import httplib, urllib, base64 | |
| def main(): | |
| # set the name of your repository, username and password | |
| username = "test" | |
| password = "test" | |
| repo = "test" | |
| <div class="form-wrapper"> | |
| <div class="form-wrapper-inner"> | |
| <div id="hubspot_form_widget_wrapper"> | |
| {% form "main_form" editing={group="page_actions", order=30} %} | |
| </div> | |
| <div id="hubspot_dummy_form" style="display: none"> | |
| <form class="hs-form stacked"> | |
| <h3 class="form-title">Fill Out Our Form</h3> | |
| <div class="field"> | |
| <label>First Name</label> |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| <?php | |
| add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
| /** | |
| * Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE. | |
| * IE10 and up does not support conditional comments in standards mode. | |
| * | |
| * @uses wp_style_add_data() WordPress function to add the conditional data. | |
| * @link https://developer.wordpress.org/reference/functions/wp_style_add_data/ |