alignment

How to center a plot in window using ggplot2? (regardless of length of axis titles, legend, etc.)

时光怂恿深爱的人放手 提交于 2020-01-24 20:33:25
问题 [disambiguation: please note, I am not asking how to center the title, for which there are multiple answers already posted] I am creating bar charts, using ggplot2 and one thing I have not been able to figure out is how to make the plot itself be centered in the window, regardless of length of vertical axis label text (which varies by data set), or the presence (or absence) of a legend to the right of the chart. I would like the square that contains the bar chart to always be in the center of

w8 default tablet settings conflicts with WPF layout

江枫思渺然 提交于 2020-01-24 08:49:32
问题 I have a WPF desktop app. I've gotten reports from W8 users that the code completion window in our app is not aligned correctly. I investigated and found out that its a setting in W8 tablet settings that conflicts with the placement of popups in wpf Default is right handed and then the code completion popup looks like this When changed to left handed the code completion popup renders correctly like this Is there a way to programmaticly force the app to use left handed settings, or ignore it

How to center a title in a TextView with 2 lines?

青春壹個敷衍的年華 提交于 2020-01-24 01:25:06
问题 I know how to center the text in the TextView and how to center the TextView inside its parent layout, but what I'm looking for is how to center a title (text centered but second line starting at the same point). What I'm looking for is this: | Centered | | right! | or this: | Center | Not this (text centered): | Too | | centered! | or this (TextView centered): |Centered | |wrong! | or this (with padding and left): | |Also | | | |wrong! | | Did anyone understad this? Is it possible to do this

QGroupBox title vertical alignment

本小妞迷上赌 提交于 2020-01-23 18:00:29
问题 I have QGroupBox in my UI. The basic style is 2px width border, border radius and the title being vertically centered. I used the following style to my stylesheet (which is in a .qrc, applied in the main using app->setStylesheet): QGroupBox { border: 1px solid #22a4bc; border-radius: 0px; } QGroupBox::title { subcontrol-origin: margin; subcontrol-position: top; /* position at the top center */ } The problem is, the title is now a few pixel down, and actually over the element IN the groupbox.

Android button loses text alignment after setText

假如想象 提交于 2020-01-23 12:53:10
问题 I'm using xml to draw a spinning progress indicator along with some text. In the bottom of the screen I have a TableLayout with two buttons, which are centered in the page with each text also centered. <RelativeLayout android:id="@+id/progresscontainer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal"> <ProgressBar android:id="@+id/progress_bar" style="?android:attr/progressBarStyleSmall" android:layout_width="wrap_content" android

Android button loses text alignment after setText

风格不统一 提交于 2020-01-23 12:52:31
问题 I'm using xml to draw a spinning progress indicator along with some text. In the bottom of the screen I have a TableLayout with two buttons, which are centered in the page with each text also centered. <RelativeLayout android:id="@+id/progresscontainer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal"> <ProgressBar android:id="@+id/progress_bar" style="?android:attr/progressBarStyleSmall" android:layout_width="wrap_content" android

Android button loses text alignment after setText

余生颓废 提交于 2020-01-23 12:52:13
问题 I'm using xml to draw a spinning progress indicator along with some text. In the bottom of the screen I have a TableLayout with two buttons, which are centered in the page with each text also centered. <RelativeLayout android:id="@+id/progresscontainer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal"> <ProgressBar android:id="@+id/progress_bar" style="?android:attr/progressBarStyleSmall" android:layout_width="wrap_content" android

Keeping Columns Aligned In All Rows In An Android Table

我怕爱的太早我们不能终老 提交于 2020-01-23 10:57:13
问题 I've a problem in Android, that i can't solved no matter what i've tried. Imagine a tablelayout which has 3 tablerows, and each row two textfields. Image : Couldn't Add Image Here, Due To New User Restrictions [Right Now Only Focus On "Showing Data"] I need to align columns in each row equally. (meaning : r[ 0 ]c[ 0 ].width = r[ 1]c[ 0 ].width = r[ 2 ]c[ 0 ].width etc..) However, i've different strings in textviews, and some of them are short, some of them long. Using 0dp as width and 1 as

Keeping Columns Aligned In All Rows In An Android Table

醉酒当歌 提交于 2020-01-23 10:57:07
问题 I've a problem in Android, that i can't solved no matter what i've tried. Imagine a tablelayout which has 3 tablerows, and each row two textfields. Image : Couldn't Add Image Here, Due To New User Restrictions [Right Now Only Focus On "Showing Data"] I need to align columns in each row equally. (meaning : r[ 0 ]c[ 0 ].width = r[ 1]c[ 0 ].width = r[ 2 ]c[ 0 ].width etc..) However, i've different strings in textviews, and some of them are short, some of them long. Using 0dp as width and 1 as

Is the memory alignment different for different data types

落爺英雄遲暮 提交于 2020-01-23 01:11:43
问题 Do different data types in C such as char , short , int , long , float , double have different memory alignment boundaries? In a 32 bit word aligned byte addressable operating system, how is accessing a char or short different from accessing an int or float ? In both cases, does the CPU read a full 32-bit word? What happens when an int is not at the boundary? How is it able to read a char at any memory address? 回答1: The short answer, as others have pointed out, is the compiler will do what's