This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InputStream is = getContentResolver().openInputStream(uri); | |
Bitmap bitmap = BitmapFactory.decodeStream(is); | |
is.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# based on this code | |
# http://code.activestate.com/recipes/577423-convert-csv-to-xml/ | |
# convert Odoo csv files in xml files | |
# csv is easy to maintain but xml data have noupdate feature | |
# Limitations: | |
# - relation field One2many is NOT supported | |
# - csv should have 'id' as first column |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2017 Piruin Panichphol | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script to download asset file from tag release using GitHub API v3. | |
# See: http://stackoverflow.com/a/35688093/55075 | |
CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" | |
# Check dependencies. | |
set -e | |
type curl grep sed tr >&2 | |
xargs=$(which gxargs || which xargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright © $today.year by NECTEC, All rights reserved. | |
Use this file without prior written permission from NECTEC is prohibited. | |
For questions or any dealings please contact us at info@nectec.or.th |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.tanrabad.survey.larvaecam | |
import android.app.Fragment | |
import android.content.Context | |
import android.os.AsyncTask | |
import android.os.Handler | |
import android.os.Looper | |
import android.view.View | |
inline fun Context.runOnWorkerThread(crossinline task: () -> Unit) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected Marker addMarker(LatLng position, @ColorRes int color, boolean draggable) { | |
MarkerOptions markerOptions = new MarkerOptions(); | |
markerOptions.draggable(draggable); | |
markerOptions.icon(MapUtils.getIconBitmapDescriptor(getActivity(), color)); | |
markerOptions.position(position); | |
Marker pinnedMarker = googleMap.addMarker(markerOptions); | |
startDropMarkerAnimation(pinnedMarker); | |
return pinnedMarker; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Google Material Design Color Palette for Android http://www.google.com/design/spec/style/color.html#color-ui-color-palette | |
Spreadsheet used to create this reosurce - http://bit.ly/mdcolor_spreadsheet | |
Link to this colors.xml resource file - http://bit.ly/mdcolorsxml | |
Harshad Kale | |
https://github.com/kalehv | |
harshad.kale@gmail.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.fontLigatures": true, | |
"editor.fontFamily": "Fira Code", | |
"editor.fontSize": 16, | |
"files.insertFinalNewline": true, | |
"workbench.colorTheme": "Default Light+", | |
"workbench.iconTheme": "vscode-icons", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git update-index --chmod=+x gradlew |
NewerOlder