alignment

Aligning Movieclip with root/stage Movieclip

How do you align a dynamic movie clip position with another movie clip which is in the root stage? I tried to get the mc in root x,y position, but the starting point of the class that loads the dynamic MC does not seems to be accurate. (Meaning at the root stage, the x,y is 0,0 but at the dynamic class, its somewhere like 100,20 for the ...

aligning extern constants (gcc)

I want to make some static constants globally visible. I'm pretty familiar how to do that in C++. The problem is that these constants need to be aligned to some exotic boundary. Do I have to specify the alignment in extern declaration? I'm using GCC4.5 in *.cpp file static const constant_t constant __attribute__((aligned(64))) = {blah,...

[LaTeX] How to remove \hyphenpenalty & \pretolerance influence on section/subsection headers

Hi there, In my latex document i've set \hyphenpenalty=15000 and \pretolerance=10000 to remove word hyphenation and make text bounds even. But I can't disable this effect for section/subsection headers. All headers looks badly due to big spaces between words. Are there any solution to disable \hyphenpenalty=15000 and \pretolera...

Should boost library be dependent on structure member alignments?

I found, the hard way, that at least boost::program_options is dependent of the compiler configured structure member alignment. If you build boost using default settings and link it with a project using 4 bytes alignment (/Zp4) it will fail at runtime (made a minimal test with program_options). Boost will generate an assert indicating a...

How can I align all elements to the left in JPanel?

I would like to have all elements in my JPanel to be aligned to the left. I try to do it in the following way: JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); panel.setAlignmentX(Component.LEFT_ALIGNMENT); As a result Java use left side of all elements as a position of the element and then put all...

CheckboxList to display aligned?

Hello, I made a CheckboxList and it will not line up. I don't see any way to control the generated HTML. Right now, the check boxes do not align due to the widths of the <td> of each checkbox label being an automatic width. How can I set the width of this and make all the labels and checkboxes appear in two vertical aligned columns? My...

CSS Make one row the width of another

I'm sure this is a fairly common problem but I'm new to CSS so I'm not sure how it's done. I tried searching for the issue but sometimes it's tricky to get the right keywords. I have a table the width of which I want to be constrained by a specific row. My table css is as follows; table { border: 1px solid #ccc; width: auto; ...

alignment and granularity of mmap

I am confused by the specification of mmap. Let pa be the return address of mmap (the same as the specification) pa = mmap(addr, len, prot, flags, fildes, off); In my opinion after the function call succeed the following range is valid [ pa, pa+len ) My question is whether the range of the following is still valid? [ rou...

Is there really such a thing as a char or short in modern programming?

Howdy all, I've been learning to program for a Mac over the past few months (I have experience in other languages). Obviously that has meant learning the Objective C language and thus the plainer C it is predicated on. So I have stumbles on this quote, which refers to the C/C++ language in general, not just the Mac platform. With C ...

C++ parent class alignment

hello. Is it possible to specify alignment of parent class? for example something like (which does not compiled): template<size_t n> class Vector : public boost::array<double,n> __attribute__ ((aligned(16))) { thanks well, from comments I gather this is no good way to go. I think I will just stick to composition/alignment of private...

Aligning all panel components java

I am using the BoxLayout layout manager in java, and have aligned a bunch of components: myLabel.setAlignmentX(Component.LEFT_ALIGNMENT); myTextBox.setAlignmentX(Component.LEFT_ALIGNMENT); myButton.setAlignmentX(Component.LEFT_ALIGNMENT); ... I have a lot of components, and this seems over the top. Is there a shorthand way? I tried t...

Clone existing structs with different alignment in Visual C++

Is there a way to clone an existing struct with different member alignment in Visual C++? Here is the background: I use an 3rd-party library, which defines several structs. To fill up the structs, I pass the address of the struct instances to some functions. Unfortunately, the functions only returns unaligned buffer, so that data of so...

How to vertically align text in a button with a background drawable?

I had a simple button set up with a background image defined like android:background="?attr/button" where ?attr/button was a reference to a simple 9-patch png. Everything worked fine, text in the button was aligned correctly. Then I needed to have a different background for a pressed state of the button. So I changed that to android...

CSS Differences Between IE and FF

I hope I'm not breaking any rules by asking a question that pertains to a project I'm working on. If you view my page here and view it in Firefox and again in Internet Explorer, the width of the main content boxes differs. In Firefox, everything aligns perfectly with the advertisement at the top of the page, but in IE, the width of the c...

Center label instance inside VGroup in Flex

Hi all I am trying to center my labels below my image inside my VGroup. The labels are align to left now and it seems like HorizontalAlign is not working on spark component. Anyone knows how to fix it? Thanks a lot. <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="...

What alignment does HeapAlloc use

I'm developing a general purpose library which uses Win32's HeapAlloc MSDN doesn't mention alignment guarantees for Win32's HeapAlloc, but I really need to know what alignment it uses, so I can avoid excessive padding. On my machine (vista, x86), all allocations are aligned at 8 bytes. Is this true for other platforms as well? ...

LaTex, align alignment characters between align blocks

I would like to align two alignment characters between two align blocks so that I can have some text in the middle of a derivation with equations maintaining the horizontal alignment. For example the following excerpt of latex using align \begin{align*} \frac{\delta \phi}{\delta x_1} = {} &\frac{9}{8}\frac{\delta_1\phi}{\delta_1x_1...

Can I align the text in a C# balloon tip ?

Hello, I wrote a little C# program that displays text in a balloon tip from time to time. When the text is in English, there's no problem : Everything is aligned to the left and is readable, but sometimes I have some Hebrew text and a left alignment of a RTL language gets all screwy. I was wondering if there's a way to right-align the He...

Android Layout: Why don't the TextView and a ToggleButton align

I'm trying to put a TextView and a ToggleButton in a table row, however, they don't seem to align (The top of the button starts about 10px below the top of the textview even though the height each element is the same. Can anyone tell me why? <TableLayout android:layout_width="fill_parent" android:layout_height="wrap_con...

we are getting .txt file but not getting proper alignment

we are getting the following texfile_screenshot1.JPG when we are exporting data to .txt file we need output which is shown in texfile_screenshot2.JPG following is the code $myFile = "user_password.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $newline ="\r\n"; fwrite ($fh,$newline); $stringData1 = ...