Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
%% | |
%% @file test_concat.erl тестирование скорости конкатенации | |
%% Тестирование проводилось на списках и binary. | |
%% Тестировалось наивная конкатенация через: | |
%% * ++, для списков; | |
%% * <<X/binary,Y/binary>>>, для binary; | |
%% * вложенные списки (правильные и неправильные), cм ниже; | |
%% * конкатенация через lists:append, для списков; | |
%% * конкатенация через string:join, для списков; | |
%% |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#!/usr/bin/env python2.6 | |
# Copyright (c) 2010, Code Aurora Forum. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: | |
# # Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# # Redistributions in binary form must reproduce the above |
<script type="text/ng-template" id="one.html"> | |
<div>This is first template</div> | |
</script> | |
<script type="text/ng-template" id="two.html"> | |
<div>This is second template</div> | |
</script> |
from exampleapp import app | |
import IPython | |
app.testing = True | |
test_client = app.test_client() | |
welcome_message = """Welcome to your Flask CLI environment. | |
The following variables are available to use: | |
app -> Your Flask app instance. |
<?xml version="1.0" encoding="UTF-8"?> | |
<w:document xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" | |
xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" | |
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" | |
xmlns:w10="urn:schemas-microsoft-com:office:word" | |
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" | |
xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" | |
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" |
notification : function(sUrl, sTitle, sContent, onDisplay, onClick, onClose) | |
{ | |
if(window.webkitNotifications) { // Test si webkitNotifications de Chrome | |
if (window.webkitNotifications.checkPermission() == 0) { // 0 is PERMISSION_ALLOWED | |
var notif = window.webkitNotifications.createNotification( | |
sUrl, // icon url - can be relative | |
sTitle, // notification title | |
sContent // notification body text | |
); |