Menu
  • HOME
  • TAGS

Laravel 5.1 AWS S3 Storage, how to link images?

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...

Store large dictionary to file in Python

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...

Django: Storing huge matrix in table or in a file?

django,database,file,storage

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...

What is the best way to store settings in C# PCL [closed]

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...

HTML,css,js issue when loading html from sdcard to webview in android?

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...

A Simple Image Gallery from scratch

javascript,html,image,storage

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...

Strategy to minimize Azure storage outbound data costs

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...

How to use macbook storage space for linux kernel development from other linux machine?

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....

Storing a dictionary in swift in permanent storage

swift,storage,permanent

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"...

C# Efficiently store large int data

c#,arrays,dictionary,storage

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...

Difference between knowledge base and database

database,prolog,nlp,storage

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)...

How to get total internal memory (including system memory)

android,storage,environment

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...

How to store messages between users in database?

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...

Use parcelable to store item as sharedpreferences?

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 storing actual name of a string variable rather than its value in localStorage

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(){}); ...

Install android sdk in eclipse without downloading full os

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...

Is it better to use `null` or `-1` to indicate “infinite” in integer columns of the database

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...

What storage options are available for using PlayReady on Azure Media Services?

storage,azure-media-services

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.

What would be the best idea for this kind of storage in database?

mysql,database,storage

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...

Send alert for 80% threshold comparing two values from Disk partition

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 "...

a linux script to get workstation ip then save it and upload it to cloud [closed]

bash,cloud,storage

1 and 2: try hostname -i > /path/to/filename or hostname -I > /path/to/filename

how to remove data from a object using chrome storage?

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....

Save order data to local database

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...

What is the proper way to store user preferences in a database?

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...

StorageItemAccessList like functionality in Android

android,windows,storage

Do we have similar support in android? No, sorry....

Android: Is this method always available and present?

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("/");

where is internal storage, phone storage and external storage [closed]

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...

Is there a way of stopping Azure Storage PutBlock method from timing out?

c#,azure,storage

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...

Creating a storage class, sorted and limited by weight

java,arraylist,storage

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....

How many disk space oracle synonym takes?

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...

Retrieving a value from a text file

android,text-files,storage

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...

Spartan 6 SP605 VHDL external ram usage?

storage,vhdl,ram,spartan

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...

Loading image in onCreate doesn't fill adapter correctly

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);...

Save object using HTML 5

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:...

AngularJS - store page data

json,angularjs,storage

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...

Cordova/Javascript localStorage.setItem Only on first boot

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...

Detecting internet and saving to internal storage in that case in Android using PHP and MySQL

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...

How to store/retrieve data in OS X applications?

database,xcode,osx,storage

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 sometimes my secondary storage.exists() returns true even if I unmount it

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?)

Saving a bunch of integers to file android

android,storage,internal

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...

Can't read file in subdirectory on android

android,file,storage

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...

Storing images in MSSQL vs Disk

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...

Storing pointer value into separate variable

c++,pointers,char,storage

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...

Mobile internal storage type

android,storage

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

Not enough storage is available to complete this operation - matlab

matlab,storage,ram

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.

Running Multiple Instances of megasync in Linux

linux,cloud,storage

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....

Which storage option for preserving app data in android?

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- Mapping multi-dimensional arrays to single

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...

Context, storing internal memory and reading from it

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 =...

Where does android phonegap application data saved?

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...

Is the storage location “storage” for all Android devices and versions fixed?

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 all files

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 =...

Ideal number of files per folder for large sets of files

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...

Ionic: Trouble saving/loading data from local storage

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...

Proper way to store username and password in iOS application

ios,iphone,security,storage

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...

Saving to external storage

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...

Android: How to get images from camera without storing a file?

android,camera,storage,ram

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...

Android: How to write a Bitmap to internal storage

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...

session Storage not working in device

ios,session,storage,ionic

I think you should use localStorage.Test if the values are overwritten or deleted after app restart on device (specially for iOS), anyway.

How can i access the objects in adf model layer into view layer

object,view,model,storage,adf

Create an AM method for whatever you want to do and then expose it in AM client interface. This will make method available in AM data control and from there it could added in your page bindings.

Get folder from windows service(system.io) to Windows store App (Windows.Storage)

.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...

Representing NULL in binary

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()...

python kivy async storage

python,storage,kivy

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...

Write file: Data consistency in practice

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...

Docker images eats up lots of space?

storage,docker,boot2docker

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...

How to save select option in localStorage with jQuery?

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...

Where to save public data when External Storage status is “removed”?

android,storage

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....

What are the practical consequences of SD card DRM?

file,storage,flash-memory

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...

Storage of Objective C property variables and non property variables

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...

The storage system passwords

python,encryption,passwords,storage

No such frameworks had to write everything yourself.

What is the source of a wrong pointer value?

c,storage

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...

Kubernetes Storage on bare-metal/private cloud

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!...

Why can't I see `assets` folder in my Android package installation folder

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...

How to Create a Public Storage w/ HTTP Endpoint Azure

http,azure,storage

All storage accounts support both HTTPs and HTTP endpoints. All you need to do is access the URL with HTTP protocol.

How do large image services store their images efficiently?

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.

Best solution to cache objects and images on Android? [closed]

android,caching,storage

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....

Android: Is there any use case where internal file storage can cause an IOException?

android,storage,ioexception

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...

Storing bitmap into sql

vb.net,image,storage

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...

How to store parameters for my app (phonegap)

cordova,storage,pouchdb

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...

I free() a pointer to a struct but its attributes are still there. How is this possible? [duplicate]

c,malloc,storage,free,ram

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...

Chrome extensions : cannot get back my stored datas

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"] ...

Use case HBase on EMR

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...

Best storage option for temporary data

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...

Should I use Blob storage or Azure VM storage for files?

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...

Intersystems Caché custom storage of persistent object

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,...

How to get storage capacity of mac programatically?

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]...

Python Storing Data

python,storage

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...

Saving objects in array for highscore list

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...

Programmatically switch USB between shared (disk mode) and mounted (charge only)

android,usb,storage

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...

Cookies in a mobile app

angularjs,cookies,storage

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....

Better way to store a set of files with arrays?

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...

How to store php form data to a web server in a plain text file?

php,forms,server,storage

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...

No space left on device [closed]

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...

Storing Mutable Dictionary in iOS

ios,dictionary,storage

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...

Retrieve localStorage values which start with certain words

jquery,html5,storage,local

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']...

Efficiently Store List of Numbers in Binary Format

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...