size

Android: ImageView scales up source image

扶醉桌前 提交于 2019-12-10 13:06:01
问题 I can't seem to get my ImageView to display its source image in its original size. The ImageView looks like this: <ImageView android:id="@+id/Logo" android:src="@drawable/logo" android:layout_width="wrap_content" android:layout_height="wrap_content" > </ImageView> The source image is 140 pixels wide, yet on the Nexus One's screen, which is 480 pixels wide it uses up half of the width. Using absolute values in px or dp for the width and height changes nothing. The image also looks very

When is Panel.Size updated after adding controls when Panel.AutoSize = true?

对着背影说爱祢 提交于 2019-12-10 12:58:51
问题 I'm creating a GUI in C# using WinForms . I'm trying to position programaticaly created panels one below the other. As the content of these panel can vary depending on their content, I'm using Panel.AutoSize to let WinForms perform the correct resizing. The problem is: if I'm using Panel.Height (or Panel.Size.Height ) right after populating the Panel , the value returned is always my default value. The resizing do occur, as I can see when launching the app, but I just don't know when. Here's

How to avoid having a Window smaller than the minimum size of a UserControl in WPF?

僤鯓⒐⒋嵵緔 提交于 2019-12-10 12:41:40
问题 I have an usercontrol (a statusbar) that has an implicit minimum size (not set via the property, what I mean is that when it reaches a minimum size it can not be reduced and it's cropped). Is there a way to let the main window know that the UserControl will being to be cropped and don't allow it to reduce its size? With such a smart layout system as WPF has it must be a way that it knows that it's cropping things. Look at the next image: 回答1: Include MinHeight="MinSize" MinWidth="MinSize"

Size of an array C++ [duplicate]

江枫思渺然 提交于 2019-12-10 12:39:38
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Sizeof array passed as parameter I was wondering why the output of the following code is 1 and 9. Is that because of undeclared array in function size? How can I separate "size of array" to a function? #include "stdafx.h" #include <iostream> using namespace std; int size(int a[]) { return sizeof a/sizeof a[0]; } int main() { int a[] = {5,2,4,7,1,8,9,10,6}; cout << size(a) << endl; cout << sizeof a/sizeof a[0] <<

Is there a currently used system with a C++ compiler where int is over 32 bits wide?

人盡茶涼 提交于 2019-12-10 12:38:17
问题 C++ standard says only that int has to be at least 16 bits wide . And at least according to cppreference, it's almost always either 16 or 32 bits wide: data model int width in bits ---------------------------------- C++ standard at least 16 LP32 16 ILP32 32 LLP64 32 LP64 32 ... Other models are very rare. For example, ILP64 (8/8/8: int, long, and pointer are 64-bit) only appeared in some early 64-bit Unix systems (e.g. Unicos on Cray). Is there an example of a currently used system with a C++

WPF databinding to a Size property

二次信任 提交于 2019-12-10 11:56:33
问题 I have a problem with databinding in WPF, here's my exemplary class: public class testClass { public Size testInnerSize; public testClass() { testInnerSize = new Size(66, 99); } } I want to bind a TextBox in my form to the property of testInnerSize, let's say Width. So I'm setting the DataContext of this textbox to the testClass object and in XAML: <TextBox Text="{Binding Path=testInnerSize.Width }" Name="textBox3" (...) But it does not work, the textbox is empty instead of having value 66.

reduce size of PDF generated with FOP

佐手、 提交于 2019-12-10 11:44:50
问题 I have unsuccessfully browsed this site (that has so often saved my life in the past) and the web for an answer to this question: I use Java, XSL-FO and FOP to generate PDFs that consist in one or more pages of data and images, each page having a header and a footer containing images themselves. These header and footer are repeated on each and every page of the PDF documents. The images are responsible for a large part of the size of the resulting PDF (about 50 %). I noticed that, by

different screen sizes with corona sdk

无人久伴 提交于 2019-12-10 11:11:39
问题 I am making my first iphone game using corona sdk and would like it to run on as many devices as possible (phones + tablets). However I am not sure how to deal with different screen sizes and resolutions. I developed my game for the iPhone 5 using corona simulator and it works fine on that device. When I tried it on lower resolution devices like the iPhone 4 I get 2 black rectangles on each side. I tried creating 2 different backgrounds with different resolutions and added this in my config

range on int, short and other data types in C on my processor?

眉间皱痕 提交于 2019-12-10 10:23:50
问题 I was reading a old C book and according to that int range values from -32768 to +32767. where as my machine can hold a larger int than that limit how can I find the range of these data types(short, int, long, double, float) specific to my machine? are there any methods for that? 回答1: From this, take a look at the footnote: the actual value depends on the particular system and library implementation, but shall reflect the limits of these types in the target platform. If you run the following

Does Firebird BLR contain the related field sizes?

不问归期 提交于 2019-12-10 10:08:53
问题 Firebird and InterBase keep a compiled form of stored procedures and triggers in BLR (tokenized) format. But I do not really know the structure of BLR. Is field size the part of the BLR? Would I get some problems when a stored procedure contains two fields (source and destination), and later I'll change the size of these two fields? For example they were varchar(50) long, but now I change them to varchar(100) with system table updates. What will happen? Would it only copy 50 characters, or