size

favicon.ico filesize == 60KB?

和自甴很熟 提交于 2019-12-07 11:19:46
问题 So as to waste some more time today, I converted a .jpg file to .ico and put it in favicon.ico. The .jpg is less than 1KB big; the .ico file is ** 60KB ** !!, bigger than the html page I'm putting it on. I used the online converter at http://www.coolutils.com/online/image-converter/ 60KB cannot be a reasonable size for an icon. Can it? Thanks! -- pete 回答1: .ico files are unique because they can contain multiple resolution images and the most appropriate one is used. The site probably created

Batch File To Display Directory Size

℡╲_俬逩灬. 提交于 2019-12-07 11:17:23
问题 Hi guys just wondering if u can help me modify this script that ive been playing around with, i cant get it to accept wildcard charcters '*' @echo off setLocal EnableDelayedExpansion set /a value=0 set /a sum=0 FOR /R %1 %%I IN (*) DO ( set /a value=%%~zI/1024 set /a sum=!sum!+!value! ) @echo Size is: !sum! k Its in a batch file called dirsize and is called like so dirsize c:\folder I want it to check folder sizes for me, this one here is an example, the cache in firefox dirsize C:\users\

How to get the button's border size in Android

爷,独闯天下 提交于 2019-12-07 08:29:30
How can I get the border width of a stand Android button programmatically? I simply need to resize the text to fit to the gray area and need to position other objects inline with the buttons, but I cannot do that without knowing the size of the border. I need this to work in all API's 7+. The red arrows in the image below show what I am trying to get: Here is the code I use for creating my button: cmdView = new Button(this); params = new RelativeLayout.LayoutParams(widthLblViewVerbs , (int) fieldHeight); params.leftMargin = (int) (screenWidth - params.width); params.topMargin = (int) yPos;

Standard allocation ratio for Java heap

微笑、不失礼 提交于 2019-12-07 07:19:12
问题 I've tried to search for an answer to this question, but never managed to find any. What is the standard ratio for allocating size to the Java GC spaces when I define a maximum heap size? That is: if I start my JVM with, say 4Gb of heap, how much is allocated to the Eden? How much to survivors? How much to tenured? Also, does that ratio change for different VM vendors? Thanks in advance 回答1: This is JVM-specific. On Oracle's JVMs, you can find out the heap sizes by using -XX:

Reducing GCC target EXE code size?

不打扰是莪最后的温柔 提交于 2019-12-07 06:45:08
问题 When I compiled a no-op program: int main(void) { return 0; } with various compilers: GCC (similar result to LLVM as well): Gave a 10-KiB executable (compiled with -s ) Sections: .CRT , .bss , .data , .idata , .rdata , .text , .tls Depends on msvcrt.dll and kernel32.dll MSVC 2010: Gave a 5.5 KiB executable (compiled with /MD /Ox ) Sections: .data , .rdata , .reloc , .text Depends on msvcr100.dll and kernel32.dll Could have been further reduced by merging .rdata with .text Windows Driver Kit 7

ANDROID: Finding the size of individual tables in a SqliteDatabase

故事扮演 提交于 2019-12-07 06:13:30
问题 I am trying to do something along the following lines: SELECT bytes from user_segments where segment_name = 'TABLE_NAME'; I know that I can get the size of the whole database by mDb = SQLiteDatabase; long size = new File(mDb.getPath()).length(); Is it possible to get how much space an individual table takes up in storage in Android's SQLiteDatabase? EDIT-- By the lack of response, I guess that it's not possible with SQLite. I am currently using a hack-ish way where I count the number of rows

Which would make a Class file bigger? import java.awt.*, or a bunch or single import statements? [duplicate]

那年仲夏 提交于 2019-12-07 05:51:52
问题 This question already has answers here : Why using a wild card with a Java import statement bad? (14 answers) Closed 6 years ago . Okay, so if I had a project that used: import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Dimension; import java.awt.Font; import java.awt.Color; import java.awt.Polygon; Would it make the Class file smaller to use: import java.awt.* I'm thinking against it because I'm importing a lot of things I don't need. I'm thinking for it cause it makes

iphone : sizeWithFont method does not identify the '\n' from string

孤人 提交于 2019-12-07 05:41:43
问题 I am using below code to calculate the size for the label for a string. NSString * str = @"It's \n that \n don't \n"; CGSize size = [str sizeWithFont:[UIFont fontWithName:@"Verdana" size:12.5] forWidth:300 lineBreakMode:UILineBreakModeWordWrap]; NSLog(@"Height : %f Width : %f ",size.height,size.width); But id does not consider \n characters from the string to change the line. When I display this string on a label and set it numberOfLines property to some 4 or 5 , label does consider the \n

How to get exact capacity from storage

☆樱花仙子☆ 提交于 2019-12-07 04:54:36
I want to read the exact capacity from the intern storage programmatically. I's a Samsung Galaxy S7 Edge 32GB device what I am using. In the preinstalled Samsung FileManager (In German: Eigene Dateien) it shows me the total capacity of 32GB. Even in the menu => settings => Storage it shows me 32GB. (Showed in screenshots) When I use my code below it shows me a total capacity of 24,4GB. (Showed in Log at the end of the post) Question: How to get the exact 32GB total capacity of my device? Screenshots Full Code: package spicysoftware.com.space; import android.os.Environment; import android.os

C89: signed/unsigned mismatch

感情迁移 提交于 2019-12-07 04:49:49
问题 Are signed/unsigned mismatches necessarily bad? Here is my program: int main(int argc, char *argv[]) { unsigned int i; for (i = 1; i < argc; i++) { // signed/unsigned mismatch here } } argc is signed, i is not. Is this a problem? 回答1: "signed/unsigned mismatches" can be bad. In your question, you are asking about comparisons. When comparing two values of the same base type, but one signed and one unsigned, the signed value is converted to unsigned. So, int i = -1; unsigned int j = 10; if (i <