1,413 questions
Tooling
0
votes
2
replies
41
views
Script to check real capacity without errors of a partition or a mounted path
I have bought to my kid a “2TB” external drive on AliExpress, but I have now realized that it may just come with hacked firmware, so I am looking for a tool or script to check the actual capacity of a ...
Best practices
0
votes
0
replies
39
views
Allowed the documents to open in browser instead of downloading. File with big size is failing to load
Allowed the documents to view in browser instead of downloading using Content disposition as inline. But files with huge size is failing to load but its different for different fie types.
Any size ...
0
votes
1
answer
62
views
Text clipped at 37kb when trying to make blob or arraybuffer and upload to sharepoint
I am trying to upload json data as a text file to SharePoint with javascripts stingify method using either blob or array buffer, but I keep getting only the first 37kb of the content saved. This is ...
0
votes
1
answer
148
views
File size formatting in PowerShell using "$([int]($_.length / 1mb)) MB" command
"$([int]($_.length / 1mb)) MB" command converts for example 19099648 to '18 MB', 12054528 to '11 MB'.
Why? How does this rounding work?
Similar differences are reflected in File Explorer's ...
-2
votes
1
answer
147
views
Get real time file size in java
There is an existing api which writes the file to particular location and the code snippet is like below:
long lastUpdatedOn = System.currentTimeMillis();
try(...
1
vote
1
answer
188
views
Why is there a 20MB chunks folder when I switch my Astro site to the Cloudflare adapter?
I have a very small Astro site with 1 page that should be rendered on the server, so I switched my static site over to SSR with the Cloudflare adapter, but this caused an almost 20MB folder to appear ...
-1
votes
1
answer
50
views
Calculating page document size for a URL in bytes
I wanted to create an function/API in node which will help me calculate the desktop and mobile page sizes for a given URL and also provide the compression/encoding strategy which was used by the ...
1
vote
0
answers
22
views
Platform-agnostic, determine if a file is sparse [duplicate]
I am trying to determine if a given file is a sparse file. I know there is a way to check using the windows native API, and that unix-based systems have the stat command to get numbers for logical ...
0
votes
1
answer
257
views
When you should use @apply in tailwind (and SCSS)
I've read that you should avoid using @apply with tailwind as much as you can. But it seems like this approach will not only make your html unbearable but it will bloat your CSS file as well. And I ...
1
vote
0
answers
219
views
Gemini Vertex AI Error upon uploading large file: 400 Precondition check failed
I am trying to upload files to Google's Gemini 1.5 Model via Vertex AI from google cloud. Despite the file limit being 30 mbs, a 11 mbs file raises this following error:
400 Precondition check failed
...
-1
votes
1
answer
114
views
PHP 8.2 filesize() unable to read from directory [closed]
I have looked up what my issue would be with filesize() that cant read the file size of a file which is in a sub directory (/media/). Also file_exists() and is_readable() gave negative feedback. ...
1
vote
1
answer
372
views
How to get available data in a pipe in linux
In Linux, after writing some data in a pipe (yet not read), when using fstat on read/write side of a pipe, the st_size field is zero. Is it possible to get the size of data available in a pipe?
Sample ...
2
votes
0
answers
121
views
Why does the ProGuard rule expand my APK size to be even larger than the jar itself?
I have finished a very simple demo just includes a button and textview.If I enable these two switch with empty proguard-rules.pro.The apk's size will be 1.5M.
build.gradle
buildTypes {
release {
...
0
votes
1
answer
95
views
Issue with file size validation using multer middleware in Node.js
I'm having an issue with validating the file size using the multer middleware in a Node.js application. I have implemented a custom middleware setFileLimit to set the file size limit based on the file ...
1
vote
2
answers
236
views
Should I prefer using basic_istream::tellg() or filesystem::file_size()?
Suppose I have a std::filesystem::path, which I then open as an std::ifstream, and suppose that I want to determine its size (e.g. maybe I want to read the whole file).
Should I prefer calling
auto ...