http://udinic.wordpress.com/2013/07/24/write-your-own-android-sync-adapter/ https://github.com/Udinic/SyncAdapter
Criando Contas (Autenticator)
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'nome-do-banco', | |
'USER': 'ususario-do-banco', | |
'PASSWORD': 'senha', | |
'HOST': 'localhost', | |
'PORT': '3306', | |
} | |
} |
#!/usr/bin/python | |
import sys | |
import MySQLdb | |
import subprocess | |
my_host = "localhost" | |
my_user = "usuario" | |
my_pass = "senha" | |
my_db = "banco" | |
command_restart_mysql = "service mysql restart" |
http://udinic.wordpress.com/2013/07/24/write-your-own-android-sync-adapter/ https://github.com/Udinic/SyncAdapter
Criando Contas (Autenticator)
#!/bin/bash | |
# Based on https://gist.github.com/2206527 | |
# Be pretty | |
echo -e " " | |
echo -e " . ____ . ______________________________" | |
echo -e " |/ \| | |" | |
echo -e "[| \e[1;31m♥ ♥\e[00m |] | S3 MySQL Backup Script v.0.1 |" | |
echo -e " |___==___| / © oodavid 2012 |" |
import javafx.scene.layout.StackPane; | |
import javafx.scene.web.WebView; | |
/** | |
* A syntax highlighting code editor for JavaFX created by wrapping a | |
* CodeMirror code editor in a WebView. | |
* | |
* See http://codemirror.net for more information on using the codemirror editor. | |
*/ | |
public class CodeEditor extends StackPane { |
package cpf | |
import ( | |
"errors" | |
"strconv" | |
"strings" | |
) | |
var CpfInvalido = errors.New("Cpf Inválido") |
/*************************************************************************** | |
* Pequena implementação da calculadora "dc" do GNU/Linux * | |
* Não é uma implementação para calculos de alta precisão * | |
* Copyright (C) 2009 by Claudemiro Alves Feitosa Neto * | |
* dimiro1@gmail.com * | |
* Modified: <2009-05-21 20:58:52 BRT> * | |
* * | |
* This program is free software: you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation, either version 3 of the License, or * |
from itertools import permutations | |
sum(1 for i in [int(''.join(str(x) for x in e)) for e in permutations([2,3,5,6,7,9], 3)] if i % 5 == 0) |