sudo apt-get update && sudo apt-get install tzdata
timedatectl statusmostrará el setting actual.timedatectl list-timezonesmuestra los timezones disponibles.sudo timedatectl set-timezone America/Santiagolo setea.
| angular.module('starter', ['ionic']) | |
| .run(function($ionicPlatform) { | |
| $ionicPlatform.ready(function() { | |
| if (window.cordova && window.cordova.plugins.Keyboard) { | |
| cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); | |
| cordova.plugins.Keyboard.disableScroll(true); | |
| } | |
| if (window.StatusBar) { |
| """ | |
| !python 3 required | |
| - pip install requests | |
| """ | |
| import random | |
| import requests | |
| import string | |
| from threading import Thread | |
| -,-,-,-,-,*,- | |
| -,X,X,*,-,1,- | |
| -,-,*,4,*,X,- | |
| -,*,X,*,3,*,- | |
| -,X,-,1,-,-,- | |
| -,2,-,-,1,X,- | |
| -,-,-,-,*,-,- |
| ['Africa/Abidjan', | |
| 'Africa/Accra', | |
| 'Africa/Addis_Ababa', | |
| 'Africa/Algiers', | |
| 'Africa/Asmara', | |
| 'Africa/Asmera', | |
| 'Africa/Bamako', | |
| 'Africa/Bangui', | |
| 'Africa/Banjul', | |
| 'Africa/Bissau', |
| """ | |
| Adds a `seed` paramter to DRF's `next` and `prev` pagination urls | |
| """ | |
| from rest_framework import serializers | |
| from rest_framework import pagination | |
| from rest_framework.templatetags.rest_framework import replace_query_param | |
| from . import utils |
| from datetime import datetime, timedelta | |
| PYBITES_BORN = datetime(year=2016, month=12, day=19) | |
| def my_gen_special_pybites_dates(): | |
| days = 1 | |
| while True: | |
| dt = PYBITES_BORN + timedelta(days=days) | |
| # if days % 100 == 0: # commented to print only 'every year' |
| #!/bin/sh | |
| set -e | |
| cd "<virtualenv_dir>" | |
| source bin/activate | |
| # -- Your code here! |
| title | Using Djongo Array Reference Field |
|---|---|
| permalink | /using-django-with-mongodb-array-reference-field/ |
The ArrayReferenceField is one of the most powerful features of Djongo. The ArrayModelField stores the embedded models within a MongoDB array as embedded documents for each entry. If entries contain duplicate embedded documents, using the ArrayModelField would require unnecessary disk space. The ManyToManyField on the other hand has a separate table for all the entries. In addition, it also creates an intermediate "through/join" table which records all the mappings.
The ArrayReferenceField is a bargain between the ArrayModelField and ManyToManyField. A separate collection is used for storing all entries (instead of embedding it as an array). This means there is no data duplication. However, the intermediate "through/join" mapping table is completely skipped! This is achieved by storing only a reference to the entries in the embedded array.