This is a simple helper class to casting the Views of your layout file in your Activity or Fragment.
Normally you get your layout Views like this:
<?php | |
// API access key from Google API's Console | |
// It's a Server-Key | |
define( 'API_ACCESS_KEY', 'YOUR_API_ACCESS_KEY' ); | |
$registrationIds = array("DEVICE_REGISTRATION_IDS" ); | |
// prep the bundle | |
$msg = array | |
( |
try: | |
# Specify the url | |
url = 'https://android.googleapis.com/gcm/send' | |
# Setup the data to send | |
data = json.dumps({ "registration_ids" : [""+ USER_GCM_IDS +""], "data" : { "question" : data.question, "questionDetail" : data.questionDetail, "answerFormat" : data.answerFormat, "dateend" : str(data.dateend), "image" : data.image} }) | |
# Add header | |
headers = {'Content-Type' : 'application/json', 'Authorization' : 'key=API_ACCESS_KEY'} |
Just a simple example of protecting some passwords via the Proxy Pattern
--
images=($(find . -iname '*.png' -o -iname '*.jpg')) | |
for image in "${images[@]}"; do | |
webp_file_path="${image::${#image}-4}.webp" | |
echo "Convert ${image} to ${webp_file_path}" | |
$(./cwebp-5.1 -quiet "${image}" -o "${webp_file_path}") | |
rm "${image}" | |
done |
This is a simple wrapper View for the new TextInputLayout from Design Library.
Normaly you use the TextInputLayout like this
import com.novoda.gradle.release.PublishExtension | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath("com.novoda:bintray-release:0.8.0") | |
} | |
} |
List Test:
Map Human(name=Stefan, age=12)
Map Human(name=Amy, age=1)
Filter Stefan
Filter Amy
[Stefan]