storage

What is the maximum storage capacity of a plist?

浪子不回头ぞ 提交于 2019-12-03 11:29:36
My application uses a plist as data storage, and I would like to know, what is the maximum storage capacity of a plist file in iOS? A plist can be of arbitrary length . Apple, however, only recommend plists having a maximum size of a couple hundred KB : "For situations where you need to store small amounts of persistent data—say less than a few hundred kilobytes—property lists offer a uniform and convenient means of organizing, storing, and accessing the data." For data which is more memory intensive, they recommend the following: "In some situations, the property-list architecture may prove

Use parcelable to store item as sharedpreferences?

不问归期 提交于 2019-12-03 10:52:34
I have a couple objects, Location, in my app stored in an ArrayList and use parcelable to move these between activities. The code for the object looks like this: public class Location implements Parcelable{ private double latitude, longitude; private int sensors = 1; private boolean day; private int cloudiness; /* Måste ha samma ordning som writeToParcel för att kunna återskapa objektet. */ public Location(Parcel in){ this.latitude = in.readDouble(); this.longitude = in.readDouble(); this.sensors = in.readInt(); } public Location(double latitude, double longitude){ super(); this.latitude =

rails paperclip default image with S3

耗尽温柔 提交于 2019-12-03 09:52:10
问题 I'm trying to use the default_url in my application but I store the images using S3. I'm not sure what URL I need to put in there or if I have to create a fake image just to get everything up there. Since my images always render through S3, I don't know if it would work if I just put in some default images in my public folder. It doesn't seem to be working now - I also only have one image in there, and I know it has to resize. I can manually put the resized images in there but I'm still not

Android Internal Storage when updating application

醉酒当歌 提交于 2019-12-03 09:10:37
问题 I use the internal storage (http://developer.android.com/guide/topics/data/data-storage.html#filesInternal) to store some necessary application files, that the user creates. I suppose that these files are stored forever right? They are removed only when the user uninstalls the application, am I correct? In case of updating the application (for example from version 1.0 to 1.1) through the Android Market, then what will happen to the files that were stored from the previous version? Are they

How to read OTG USB storage

南楼画角 提交于 2019-12-03 09:02:20
I want to read/write OTG USB storage from device. For that I have written the code below but it shows only the SD card. HashSet<String> out = new HashSet<String>(); String reg = "(?i).*vold.*(vfat|ntfs|exfat|fat32|ext3|ext4).*rw.*"; String s = ""; try { final Process process = new ProcessBuilder().command("mount") .redirectErrorStream(true).start(); process.waitFor(); final InputStream is = process.getInputStream(); final byte[] buffer = new byte[1024]; while (is.read(buffer) != -1) { s = s + new String(buffer); } is.close(); } catch (final Exception e) { e.printStackTrace(); } // parse output

Is it possible to use Dropbox, Google Drive, Skydrive, etc. as a server space?

独自空忆成欢 提交于 2019-12-03 08:57:19
I'm creating an app that connects online to a server to collect information. To save money from renting server space from a big corp, I was wondering if any of these free services (Dropbox, Google Drive, Microsoft Skydrive, Amazon Cloud, etc.) could be potentially used as server space? I pretty much want a "space" or "cloud" where people can connect to to collect data. Example: I have a weather app, and there is files on my server and I update the files according to the weather. I would like them to be able to open the app and connect to my server to gather the weather data saved on my server.

Java EE, EJBs File handling

本秂侑毒 提交于 2019-12-03 08:46:51
I'm developing a web application in which users are allowed to upload pictures, the system will then generate thumbs for them. My problem relies on the fact that EJBs can be distributed on several servers and thus are not allowed to handle files directly. I could store the images in the databases but I was hoping to store them as files in one of the servers. How can I do this? Is there any way to centralize the storage of files? Or any approach to deal with files in Java EE with EJBs? Currently, I'm storing my files in a database. So I have centralized access and I don't need a dedicated file

How to update a JSON file by using Python?

只谈情不闲聊 提交于 2019-12-03 07:35:33
I am using Python and I have a JSON file in which I would like to update a value related to a given key. That is, I have the my_file.json containing the following data {"a": "1", "b": "2", "c": "3"} and I would like to just change the value related to the b key from 2 to 9 so that the updated file look as like: {"a": "1", "b": "9", "c": "3"} How can I make that? I tried the following but without success (the changes are not saved to the file): with open('my_file.json', 'r+') as f: json_data = json.load(f) json_data['b'] = "9" f.close() You did not save the changed data at all. You have to

Android - delete files on SD card on uninstall

僤鯓⒐⒋嵵緔 提交于 2019-12-03 07:10:22
问题 My app downloads some multi-media files from a server when it's installed. I do this to save space on the size of the app. However, the drawback of this approach is that when the app is uninstalled, it doesn't delete those files. I've seen reports that this is possible, but I can't seem to make it work. Is there a way to do this on uninstall, or should I just forget about it? Note that I have the app installed on the SD card by default as well, but I'm not sure if all phones will

cassandra node limitations

邮差的信 提交于 2019-12-03 06:54:09
I am looking for if cassandra has limitations of node hardware spec like what could be the max storage per node if there is any such limitation. I intend to use couple of nodes with 48TB storage (2TB X 24 hard drives 7200rpm) per node with some good dual xeon processor. I have looked up for such limitations if exists any but didn't find any material about this issue. And guys why there is so much less buzz about cassandra recently while its getting mature and its up 0.8 version while most of articles/blogs are related to 0.6v only. Cassandra distributes its data by row, so the only hard