php,laravel,amazon-web-services,amazon-s3,storage
You could open up those S3 URLs to public viewing, but you probably wouldn't want to. You have to pay for the outgoing bandwidth every time someone views one of those images. You might want to check out Glide, a pretty simple-to-use image library that supports S3. Make sure to...
python,dictionary,storage,store,pickle
See my answer to a very closely related question http://stackoverflow.com/a/25244747/2379433, if you are ok with pickling to several files instead of a single file. Also see: http://stackoverflow.com/a/21948720/2379433 for other potential improvements, and here too: http://stackoverflow.com/a/24471659/2379433. If you are using numpy arrays, it can be very efficient, as both klepto and...
Thanks for asking back!! I am adapting my answer according to your use-case. Since you just need to write data each time after training,You should try this...
c#,storage,portable-class-library,application-settings
using System.Xml.Serialization; using PCLStorage; using System.IO; public virtual async Task<T> LoadSettings<T>(IFile file = null) where T : IApplicationSettings { // File if (file == null) file = DefaultSettingsFile; // Open file using (Stream fileStream = await file.OpenAsync(FileAccess.Read)) { var xmls = new XmlSerializer(typeof(T)); return (T)xmls.Deserialize(fileStream); } } public virtual...
javascript,android,html,css,storage
It looks like your webpage has some media in it (Video, image) which is not being loaded. Try: Add internet permission for your app. It is possible that the media is not loading because it is coming from the internet, but you don't have internet permission, so the webview does...
Here's an approach. I've added it, rather than simply let the question fall-through to code-review, since it failed to enable/disable the buttons correctly - you may see my comment above for more info. <!doctype html> <html> <head> <script> "use strict"; var img = [ ["http://i.imgur.com/B1YclC5.jpg", "Birdman or (The Unexpected Virtue...
azure,storage,web-api,azure-web-sites,outbound
To answer your questions: Am I wrong about outbound transfer costs not being applied to azure web sites? Sadly, Yes :) Any data that goes out of an Azure Datacenter (DC) incurs an outbound transfer cost and that includes data served through your websites. Is accessing blob storage from a...
osx,git,ubuntu,linux-kernel,storage
Set up NFS share on your Mac. This article solves (and describes configuration of thereof) almost the exactly the same problem... That said, nicer solution would seem to be setting up git server on your Mac and push there your commits....
The problem is that the Dictionary key has to be a String. So instead of declaring it [NSObject: AnyObject] you have to declare it as [String: AnyObject]. Also you are trying to load it from dic but you have to load it from retrievedDict. var dic :[String: AnyObject] = ["name":"steph"...
If you're storing multiple NxN grids, what's wrong with int[,,] foo = new int[LayerCount, size, size];? It's easy to index and plenty fast if you're doing random access. If you're doing sequential access, you can get better performance with jagged arrays, but initializing them is a bit inconvenient. The other...
The differences between databases and knowledge bases are diminishing. Traditionally they have been the following: Databases offer various properties that make them fit for transactional processing. Prolog does not offer those. On the other hand the Prolog database and knowledge bases in general permit to store general terms/data while (traditional)...
The basic idea that may work is to compute the first number which is power of two, and it is bigger than the number you got returned from the function. Ex: 2^5 = 32 > 26 In this case your number is 32. You should convert to integer before comparing...
mysql,database,storage,messages
A table per user is a bad idea. It means every query will be different and for every new user you will need to modify the database. This is hard to build, hard to maintain, and inefficient for your database too. So, just store it in one table. A couple...
java,android,storage,serializable
From documentation of Parcel: Parcel is not a general-purpose serialization mechanism. This class (and the corresponding Parcelable API for placing arbitrary objects into a Parcel) is designed as a high-performance IPC transport. As such, it is not appropriate to place any Parcel data in to persistent storage: changes in the...
javascript,google-chrome,local-storage,storage
You need to create your object separately. You cannot create dynamic property names with object literal syntax. Instead, first create the object, then add the property using square bracket notation: var obj = {}; obj[newStorageName] = 0; chrome.storage.local.set(obj, function(){}); ...
android,eclipse,sdk,install,storage
Assuming you already have a JDK installed, the bare minimum you need for Android development is the standalone SDK, the platform tools, and at least one version of the Android platform. All of that takes up less than 1/2gb. You can get the standalone SDK from here. Scroll down to...
php,mysql,database,doctrine2,storage
Just imho null - is expected by any framework or query as empty or not defined value in many cases. but if you try to use -1 or anything else. some query functions SUM(), AVG() etc could be broken by this value. So I see no reason to get bad...
Storage options = Azure Blob Storage only at this time. Based on documentation it appears you have to back your storage with Azure Blob Storage. The creation dialog forces you to choose an existing storage account or create a new one.
Edit: after your comment, I would suggest you create a junction table between users and recipes (i.e. to implement the "one user to many recipes" relation). That would take full advantage of SQL capabilities and save you a lot of sweat if you ever want to do some fancy queries...
linux,unix,ubuntu,storage,diskspace
Here's an awk script I wrote years ago to do this very thing. Just put it in cron to run at a specified schedule. #!/bin/sh /bin/df | \ /usr/bin/awk '{if($5 ~ "%" && $6 !~ "proc") {used=$5} else {used=""}; \ sub(/%/, "", used); \ if(used > 80) print $6 "...
1 and 2: try hostname -i > /path/to/filename or hostname -I > /path/to/filename
javascript,google-chrome-extension,storage,google-chrome-storage
You can't do that in a single API call. The API only gives access to top-level keys: you can get or set planA as a whole. So you'll need to write your own get/set functions, that retrieve the required top-level key, modify the object as required, and save it back....
c#,sql,winforms,schema,storage
I am assuming you are saving the data to an SQL database. Your invoice and item tables share a many to many relationship, so you should use a third table to link them together. Invoice: invoiceID, subtotal, tax, total Item: itemID, price InvoiceItem: invoiceItemID, invoiceID, itemID, quantity The InvoiceItem table...
php,mysql,sql,database,storage
I would suggest one table for the user and one table his/her bookmarked articles. USERs id - int autoincrement user_email - varchar50 PREFERENCES id int autoincrement article_index (datatype that you find accurate according to your structure) id_user (integer) This way it will be easy for a user to bookmark and...
Do we have similar support in android? No, sorry....
android,performance,storage,android-file
You call getRootDirectory() to get the system directory. If you want the true root of all folders, it's always just "/". So just do new File("/");
android,storage,android-sdcard,internal-storage
I've learnt that storage on Android OS is usually broken down into: From the Android SDK's standpoint, those are internal storage, external storage, and removable storage, respectively. I know that applications by default are installed into /data/data folder, so I assume that /data/ folder counts as internal storage. Your...
There are a few things you could try: Reduce the number of parallel uploads: You can try by reducing the number of parallel uploads to say number of logical processors (or may be half of that). So for example, if you have 8 core processor then you could try by...
My advise would be not to create a storage class since the Schraube class does not represent a singular entity but the properties of multiple entities. In this case you are setting the number of screws in a class that represents a screw. There are two solutions to this problem....
oracle,storage,space,disk,synonym
I think your understanding of synonyms is not quite correct. Synonym is a link on another object. As a shortcut on file on Windows or link on Linux. To be able to parallel change of some packages you need to make sure that your application could be installed on dedicated...
It seems that using SharedPreferences would be better suited for this task. See this post: Saving high scores in Android game - Shared Preferences Documentation: http://developer.android.com/reference/android/content/SharedPreferences.html...
Xilinx offers an IP Core generator. This IP catalog contains a Memory Interface Generator (MIG) which generates an IP Core to access different memory types. Configure this core for DDR3. Writing a DDR3 controller in VHDL is not a project for a beginner not even for an experienced designer. The...
android,storage,android-adapter
Solved by changing the for loop in on Create: if (dirFiles.length != 0) { // loops through the array of files, outputing the name to console for (int ii = 0; ii < dirFiles.length; ii++) { File file = dirFiles[ii]; String path = file.getAbsolutePath(); SelfieRecord selfie = new SelfieRecord(); selfie.setPic(path);...
javascript,save,storage,loading
I think the problem is that you didn't define prestige variable. var penguins = 0.0; var igloos = 0; var snowballs = 0.0; var prestige = 'prestige' function save(){ var save = { snowballs: snowballs, penguins: penguins, igloos: igloos, prestige: prestige } localStorage.setItem("save",JSON.stringify(save)); }; See this link, it will work:...
If all you want to know is hot to store data you can just use localStorage.setItem to save data and localStorage.getItem to retrieve those data. The simplest implementation would be app.controller('MyCtrl', function($scope, $http) { //retrieving saved object or init new array $scope.getItems = function () { //XXX if page is...
javascript,json,cordova,storage
If you are sure you want to be using local storage for this, you could check to see if the key exists before writing over it. if (!localStorage.getItem('data')) { //we haven't written the entries, write them localStorage.setItem('data', JSON.stringify({ "data":[ {"id":"0", "test":"test1"}, {"id":"1", "test":"test2"}, {"id":"2", "test":"test3"}, ] })); } getItem will...
php,android,mysql,storage,internal
Your question is about persisting data on device, there are multiple ways to do what you intended. First & foremost is that you store your local data not in file but in database (SQLITE) Then you need to form and data structure for sending data. JSON would be best, because...
SQLite is used in many situations where a database server isn't required. Apple uses it for things like their Mail app. You can use some of the built-ins of Xcode (like sqlite.h) or a command-line shim of some kind. Other variants of SQL will require a separate download. Core Data...
android,android-intent,storage,android-sdcard
It's possible that it's emulating the SD Card via the internal storage. Can you verify the contents of the external storage after unmounting SD card? (Also are you physically removing the SD card?)
To write the text of all the edittext you have to use following code: // write text to file public void WriteBtn(String finalString) { // add-write text into file try { FileOutputStream fileout=openFileOutput("mytextfile.txt", MODE_PRIVATE); OutputStreamWriter outputWriter=new OutputStreamWriter(fileout); outputWriter.write(finalString.toString()); outputWriter.close(); //display file saved message Toast.makeText(getBaseContext(), "File saved successfully!", Toast.LENGTH_SHORT).show(); } catch...
You can read here: http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory() that access to this folder is not recomended: Applications should not directly use this top-level directory, in order to avoid polluting the user's root namespace. Any files that are private to the application should be placed in a directory returned by Context.getExternalFilesDir, which the system...
sql-server,image,filesystems,storage
You shoud store images in disk and its path should be stored in database. If you want to re size image(use your C# codes) put it into another folder and store its path in db For more detail you can see Storing Images in DB - Yea or Nay? PHP...
newVal=val; This would make newVal point to same memory location as val i.e any changes to val would be reflected in newVal also. In your case it seems that you want newVal to be the copy of val. newVal = new char[strlen(val)+1]; //You can also use malloc. strcpy(newVal, val); //newVal...
Nexus uses Raw Nand flash for internal storage. For Bootloader, Rfs, kernel and preinstalled applications. you can find more information on this in the paper "Revisiting Storage for Smartphones" by NEC Laboratories America
If restarting Matlab is not an option, the "pack" function should help. Otherwise you could also use matlab without the gui and write a shell script that starts and matlab for each file.
Just change environment variable $HOME for each megasync instance. that you want to load. I've created a simple example script to that. It loads a mega.co.nz client inside each folder inside the path that contains the script....
android,sqlite,cloud,storage,android-contentprovider
This is a very generic question and I think someone might vote to close it but I will still attempt a generic answer. Essentially you want the data saved on some external data storage (not on device). So the obvious thing is a server. You will need to set up...
java,arrays,memory,storage,bitset
To answer about mapping 4D to 1D, if you visualize, say, a chess board, you can come up with the formula for 2D to 1D by thinking if every row has width elements, and I first go down row number of rows and then move over to col, then I'm...
android,storage,internal,android-context
First put your big network dealing operation in AsynTask then then update your productLookup method as below public String productLookup(String productID) throws IOException{ URL url = new URL("http://www.samplewebsite.com/" + productID + ".jpg"); InputStream input = null; FileOutputStream output = null; try { String outputName = productID + "-thumbnail.jpg"; input =...
android,cordova,storage,android-sqlite
if you use local storage then the data will be stored in browser's memory. it will not be saved on your Phone memory or SD Card. However, if you want to store some data then you can create SQLite Plugin for PhoneGap and store the Sqlite DB either in Phone...
android,storage,android-sdcard
/storage/sdcard0/ and /storage/sdcard1/ directory location for all android devices and versions available and unchanged? Absolutely not. They are not even the same for different users on the same device. NEVER HARDCODE ROOT PATHS. Always use methods on Context, Environment, etc., to get at root paths....
c#,azure,download,storage,blobs
The problem is that item.ToString() will return "Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob" and therefore no such blob exists resulting in a 404 error. Change that line to CloudBlockBlob blockBlob = container.GetBlockBlobReference(((CloudBlockBlob)item).Name); Edit: The code to write the file locally is incorrect as well. Try this foreach (var item in ListBlobs) { string name =...
filesystems,repository,storage
If performance is what you're worrying about, this will depend the type of filesystem you are using. Older filesystems like ext2 kept directory entries in a linear list. Looking up a particular file in a directory could be very expensive. Modern filesystems such as ext4, btrfs, xfs and others typically...
save,storage,loading,local,ionic
Inside error, $scope.data = data; will probably set $scope.data to undefined unless you have some global data variable we don't know of. I'm guessing your error function should be more like .error(function() { // You don't get any data from here, so setting anything based on it will produce undesired...
Apple provides the keychain for storing sensitive information. https://developer.apple.com/library/ios/documentation/Security/Conceptual/keychainServConcepts/01introduction/introduction.html#//apple_ref/doc/uid/TP30000897 You should not use NSUserDefaults or CoreData unless you have provided some means of encrypting the content, and even so, you'll still need to manage and store encryption keys securely. The keychain provides all of this for you, and with iOS...
android,android-studio,storage
I'm using a class Save.java that does all my picture saving for me and this is the part I create a directory: String file_path = Environment.getExternalStorageDirectory().getAbsolutePath()+ NameOfFolder; File dir = new File(file_path); if(!dir.exists()){ dir.mkdirs(); } The class is temporary available with this link I call the class like this: ImageView...
How to get images from camera without storing a file? Use the camera APIs directly (android.hardware.Camera, android.hardware.camera2.*). Right now, you are delegating the camera work to a third-party app. There are hundreds of pre-installed camera apps on the ~1.5 billion Android devices, and there are hundreds (perhaps thousands) more...
java,android,bitmap,save,storage
The Bitmap class has a compress() method for writing to an OutputStream bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); This will compress the bitmap using PNG format, which is lossless, so you won't sacrifice image quality by doing the compression. To access the file after it is written, use the decodeFile() method of BitmapFactory...
I think you should use localStorage.Test if the values are overwritten or deleted after app restart on device (specially for iOS), anyway.
.net,vb.net,windows-store-apps,windows-8.1,storage
After looking for a while this seems quite impossible to do. However I have found a way to go around the problem by passing each file 1 by 1 into a memorystream. It is possible to store an image into a memorystream and then, on the client, take that stream...
oracle,plsql,null,binary,storage
In PL/SQL DATE datatype stores fixed length values ... That's not quite right. A date has an internal representation using seven bytes, yes, and all actual dates have a length of seven bytes, if you want to look at it like that. You can see that in the dump()...
This is a bug in Kivy. Your last attempt was pretty much correct (equivalent to the code in @Anzel's answer, though @Anzel's code is a better way to write the same thing). But in the end you will still get the error thrown from _schedule. I've just submitted a PR...
caching,storage,consistency,acid
The basic way to overwrite data in a crash-safe way is: Write the data to a new storage location first. (You're not actually overwriting anything yet.) Tell the OS to flush the above to stable storage, using something like the POSIX fsync function. This is meant to flush caches and...
To get rid of "dangling" images, run the following: $ docker rmi $(docker images -q -f dangling=true) That should clear out all the images marked "none". Be aware however, that images will share base layers, so the total amount of diskspace used by Docker will be considerably less than what...
jquery,storage,selection,local
Store and set the value, not the entire HTML of the select $(function() { $('#edit').change(function() { localStorage.setItem('todoData', this.value); }); if(localStorage.getItem('todoData')){ $('#edit').val(localStorage.getItem('todoData')); } }); FIDDLE...
Is it possible to save data to another public location (where other apps can access)? You can save data to the Internet. Otherwise, no, there is no common local storage area other than external storage that would be relevant for your device....
It is not so simple. DRM functions use separate storage from non-protected area. There are special SD commands for DRM and in addition, there is "secret" part of SD Card spec. Buy membership for $1000 at sdcard.org and get the info :) In short - DRM features can be used...
objective-c,variables,object,properties,storage
"string", "textg", "number" and "numb" are instance variables to the class. The difference is that "string" and "number" are eligible to be publicly accessible (via ref->number), and "textg" and "numb" are private (since other classes conventionally do not #import .m files). "mURL" and "sURL" properties are stored as instance variables...
python,encryption,passwords,storage
No such frameworks had to write everything yourself.
You are confusing format specifiers. When you use %d in printf, the parameter you pass later should be int. When you use %p the parameter you pass to it should be address. Here: printf("storage location of a is: %p\n", *a); You indicate %p but pass integer to it (value of...
storage,persistent,pod,kubernetes
NFS Example: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/nfs GlusterFS Example: https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/glusterfs Hope that helps!...
android,storage,internal-storage
I can't find where the assets folder is That is because there is no assets folder on the device. The assets, like your resources, are packaged into the APK file. Assets are not unpacked as part of APK installation. file:///android_asset/, for those things that understand it, knows to look...
All storage accounts support both HTTPs and HTTP endpoints. All you need to do is access the URL with HTTP protocol.
image,compression,cloud,storage
Look into HayStack for large applications, uploading into a file system then storing into a DB would be sufficient for smaller applications even up to millions. However, larger companies such as flickr use haystack objects.
Use a disk cache. Jack Wharton's DiskLruCache is very good https://github.com/JakeWharton/DiskLruCache. It will save what you want to disk and read from it, and you can build around it to set max-age values for cache....
You wrote: The only use case could probably be when you run out of space. Other cases: The parent directory does not exist. For example, you're trying to access /data/data/packagename/some_custom_dir_not_yet_created/my_file. You'd need to first call file.getParentFile().mkdirs(). The file you're trying to read does not exist. FileNotFoundException extends IOException. You app...
Thanks @Der Golem and @Lars Tech (Plutonix) for your nice answers. I'have achieved half of my goal in this way: Public Sub toBitMap(ByVal indice) 'Define un nuevo bitmap con las dimensiones del form Dim miBitMap As New Bitmap(imprimir.Width, imprimir.Height) ' Dibuja la imagen del form en un objetoBitmap imprimir.DrawToBitmap(miBitMap, New...
In case you want to have user data with possibility for those users to be logged in and out, and since you are gonna use database anyway for your project, you should absolutely use that to store the information. The files are okay for that purpose too, if you don't...
So, in my understanding, p->name should be NULL Why should it be NULL? Does the documentation of free() say anywhere that this function zeroes out the underlying memory of the freed buffer? No. Then what's the question? Accessing the memory behind a free()'d pointer is undefined behavior. Don't do...
javascript,google-chrome-extension,storage
You should provide/request a key when you store/retreive your data: chrome.storage.sync.set({ MyRequest: request }, function(){ chrome.storage.sync.get{ MyRequest: null }, function(data){ console.log(data.MyRequest); } }); Also make sure you have permission "storage" declared in your manifest file: "permissions": ["storage"] ...
hadoop,amazon-web-services,hbase,storage,emr
The key question in your use case is how the data should be available between updates. If your goal is to have data accessible through a Hbase interface all the time then a Hbase cluster (like on EMR) would need to be up and running continually. Hbase currently only supports...
nosql,relational-database,storage
If an object can only belong to one bucket at a time then this should fit well with Postgres - you'd just need a buckets table with a set of unique bucket identifiers, and then the objects' tables would have a currentbucket column to indicate the bucket to which they...
transactions,asp.net-mvc-5,storage,windows-azure-storage,azure-virtual-machine
In this case, it seems you should create a separate container for the uploaded blobs and mark it public. Your app should save the user uploaded files to this public container. Then users can access the files from the container directly through the blob's URL. There are a few reasons...
storage,persistent,intersystems-cache,intersystems
Try making the num, name, type, or pay property required (if there are any that cannot be null). Caché defines the ^kza("mltab","TAB","Dta",1) node because if the other 4 field are all null, the existence of the ^kza("mltab","TAB","Dta",1) node defines the existence of the row. In other words, if num, name,...
objective-c,xcode,osx,cocoa,storage
I got my answer from the link. So I am posting what I did using that reference. NSError *error; NSFileManager *fm = [NSFileManager defaultManager]; NSDictionary *attr = [fm attributesOfFileSystemForPath:@"/" error:&error]; NSLog(@"Attr: %@", attr); float totalsizeGb = [[attr objectForKey:NSFileSystemSize]floatValue] / 1000000000; NSLog(@" size in GB %.2f",totalsizeGb); float freesizeGb = [[attr objectForKey:NSFileSystemFreeSize]floatValue]...
You can make a database and save them, the only way is this. A database with SQLITE or a .txt file. For example; with open("mylist.txt","w") as f: #in write mode f.write("{}".format(mylist)) Your list goes there, in to format() function. It'll make a txt file named mylist and will save your...
javascript,jquery,arrays,object,storage
You probably want to sort you highscores, so try: var playerName; var playerScore; var gameResult = {}; var highscoreList = []; function toHighscoreList() { playerName = $('#nameTag').text(); // for example value "Henry" playerScore = guessedWrong.length; // for example value 3 gameResult = {player: playerName, score: playerScore}; highscoreList.push(gameResult); highscoreList.sort(function(a,b) { return...
Rather than toggling the USB mode back and forth, consider if it might be effective and more convenient to transfer your development test data to and from the device using the adb push and adb pull commands. If you strongly prefer GUI interfaces, there is a file browser built atop...
I assume you use cordova/phonegap? They provide a sandbox supporting your Cookies, Localstorage, .. If you work with a lot of data you might consider local database like pouchdb....
python,database,numpy,data,storage
Reading 500 files in python should not take much time, as the overall file size is around few MB. Your data-structure is plain and simple in your file chunks, it ll not even take much time to parse I guess. Is the actual slowness is bcoz of opening and closing...
You are looking for file_put_contents(). Simply collect the data and write it to your file. Here is the refined code: PS: You could consider starting with the php code first :-) <?php // define variables and set to empty values $nameErr = ''; $emailErr = ''; $commentErr = ''; $likesErr...
ruby-on-rails,apache,ubuntu,amazon-web-services,storage
You only have 7.5G of total space. Your /etc folder is using up 3.7G, which seems like waaaay too much, and your home directory is 1.3G. Use du -sh * on each of these directories to find out what is using so much space in them and delete them if...
Create a mutable dictionary and keep it as a instance variable in the controller class, that refreshes/adds/edits the information. Speed isn't a factor when u are refreshing as the dictionary doesn't travels like a array, you can directly access the value by its key, you dont have to traverse through...
function showKeys(onlyClipKeys) { var totalBeginningWithClip = 0; for (var i = 0, len = localStorage.length; i < len; i++) { var key = localStorage.key(i); json = localStorage.getItem(key); console.log(key); var result = JSON.parse(json); if (onlyClipKeys) { if (key.indexOf('clip') === 0) { totalBeginningWithClip++; list.append("<li>" + result['id'] + " - " + result['title']...
algorithm,language-agnostic,binary,compression,storage
The information-theoretic minimum for storing 100 different values is log2100, which is about 6.644. In other words, the possible compression from 7 bits is a hair more than 5%. (log2100 / 7 is 94.91%.) If these pairs are simply for temporary storage during the algorithm, then it's almost certainly not...