filesize

Delphi Function to Display Number of Bytes as Windows Does

给你一囗甜甜゛ 提交于 2019-12-22 06:11:01
问题 This is a simple one (I think). Is there a system built in function, or a function that someone has created that can be called from Delphi, that will display a number of bytes (e.g. a filesize), the way Windows displays in a file's Properties box? e.g. This is how Windows property box displays various sizes: 539 bytes (539 bytes) 35.1 KB (35,974 bytes) 317 MB (332,531,365 bytes) 2.07 GB (2,224,617,077 bytes) The display is smart about using bytes, KB, MB or GB, and shows only 3 significant

Can I increase maxRequestLength of ASP.NET request for MVC Controller Action with additional parameters?

跟風遠走 提交于 2019-12-22 05:28:15
问题 Can I increase maxRequestLength of ASP.NET request for MVC Controller Action with additional parameters? I have a UploadController with a ActionResult looking somthing like this. [HttpPost] public ActionResult VideoUpload(int memberId) { var status= _docRepo.SaveDocument(DocumentType.Video, Request.Files, memberId); return Json(new { success = true, status = status}); } The files can be very large, i have increaset maxRequestLenght in web.config and can upload the files, but im worried about

Is there a way to output file size on disk in batch?

徘徊边缘 提交于 2019-12-22 05:27:18
问题 Is there a way to get the size on disk of a file like in the properties window: I have tried: (inside a batch file) echo %~z1 , for %i in (TestFile.txt) do echo %~zi , dir But they only return the size of the file(s). Is there any way to get the "size on disk" like the one seen in the properties window? 回答1: Interesting question. I'm not aware of the size on disk value being a property of any scriptable object. You could calculate it by getting filesize modulo bytes-per-cluster, subtracting

App install size the same on different device types

北战南征 提交于 2019-12-22 05:26:32
问题 When I install my app on my main/new phone, the installed size is around 18.5MB and when I install my app on an old Samsung Galaxy Ace (Mk1), for some reason, it installs with pretty much the same size, as you see here: It runs perfectly on my main phone, but obviously, the old Galaxy Ace really struggles with it. Now, I download a random game from the Play Store and with that one you can see the results here: Much better, it takes up less space on the less capable phone than it does on the

Is there an upper limit on .txt file size?

本秂侑毒 提交于 2019-12-22 01:37:54
问题 As a Christmas gift I have written a small program in Java to calculate primes. My intention was to leave it on all night, calculating the next prime and writing it to a .txt file. In the morning I would kill the program and take the .txt file to my friend for Christmas. Is there anything I should be worried about? Bear in mind that this is true beginner Ziggy you are talking to, not some smart error checking ASM guy. EDIT More specifically, since I will be leaving this program on all night

How to calculate ffmpeg output file size?

↘锁芯ラ 提交于 2019-12-21 04:59:08
问题 I am using ffmpeg to convert home videos to DVD format and want to calculate the output file size before doing the conversion. My input file has a bit rate of 7700 kbps and is 114 seconds long. The audio bitrate is 256 kbit (per second?) The input file is 77MB. To get this information I ran: mplayer -vo null -ao null -frames 0 -identify input.MOD So in theory, the input file should have (roughly) a file size of: ((7700 / 8) * 114) / 1024 That is, (7700 / 8) is kilobytes/second, multiplied by

Get file size without using System.IO.FileInfo?

三世轮回 提交于 2019-12-21 03:40:53
问题 Is it possible to get the size of a file in C# without using System.IO.FileInfo at all? I know that you can get other things like Name and Extension by using Path.GetFileName(yourFilePath) and Path.GetExtension(yourFilePath) respectively, but apparently not file size? Is there another way I can get file size without using System.IO.FileInfo ? The only reason for this is that, if I'm correct, FileInfo grabs more info than I really need, therefore it takes longer to gather all those FileInfo's

How do I quickly convert the size element of file.info() from bytes to KB, MB, GB, etc.?

喜夏-厌秋 提交于 2019-12-21 03:12:18
问题 I expect there is already an answer for this on stackoverflow, and I simply failed to find it. Desired outcome: Quickly convert the file size element in a file.info() call from bytes to KB, MB, etc. I'm fine if the output is either i) a character string with the desired size type, e.g., "96 bytes" or ii) simply a numeric conversion, e.g., from 60963 bytes to 60.963 KB (per Google). Repro steps: Create a folder to store the file: dir.create("census-app/data") Download the file (~60KB):

Reducing repository size in Mercurial

烈酒焚心 提交于 2019-12-20 17:47:12
问题 As my team works on a given project with the source in a Mercurial repository, the repository is obviously growing in size. As such, cloning a repository over the network becomes slower and slower. Are there any techniques that are used for pruning out older commits or reducing the size of the repo to make the cloning operation faster over a slow network? (We are using TortoiseHg as the Mercurial client but that (I'm guessing) shouldn't make a difference to the solution to this problem.) 回答1:

Any suggestions for shrinking a PDF file?

微笑、不失礼 提交于 2019-12-20 10:23:53
问题 We've got a .net 2.0 web system that dynamically builds pdf files. Some of these files can get pretty large - 12MB+. While processing time isn't a factor, really, the size of the files to be downloaded is in some cases. For the moment, let's assume that our B-grade pdf library is already making the smallest files that it knows how. (Although, if anyone has any suggestions on that front, do see this related question.) However, taking the 12MB file in question and sending it though the Acrobat