Get real path from URI, Android KitKat new storage access framework [duplicate]

Get real path from URI, Android KitKat new storage access framework [duplicate]

This question already has an answer here: Android Gallery on Android 4.4 (KitKat) returns different URI for Intent.ACTION_GET_CONTENT 19 answers Before

Build a Basic Python Iterator

Build a Basic Python Iterator

How would one create an iterative function (or iterator object) in python? 1:Iterator objects in python conform to the iterator protocol, which basically means they provide two methods: __iter__() and next(). The __iter__ returns the

Unsupported major.minor version 52.0 [duplicate]

Unsupported major.minor version 52.0 [duplicate]

This question already has an answer here: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version 42 answers Pictures:Comman

Why is my Spring @Autowired field null?

Why is my Spring @Autowired field null?

Note: This is intended to be a canonical answer for a common problem.I have a Spring @Service class (MileageFeeCalculator) that has an @Autowired field (rateService), but the field is null when I try to use it. The logs show that both the M

XE4: How to change exe output name base on platform?

XE4: How to change exe output name base on platform?

Simply I need output executable names like MyApp32.exe and MyApp64.exe after compiling my project in Delphi XE4.I found a directive in the forum which is {$LIBSUFFIX '32'} but it seems it is only for dlls.Any suggestions for executable file

Run “mvn package” on “Build project” in Eclipse

Run “mvn package” on “Build project” in Eclipse

I have maven java project in eclipse. I right click project, choose "Build project" and I want "mvn package" get invoked automatically. Is it possible? 1:Rightclick on your pom.xml and choose "Run as" -> "Maven build.." and put in Goals:

Subfolders in .gitignore

Subfolders in .gitignore

I have many subfolders in my repo, in which there are few build/ directories I'd like to ignore when committing my code. As I understand it, there are two ways to ignore all of the folders:*/build/ (Unix wildcards)build/ (git way of ignorin

PyCrypto install error on Windows

PyCrypto install error on Windows

I am trying to install PyCrypto 2.6 Library on my computer. But I keep getting the following errorD:\Software\Python\package\pycrypto-2.6>python setup.py buildrunning buildrunning build_pyrunning build_extwarning: GMP or MPIR library not fo

Initializing List with given number of nulls without loop?

Initializing List with given number of nulls without loop?

Can a List be initialized to contain a given number of nulls, where T is a type parameter of the class of which the list is a member? I sure can do it with a loop, but like to know whether it is possible without.List myList = new ArrayList(

what is the purpose of the extra asterisks in php comments?

what is the purpose of the extra asterisks in php comments?

I've (finally) been reading up on PEAR (php) coding standards.What is the purpose of commenting like this:/** * Here is my comment* I Wrote this in a haiku* But why put the stars?*/As opposed to this:/* Here is a comment No haiku

In Maven, how can I exclude all transitive dependencies from a particular dependency?

In Maven, how can I exclude all transitive dependencies from a particular dependency?

I want to exclude all transitive dependencies from one dependency. In some places I've seen it suggested to use a wildcard for that myParentPackage myParentProject 1.00.000 * * When I do that I get a

How do I create a CSV file using Perl?

How do I create a CSV file using Perl?

I want to create a CSV file using Perl and write some data to it. Is there any way to do that? 1:You could use Class:CSV.use Class::CSV;my $csv = Class::CSV->new( fields => [qw/userid username/]);$csv->add_line([2063, 'testuser'

How to configure custom global interfaces (.d.ts files) for TypeScript?

How to configure custom global interfaces (.d.ts files) for TypeScript?

I've been struggling with this problem for the last few hours and I just can't seem to find anything on the internet that would clearly explain this, supposedly, simple concept.I'm currently working on a ReactJS project which uses Webpack2

How do I get the project basepath in CodeIgniter

How do I get the project basepath in CodeIgniter

I have created a folder as user in the root directory.My project base path is:/var/www/myproject/When I want to access the base path as BASEPATH from a controller it's showing:/var/www/myproject/system/ But I want the path to be:/var/www/my

GDB: How to list all source files used for compilation

GDB: How to list all source files used for compilation

New to the project, have multiple source files used for compilation and some "could" be dynamic libraries, loaded at runtime. When debugging the executable using "GDB", is there a command to list all the source files (static) used to build

error Please #define _AFXDLL or do not use /MD[d] occurs even after making changes in Project Proper

error Please #define _AFXDLL or do not use /MD[d] occurs even after making changes in Project Proper

I am working on Win32 project in Visual Studio 2011. It is generating MFC error when I includes afx.h or afxwin.h.To resolve this, I have made the following changes in the Project Properties tab :1) Use of MFC : Use MFC in a shared DLL2) C+

What does the .csproj file do?

What does the .csproj file do?

Usually a C# project has a .csproj file associated with it. What is that file for? What data does it contain? 1:Basically the .csproj file contains the list of files in your project, plus the references to system assemblies etc.There ar

Passing parent_id to a comment

Passing parent_id to a comment

In my app I have Posts which have comments. Now I also want to add comments to those comments (nested commenting).I currently do it like this, but it does not write my parent_id to the database:My comment link in my _comment.html.erb partia

Running a .NET application from a file share without code signing

Running a .NET application from a file share without code signing

The .NET security model throws security errors whenever a .NET exe is run from a file share. The error does not appear when ran from a local drive. Does anyone know of a way around this without requiring the code to be signed? 1:Using Ca

MySQL group by date and convert from unix timestamp

MySQL group by date and convert from unix timestamp

I have the following sql table (simplified)ID (int) title (text) date (int)--------------------------------------------1 Hello World 13781489202 Hello World2 13781821833 Hello World

Too long paths because of nested node dependencies

Too long paths because of nested node dependencies

I'm using npm to install dependencies. After I have installed those, I want to share my project with someone who is not technical, and doesn't have npm, so I want to ship the node_modules inside the app.However, because node nests the depen

How to sort an Array of Tuples?

How to sort an Array of Tuples?

How do you implement (or create) an array sort of a list of tuples?The following was gleaned from my code. Essentially I created an array of tuplesand populated it via for loop; after which I tried to sort it.var myStringArray: (String,Int

How to compose functions that return Option[List] in Scala?

How to compose functions that return Option[List] in Scala?

Suppose I have two functions to get orders and order items:def getOrders(): Option[List[Int]] = ...def getOrderItems(orderId: Int): Option[List[Int]] = ...Note that both functions return Option[List] since each function may fail.Now I would

“Masking” an animation? iPhone SDK

“Masking” an animation? iPhone SDK

I have been looking into ways of masking images on the iPhone. I came across this solution http://iosdevelopertips.com/cocoa/how-to-mask-an-image.htmlwhich works great for still images. What I want to do is mask an animation in a UIImageVie

SQLALchemy dynamic filter_by

SQLALchemy dynamic filter_by

I know you can build dynamic filters for queries for SQLAlchemy by supplying **kwargs to filter_by. For example filters = {'id': '123456', 'amount': '232'} db.session.query(Transaction).filter_by(**filters)Below is my question:What