Tutorial by Examples: blob

JavaScript has two primary ways to represent binary data in the browser. ArrayBuffers/TypedArrays contain mutable (though still fixed-length) binary data which you can directly manipulate. Blobs contain immutable binary data which can only be accessed through the asynchronous File interface. Conver...
A blob contains arbitrary binary file contents. Commonly, it will be raw text such as source code or a blog article. But it could just as easily be the bytes of a PNG file or anything else. If you have the hash of a blob, you can look at it's contents. $ git cat-file -p d429810 package com.exampl...
A simple example of a Function that gets triggered when a Azure Storage Blob is modified: public static async Task BlobTrigger( [BlobTrigger("my_container/{name}.{ext}")] Stream input, string name, string ext) { //Blob with name {name} and extension {ext} using (StreamRead...
db.posts.find().forEach(function(doc){ if(doc.commentsBlobId){ var commentsBlob = db.comments.findOne({'_id': commentsBlobId }); db.posts.update({_id: doc._id}, {$set:{'comments': commentsBlob }}, false, true); } });
function createGoogleDriveFileWithBlob() { var blob,character,data,fileName,i,L,max,min,newFile,randomNmbr;//Declare variable names fileName = "Test Blob " + new Date().toString().slice(0,15);//Create a new file name with date on end L = 500;//Define how many times to loo...
There’s no API that can rename the blob file on Azure. This code snippet demonstrates how to rename a blob file in Microsoft Azure Blob Storage. StorageCredentials cred = new StorageCredentials("[Your storage account name]", "[Your storage account key]"); CloudBlobContainer c...
function createGoogleDriveFileWithBlob() { var blob,character,data,fileName,i,L,max,min,newFile,randomNmbr;//Declare variable names fileName = "Test Blob " + new Date().toString().slice(0,15);//Create a new file name with date on end L = 500;//Define how many times to loop...
This example shows how to find circular blobs in an grayscale image. The evaluation of the circularity of a blob is done using the area and the perimeter (arc length) of the contour. The center point gets evaluated using the moments of the contour. #include "opencv/cv.h" #include &quot...
There’s no API that can break the locked lease of blob storage in Microsoft Azure . This code snippet demonstrates break the locked lease of blob storage in Microsoft Azure (PowerShell). $key = (Get-AzureRmStorageAccountKey -ResourceGroupName $selectedStorageAccount.ResourceGroupName -name $select...
Here is an example of an Azure Powershell automation runbook that deletes any blobs in an Azure storage container that are older than a number of days. This may be useful for removing old SQL backups to save cost and space. It takes a number of parameters which are self explanatory. Note: I have ...
function downloadCsv() { var blob = new Blob([csvString]); if (window.navigator.msSaveOrOpenBlob){ window.navigator.msSaveBlob(blob, "filename.csv"); } else { var a = window.document.createElement("a"); a.href = window.URL.createObjectURL(blob, { ...

Page 1 of 1