- basic build.gradle directory using flatDir
repositories {
mavenCentral()
flatDir {
dirs 'libs'
fun View.visible() { | |
visibility = View.VISIBLE | |
} | |
fun View.invisible() { | |
visibility = View.INVISIBLE | |
} | |
fun View.gone() { | |
visibility = View.GONE |
OkHttpClient okHttpClient = new OkHttpClient(); | |
try { | |
int cacheSize = 10 * 1024 * 1024 // 10 MiB | |
Cache cache = new Cache(getCacheDir(), cacheSize); | |
okHttpClient.setCache(cache); | |
} catch (IOException e) { | |
Log.e(TAG, "Could not set cache", e); | |
} | |
// Forces cache. Used for cache connection |
// | |
// ViewController.swift | |
// Repnote | |
// | |
// Created by John Neumann on 05/07/2017. | |
// Copyright © 2017 Audioy. All rights reserved. | |
// | |
import UIKit |
import json, datetime | |
class RoundTripEncoder(json.JSONEncoder): | |
DATE_FORMAT = "%Y-%m-%d" | |
TIME_FORMAT = "%H:%M:%S" | |
def default(self, obj): | |
if isinstance(obj, datetime.datetime): | |
return { | |
"_type": "datetime", | |
"value": obj.strftime("%s %s" % ( |
from zeep import Client, helpers | |
client = Client('https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl') | |
resp = client.service.consultaCEP('06694720') | |
resp = helpers.serialize_object(resp) | |
resp = {k: resp[k] for k in resp} | |
print(resp) | |
client = Client('http://www.webservicex.com/globalweather.asmx?wsdl') | |
resp = client.service.GetCitiesByCountry('New York') |
from hashlib import md5 | |
from base64 import b64decode | |
from base64 import b64encode | |
from Crypto.Cipher import AES | |
# Padding for the input string --not | |
# related to encryption itself. | |
BLOCK_SIZE = 16 # Bytes | |
pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \ |
#-*- coding: utf-8 -*- | |
# Python 3.4 | |
# author: http://blog.dokenzy.com/ | |
# date: 2015. 4. 8 | |
# References | |
# http://www.imcore.net/encrypt-decrypt-aes256-c-objective-ios-iphone-ipad-php-java-android-perl-javascript/ | |
# http://stackoverflow.com/questions/12562021/aes-decryption-padding-with-pkcs5-python | |
# http://stackoverflow.com/questions/12524994/encrypt-decrypt-using-pycrypto-aes-256 |
from hashlib import md5 | |
from base64 import b64decode | |
from base64 import b64encode | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
# Padding for the input string --not | |
# related to encryption itself. | |
BLOCK_SIZE = 16 # Bytes |
/* | |
* Set up your Git configuration | |
*/ | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
git config --global core.editor "nano" |