Android SharedPreferences lightweight storage !, Android lightweight storage
First, store the data in the current process, that is, the current project.
SharedPreferences. Editor editor = mContext. getSharedPreferences ("tvplay", Context. MODE_PRIVATE). edit ();Editor. putString ("video", content. getString ("video "));Editor. commit ();
This is saved
SharedPreferences preferences = getTargetContext (). get
Android provides four data storage methods. However, because the stored data is private to its applications, if you need to use the data in other applications, you must use the content provider (Data Sharing) provided by Android ).
The official documentation has a detailed description: http://developer.android.com/guide/topics/data/data-storage.html
The four data storage methods in Android are as follows.
1
Some of the application's configuration files need to be stored on the phone. Generally divided into internal storage and SD card storage.One. Internal storage, to FileOutputStreamNew File (Getfilesdir (), "User.txt"); // Open local File preparation record Try { new fileoutputstream (file); Fos.write (User+ # # # +pass). GetBytes ());
OpenStack is a cloud computing software developed by NASA and Rackspace, which is licensed by Apache License and is a free software and open source project. OpenStack is the IaaS (infrastructure, service) software that allows anyone to build and provide cloud computing services on their own. In addition, OpenStack is also used to create a "private cloud" within a firewall (private Cloud) that provides the resources shared by organizations or departments within the enterprise.
The cinder provide
Proxyipservice; /*** MySQL Storage*/
/** public void process (Resultitems resultitems, Task Task) {* List*/
/*** Redis Storage*/
Public voidprocess (Resultitems resultitems, Task Task) {List); if(Proxyiplist! =NULL!Proxyiplist.isempty ())
{Proxyipservice.saveproxylistipinredis (proxyiplist); }
}
} Resultitems Object essence is a map. So when we save the object, we just need to en
HTML5 local Storage-Database Storage
In the previous article Web Storage of HTML5 local Storage, we briefly introduced how to use localStorage to implement local Storage. In fact, apart from sessionStorage and localStorage, HTML5 also supports local data
ADT for Stack:1 Packageren.laughing.datastructure.base;2 3 Importren.laughing.datastructure.exception.StackEmptyException;4 5 /**6 * Stack stack: LIFO7 * can only be inserted (into the stack), delete (stack) operation on top of the stack8 * @authorLaughing_lz9 * @time April 6, 2016Ten */ One Public InterfaceStack { A //returns the size of the stack - Public intgetsize (); - //determine if the stack is empty the Public BooleanisEmpty (); - //data element e into the stack
Android
External Storage stores store data files on the SD card.
1. When saving data, you must first judge the SD card status.
Environment. getExternalStorageState () can be used to display the running status of the SD card.
There are two statuses:
MEDIA_UNKNOWN,MEDIA_REMOVED,MEDIA_UNMOUNTED,MEDIA_CHECKING,MEDIA_NOFS,MEDIA_MOUNTED,MEDIA_MOUNTED_READ_ONLY,MEDIA_SHARED,MEDIA_BAD_REMOVAL, OrMEDIA_UNMOUNTABLE.
We generally use
MEDIA_MOUNTED is operable
2
Sesame HTTP: Non-relational database storage, Sesame database storage
NoSQL stands for Not Only SQL, meaning Not Only SQL, but also non-relational databases. NoSQL is based on key-value pairs and does not need to be parsed at the SQL layer. There is no coupling between data and the performance is very high.
Non-relational databases can be subdivided as follows.
Key-value
Redis/Distributed File Storage System/database storage session solves session inconsistency in the Server Load balancer cluster, redissession
Let's talk about the similarities and differences between sessions and cookies.
Session and cookie are not only stored on the server, but also stored on the client.
Although the session is stored on the server side, it also needs to match with the client. Imagine tha
MYSQL internal data storage has not been well documented. I am free to study it. [@ more @] 1. analyze row data with single fields: 1.1 create test data droptableifexistsheyf_5; createtableheyf_5 (namevarchar (50) typemyisamdefadefacharsetlatin1; insertintoheyf_5value
MYSQL internal data storage has not been well documented. I am free to study it. [@ more @] 1. use a single field to analyze row data: 1.1 cr
Lenovo Storage S3200/2200 Storage Management interface SMU (Storage Management Utility) is a Web-based application used to configure, monitor, and manage Storage systems, SMU is a web-based interface.There are two user interfaces available for SMU. SMU v2 is the traditional interface for managing linear
Sequential storage of linear tables means that the data elements in a linear table are stored sequentially with a contiguous set of storage cells, so that logically adjacent two elements are also adjacent to the physical location.
Sequential storage is a bit of a random access to the elements in the table, the disadvantage is that the insert and delete operation
itself "aggregate function is" "to pay attention to the problem of global and local variables" "Custom Function" "Create function Function_name () returns int//here returns is because of the SQL strong type Begin function Body End "There is no curly braces in MySQL to include examples of function bodies: delimiter $$//in order to not conflict with semicolons in internal SQL create function Hello_world () returns varchar ( Begin--Here is the comment statement in SQL return ' Hello World '; End $
This article translated from: http://developer.android.com/guide/topics/data/data-storage.html
Android provides several optional solutions for persistent data storage. The specific solution depends on your specific needs, such as whether the data is private to your application or accessible to other applications (and users, and the space required by the data.
The following are available storage solutions:
S
Understanding HBase (an open source Google bigtable practical application) The biggest difficulty is what is HBase's data structure concept? First, HBase differs from the general relational database, which is a database suitable for unstructured data storage. The other difference is that HBase is column-based instead of row-based patterns.Google's BigTable paper clearly explains what BigTable is:BigTable is a loosely distributed, long-lasting, multidi
6. Five data storage methods (I) and five Data Storage Methods
There are five storage methods for data in iOS development:
1. plist (XML Attribute list archiving)
2. preference settings3. NSKeydeArchiver archive (store custom objects)
1. plist (XML Attribute list archiving) can only access object-class filesMethod 1: (paths can be retrieved from all four folders)
I. Storage type: sharedpreferences storageTwo. Sharedpreferences Storage1. Features① stores single data, such as numeric, String, Boolean② file:/date/date/package name/shared_prefs/xxx.xml: ③ stored as key-value pairs④ can be set to not be manipulated by other apps2.API(1) sharedpreferences① Get Instance context.getsharedpreferences ():1) name store file name; 2) mode operation: Mode_private cannot be accessed by other application, overwrite mode, mod
Sqlserver high concurrency and big data storage solution, SQL Server Data Storage
With the increasing number of users, daily activity and peak value, database processing performance is facing a huge challenge. Next we will share with you the database optimization solution for the platform with over 0.1 million actual peaks. Discuss with everyone and learn from each other!
Case: game platform.
1. High concur
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.