size

Change size of font System.out.println

我只是一个虾纸丫 提交于 2019-12-17 14:56:33
问题 Can you tell me how to increase the size of the font using System.out.println in java. 回答1: There is no concept of "font" with System.out . Edit the console font settings for whatever application you're using as an output console. 回答2: You cannot do this through coding as in the font size is based on your console. I assumed you use eclipse to code your java code. So, you can change eclipse console font size here. General > Appearance > Colors and Fonts Which you can get the source here. http:

Why does the calculated width and height in pixel of a string in Tkinter differ between platforms?

一个人想着一个人 提交于 2019-12-17 09:41:28
问题 I have a Python script which needs to calculate the exact size of arbitrary strings displayed in arbitrary fonts in order to generate simple diagrams. I can easily do it with Tkinter. import Tkinter as tk import tkFont root = tk.Tk() canvas = tk.Canvas(root, width=300, height=200) canvas.pack() (x,y) = (5,5) text = "yellow world" fonts = [] for (family,size) in [("times",12),("times",24)]: font = tkFont.Font(family=family, size=size) (w,h) = (font.measure(text),font.metrics("linespace"))

PHPExcel auto size column width

一世执手 提交于 2019-12-17 08:16:13
问题 I'm trying to auto size the columns of my sheet. I'm writing the file and in the end I try to resize all of my columns. // Add some data $objPHPExcel->setActiveSheetIndex(0) ->setCellValue('B1', 'test1111111111111111111111') ->setCellValue('C1', 'test1111111111111') ->setCellValue('D1', 'test1111111') ->setCellValue('E1', 'test11111') ->setCellValue('F1', 'test1') ->setCellValue('G1', 'test1'); foreach($objPHPExcel->getActiveSheet()->getColumnDimension() as $col) { $col->setAutoSize(true); }

How to list all folder with size via batch file

时光怂恿深爱的人放手 提交于 2019-12-17 07:38:43
问题 I want a simple solution for list of folders and size of them in either txt or csv format. I use this code for folder list dir C:\Temp\*.* /b /a:d > C:\folderList.txt current output <<folderList.txt>> folder1 folder2 folder3 desired output <<folderList.txt>> folder1 # 100 MB folder2 # 30 MB folder3 # 110 MB Simply it would generate the size of each folder.. How can I proceed?? any help 回答1: For each folder in the list, use dir command to retrieve the size of the files under the folder @echo

How to reliably get size of C-style array?

妖精的绣舞 提交于 2019-12-17 07:37:51
问题 How do I reliably get the size of a C-style array? The method often recommended seems to be to use sizeof , but it doesn't work in the foo function, where x is passed in: #include <iostream> void foo(int x[]) { std::cerr << (sizeof(x) / sizeof(int)); // 2 } int main(){ int x[] = {1,2,3,4,5}; std::cerr << (sizeof(x) / sizeof(int)); // 5 foo(x); return 0; } Answers to this question recommend sizeof but they don't say that it (apparently?) doesn't work if you pass the array around. So, do I have

How to list all folder with size via batch file

﹥>﹥吖頭↗ 提交于 2019-12-17 07:34:59
问题 I want a simple solution for list of folders and size of them in either txt or csv format. I use this code for folder list dir C:\Temp\*.* /b /a:d > C:\folderList.txt current output <<folderList.txt>> folder1 folder2 folder3 desired output <<folderList.txt>> folder1 # 100 MB folder2 # 30 MB folder3 # 110 MB Simply it would generate the size of each folder.. How can I proceed?? any help 回答1: For each folder in the list, use dir command to retrieve the size of the files under the folder @echo

Getting terminal size in c for windows?

本秂侑毒 提交于 2019-12-17 06:38:45
问题 How to check ymax and xmax in a console window, under Windows, using plain c? There is this piece of code for linux: #include <stdio.h> #include <sys/ioctl.h> int main (void) { struct winsize max; ioctl(0, TIOCGWINSZ , &max); printf ("lines %d\n", max.ws_row); printf ("columns %d\n", max.ws_col); } Now I wonder how can I do the same for windows. I tried winioctl.h but it does not define struct winsize nor any other with a similar name. Any tips? Thanks. PS. In linux you also can find the

Difference between long and int data types [duplicate]

前提是你 提交于 2019-12-17 06:29:10
问题 This question already has answers here : What is the difference between an int and a long in C++? (9 answers) Closed 4 years ago . Considering that the following statements return 4 , what is the difference between the int and long types in C++? sizeof(int) sizeof(long) 回答1: From this reference: An int was originally intended to be the "natural" word size of the processor. Many modern processors can handle different word sizes with equal ease. Also, this bit: On many (but not all) C and C++

Pipe buffer size is 4k or 64k?

孤街醉人 提交于 2019-12-17 06:27:48
问题 I read in multiple places that the default buffer size for a pipe is 4kB (for instance, here), and my ulimit -a tends to confirm that statement: $ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 15923 max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 // 8 * 512B = 4kB POSIX message queues (bytes, -q) 819200 real

Android screen size HDPI, LDPI, MDPI [duplicate]

感情迁移 提交于 2019-12-17 06:20:21
问题 This question already has answers here : Android splash screen image sizes to fit all devices (10 answers) Closed 5 years ago . I have a background that I need fit in all screen sizes. I have three folders, hdpi , ldpi and mdpi for drawables, but in the emulator there isn't any referense to what resolution hdpi is and what mdpi and ldpi are. 回答1: You should read Supporting multiple screens. You must define dpi on your emulator. 240 is hdpi, 160 is mdpi and below that are usually ldpi. Extract