how to check internal and external storage if exist

it’s already explained in android documentation. Code taken from documentation boolean mExternalStorageAvailable = false; boolean mExternalStorageWriteable = false; String state = Environment.getExternalStorageState(); if (Environment.MEDIA_MOUNTED.equals(state)) { // We can read and write the media mExternalStorageAvailable = mExternalStorageWriteable = true; } else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { // We can only read the media mExternalStorageAvailable = true; mExternalStorageWriteable = … Read more

How does jQuery .data() work?

Have a look at the source for it. From a quick glimpse, it looks like it’s storing the data in that cache variable that is created on line 2. Edit: Here’s a quick demo that finds the data in the cache: http://jsfiddle.net/CnET9/ You can also dump $.cache to your console and explore it manually.

Best way to synchronize local HTML5 DB (WebSQL Storage, SQLite) with a server (2 way sync) [closed]

I created a small JS lib named WebSqlSync to synchronize a local WebSql DB with a server (client <-> server). Very easy to use and to integrate in your code : https://github.com/orbitaloop/WebSqlSync The open source project QuickConnect contains a JS library to synchronize the local HTML5 SQLite DB to a server DB (MySQL or other) … Read more

Why are Spark Parquet files for an aggregate larger than the original?

In general columnar storage formats like Parquet are highly sensitive when it comes to data distribution (data organization) and cardinality of individual columns. The more organized is data and the lower is cardinality the more efficient is the storage. Aggregation, as the one you apply, has to shuffle the data. When you check the execution … Read more

Write file to location other than SDcard using Android NDK?

You can always access the directory in which your app is placed. This directory is usually : data/data/<Your_package_name_usually com.android.appName>/files/<your_filename> but better use getFilesDir() to ensure valid filepath with future version changes of android. If you wanna use external storage instead, make sure you place this line of code in your app manifest to gain permission. … Read more

Query Available iOS Disk Space with Swift

iOS 11 Update The answers given below no longer provide accurate results under iOS 11. There are new volume capacity keys that can be passed to URL.resourceValues(forKeys:) that provide values that match what is available in device settings. static let volumeAvailableCapacityKey: URLResourceKey Key for the volume’s available capacity in bytes (read-only). static let volumeAvailableCapacityForImportantUsageKey: URLResourceKey … Read more