data-storage

Why does MySQL unix time stop short of the 32 bit unsigned integer limit?

人盡茶涼 提交于 2019-12-01 17:28:18
mysql> SELECT FROM_UNIXTIME(2145916799), FROM_UNIXTIME(2145916800), POW(2,32-1)-1, 2145916799 - POW(2,32-1)-1; +---------------------------+---------------------------+---------------+----------------------------+ | FROM_UNIXTIME(2145916799) | FROM_UNIXTIME(2145916800) | POW(2,32-1)-1 | 2145916799 - POW(2,32-1)-1 | +---------------------------+---------------------------+---------------+----------------------------+ | 2037-12-31 18:59:59 | NULL | 2147483647 | -1566850 | +---------------------------+---------------------------+---------------+----------------------------+ 1 row in set (0.00 sec

Store array of numbers in database field

喜欢而已 提交于 2019-12-01 14:59:13
Context: SQL Server 2008, C# I have an array of integers (0-10 elements). Data doesn't change often, but is retrieved often. I could create a separate table to store the numbers, but for some reason it feels like that wouldn't be optimal. Question #1: Should I store my array in a separate table? Please give reasons for one way or the other. Question #2: (regardless of what the answer to Q#1 is), what's the "best" way to store int[] in database field? XML? JSON? CSV? EDIT: Some background: numbers being stored are just some coefficients that don't participate in any relationship, and are always

How to store binary data in MySQL [duplicate]

醉酒当歌 提交于 2019-12-01 12:17:13
This question already has an answer here: Binary Data in MySQL [closed] 9 answers How do I store binary data in a MySQL database? This question is not so straight forward to answer, as it sounds: There are lots of different binary data usage patterns out there, each with their own caveats and pros and cons. Let me try to summarize: Short pieces of binary data, such as password hashes, work very well by simply base64-encoding them and storing the resulting string as a VARCHAR "Not-quite-binary" data, such as document snipplets with the occasional non-printable can be escaped and sored as a

Can't find the file stored on Internal Storage of Device on File Explorer

爱⌒轻易说出口 提交于 2019-12-01 08:08:44
I used the following code to store the file on Internal Storage in Application run on a device. private void writeToFile(String s){ try { // catches IOException below FileOutputStream fOut = openFileOutput("samplefile.txt", MODE_WORLD_READABLE); OutputStreamWriter osw = new OutputStreamWriter(fOut); osw.write(s); osw.flush(); osw.close(); FileInputStream fIn = openFileInput("samplefile.txt"); InputStreamReader isr = new InputStreamReader(fIn); char[] inputBuffer = new char[s.length()]; isr.read(inputBuffer); String readString = new String(inputBuffer); Log.i("String", readString); } catch

Can't find the file stored on Internal Storage of Device on File Explorer

给你一囗甜甜゛ 提交于 2019-12-01 06:20:44
问题 I used the following code to store the file on Internal Storage in Application run on a device. private void writeToFile(String s){ try { // catches IOException below FileOutputStream fOut = openFileOutput("samplefile.txt", MODE_WORLD_READABLE); OutputStreamWriter osw = new OutputStreamWriter(fOut); osw.write(s); osw.flush(); osw.close(); FileInputStream fIn = openFileInput("samplefile.txt"); InputStreamReader isr = new InputStreamReader(fIn); char[] inputBuffer = new char[s.length()]; isr

Rejection: “2.23: Apps must follow the iOS Data Storage Guidelines”, We do not have any data saved in documents folder

ε祈祈猫儿з 提交于 2019-11-30 20:59:06
Our App has been rejected from App, the reason is: 2.23 We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines. In particular, we found that on launch and/or content download, your app stores over 2 MB data. To check how much data your app is storing: Install and launch your app Go to Settings > iCloud > Storage & Backup > Manage Storage If necessary, tap "Show all apps" Check your app's storage The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits

Rejection: “2.23: Apps must follow the iOS Data Storage Guidelines”, We do not have any data saved in documents folder

混江龙づ霸主 提交于 2019-11-30 17:17:30
问题 Our App has been rejected from App, the reason is: 2.23 We found that your app does not follow the iOS Data Storage Guidelines, which is required per the App Store Review Guidelines. In particular, we found that on launch and/or content download, your app stores over 2 MB data. To check how much data your app is storing: Install and launch your app Go to Settings > iCloud > Storage & Backup > Manage Storage If necessary, tap "Show all apps" Check your app's storage The iOS Data Storage

Should i write sqlite database file to Documents directory or Library/Caches?

前提是你 提交于 2019-11-30 15:14:08
I have read the Data Storage guidelines of Apple and am really confused as to where i should keep the sqlite database files i am creating in my app. I want to read from the sqlite files even when the app is in Offfline mode. I read that such files created should be kept in the Library/caches with the "do not backup" flag set. Please suggest me the right approach for doing the same. The answer depends on how your database files are created: According to the Data Storage Guidelines page : Only documents and other data that is user-generated, or that cannot otherwise be recreated by your

How to best handle the storage of historical data?

蓝咒 提交于 2019-11-30 03:41:36
I'm trying to determine how I should store historical transactional data. Should I store it in a single table where the record just gets reinserted with a new timestamp each time? Should I break out the historical data into a separate 'history' table and only keep current data in the 'active' table. If so, how do I best do that? With a trigger that automatically copies the data to the history table? Or with logic in my application? Update per Welbog's comment: There will be large amounts of historical data (hundreds of thousands of rows - eventually potentially millions) Primarily searches and

Should i write sqlite database file to Documents directory or Library/Caches?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 21:13:51
问题 I have read the Data Storage guidelines of Apple and am really confused as to where i should keep the sqlite database files i am creating in my app. I want to read from the sqlite files even when the app is in Offfline mode. I read that such files created should be kept in the Library/caches with the "do not backup" flag set. Please suggest me the right approach for doing the same. 回答1: The answer depends on how your database files are created: According to the Data Storage Guidelines page: