A list of comman regular expressions for use in django url's regex.
Example Django URLs patterns:
urlpatterns = patterns('',
import React, { Component } from 'react'; | |
import { | |
AppRegistry, | |
Text, | |
View | |
} from 'react-native'; | |
class MyComponent extends Component { | |
render() { | |
return ( |
__tests__ | |
android | |
index.android.js | |
index.ios.js | |
ios | |
node_modules | |
package.json | |
yarn.lock |
# For iOS | |
react-native run-ios | |
# For Android | |
react-native run-android |
react-native init MyProject |
highlight -O rtf myClass.js --font-size 24 --font Inconsolata --style moria -W -J 50 -j 3 --src-lang js | pbcopy |
#!/bin/bash | |
NAME="hello_app" # Name of the application | |
DJANGODIR=/webapps/hello_django/hello # Django project directory | |
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
USER=hello # the user to run as | |
GROUP=webapps # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
import unicodedata | |
import re | |
""" | |
A remoção de acentos foi baseada em uma resposta no Stack Overflow. | |
http://stackoverflow.com/a/517974/3464573 | |
""" | |
def removerAcentosECaracteresEspeciais(palavra): |
# Sample i2of5 barcode generation. | |
from reportlab.pdfgen import canvas | |
from reportlab.lib.pagesizes import A4 | |
from reportlab.lib.units import mm | |
from reportlab.graphics.barcode.common import I2of5 | |
c=canvas.Canvas("barcode_example.pdf",pagesize=A4) | |
tb=0.254320987654 * mm # thin bar | |
bh=20 * mm # bar height |
$('.table').on('click', '.table__delete', function() { | |
if ($(this).parent().is(':not(:last-child)')) { | |
var linhaClicada = $(this).parent().index(); | |
console.log(linhaClicada); | |
$.ajax({ | |
type: 'POST', | |
dataType: 'json', | |
url: "/atendimento/deletar-servico-ou-item-selecionado/", | |
data: { | |
item: linhaClicada, |