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
import androidx.lifecycle.LiveData | |
import androidx.paging.DataSource | |
import androidx.room.* | |
import androidx.sqlite.db.SupportSQLiteQuery | |
@Dao | |
abstract class MetadataDao { | |
@get:Query("SELECT * FROM meta") | |
abstract val allImages: LiveData<List<MetadataEntity>> |
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
import androidx.lifecycle.LiveData | |
import androidx.paging.DataSource | |
import androidx.room.* | |
import androidx.sqlite.db.SimpleSQLiteQuery | |
import androidx.sqlite.db.SupportSQLiteQuery | |
import com.anthonymandra.content.Meta | |
import com.anthonymandra.rawdroid.XmpFilter | |
import com.anthonymandra.util.DbUtil | |
import java.util.* |
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 com.anthonymandra.rawdroid.data | |
import android.arch.persistence.room.Delete | |
import android.arch.persistence.room.Insert | |
import android.arch.persistence.room.RawQuery | |
import android.arch.persistence.room.Update | |
abstract class PathDao<T : PathEntity> { | |
protected abstract val database: String | |
private val PATH_DELIMITER = "/" |
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 com.anthonymandra.rawdroid.data | |
import android.arch.lifecycle.LiveData | |
import android.arch.paging.DataSource | |
import android.arch.persistence.db.SimpleSQLiteQuery | |
import android.arch.persistence.db.SupportSQLiteQuery | |
import android.arch.persistence.room.* | |
import com.anthonymandra.content.Meta | |
import com.anthonymandra.rawdroid.XmpFilter | |
import com.anthonymandra.util.DbUtil |
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
@Dao | |
public abstract class MetadataDao { | |
@Query("SELECT id, name, type, height, width, orientation, " + | |
"(SELECT GROUP_CONCAT(name) " + | |
"FROM meta_subject_junction " + | |
"JOIN xmp_subject " + | |
"ON xmp_subject.id = meta_subject_junction.subjectId " + | |
"WHERE meta_subject_junction.metaId = meta.id) AS keywords, " + | |
"(SELECT documentUri " + | |
"FROM image_parent " + |
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 com.keysight.hbase | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.spark.HBaseContext | |
import org.apache.spark.sql.{DataFrame, SQLContext} | |
import org.apache.spark.{SparkConf, SparkContext} | |
object AverageSensorOverTime1 /*extends App*/ { | |
def main(args:Array[String]) { |
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
cat - <<-EOF >> /etc/apt/sources.list.d/webupd8team-java.list | |
# webupd8team repository list | |
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main | |
EOF | |
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xEEA14886 | |
echo debconf shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | /usr/bin/debconf-set-selections |
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 com.drew.metadata; | |
public interface Key<T> | |
{ | |
String getTagName(); | |
String getTagType(); | |
String getSummary(); | |
String getDescription(T storedValue); | |
Object getValue(); | |
} |
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 2002-2017 Drew Noakes | |
* | |
* 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
//TODO: Hack for showcase appearing behind nav bar | |
public int getNavigationBarHeight(int orientation) { | |
try { | |
Resources resources = getResources(); | |
int id = resources.getIdentifier( | |
orientation == Configuration.ORIENTATION_PORTRAIT ? "navigation_bar_height" : "navigation_bar_height_landscape", | |
"dimen", "android"); | |
if (id > 0) { | |
return resources.getDimensionPixelSize(id); | |
} |