alignment

which size of struct member alignment in VC bring performance benefit?

does struct member alignment in VC bring performance benefit? if it is what is the best performance implication by using this and which size is best for current cpu architecture (x86_64, SSE2+, ..) ...

Vertical align with CoreText?

How do I change the vertical alignment of the text in a CTFramesetter frame? I want my text to be in the middle instead of being at the top. I am using CoreText framework. There is a setting of the paragraph to change horizontal aligment but not vertical. ...

Is it possible to align the BackgroundImage of a ListView?

I am assigning an image (star icon) as a background image to my listview in a C# winforms application. listview1.BackgroundImage = Image.FromFile("star.png"); Is it possible to align the image so that it appears somewhere other than the top left-hand corner? ...

Aligning text. Using tables or css or   ?

Frequently I am aligning text such as: To: 07/02/2010 From: 07/02/2010 Id like it to be displayed like this: To: 07/02/2010 From: 07/02/2010 So what is the quickest/easiest/best way to do this? CSS? using a few nbsp (would work if its mono spacing) or using tables. Normally if I am not in a anti-hating table mood, ill use tables....

Can't align fields horizontally on custom pop up screen in Blackberry

What I want to achieve is to have a custom popup screen with specified width and height. On that screen I add two buttons which stay in one row and align center horizontally. public class CustomPopupScreen extends PopupScreen { ButtonField minimizeBf; ButtonField cancelBf; HorizontalFieldManager hfm; public CustomPopupScreen() { s...

Aligning 3 social icons spaced out equally over a background image all wrapped in a div

Hello everyone! I have a container div tag which wraps an image named "tray" which provides a background to 3 social networking icons spaced out equally along the tray. I would also love to have the icons hover when I rollover them, but I am having some problems positioning it in another one of my divs. I just want it to be aligned to...

iOS Drag-and-Drop Alignment Guides

I'm looking to develop an iOS app that includes drag and droppable interface elements, but with alignment guides like those in Keynote or OmniGraffle or Interface Builder (the yellow lines in Keynote) such that when you drag something near enough to vertical or horizontal alignment with another object in the canvas, it displays a guide l...

C/C++ - posix_memalign()

I did some reading on cache misses optimization and come to know this stdlib function. It does some kind of memory alignment for optimization, but can any1 help me explain what this function really does? It takes 3 arguments: void* * memptr, size_t alignment, size_t size The part that I don't get is what the documentation means by ...

Vertical text alignment alongside images

When I put an image inline in a table cell, like this: <table border="1" cellspacing="5" cellpadding="5"> <tr> <td> <img width="20" height="20">Text </td> <td> Text </td> </tr> </table> …it shifts the vertical alignment of the text in that cell, like this: I've played around with vertical-align, but haven't been abl...

Fast Sequence Alignment on Unicode Strings

I want to run something like the BLAST algorithm to query a large database of unicode strings. Most of the alignment software like BLAST expects nucleotide or protein strings as input. But my input could potentially contain any unicode character. Is anyone aware of a piece of software that will let me do this? The scoring matrix coul...

Cross-browser CSS for right align label position of textfield

Hi. I'm using rightToLeft language for my UI, so I need to have label of textfield on right side. I tried using div with float:right for label and div with float:left for textfield. but it still doesn't align correctly in my form. This is code sample: <s:form action="processRegister" cssClass="form"> <div style="float:right;text-a...

Aligning text to always be on the outside of line

I know how to align text diagonally, but I'm having trouble aligning the text to be always on the outside, as the diagram shows: http://i38.tinypic.com/rs4zlj.png The lines will always be positioned as a triangle. What I get instead is, depending on the angle, text is inside or out (and upside down). Is there any math that can help me o...

Writing binary file in C++, unsigned char is too small but other data types add padding, is there an alternative?

I'm trying to write a .bmp in C++ but unsigned char can't hold a value high enough for my needs and other data types add padding because of specific byte alignment that makes a mess of things. So is there an alternative data type that can hold a higher value that won't add padding (or a way to make unsigned char hold a higher value)? ...

C# - TabControl with TabPages all around

Hi... Is there a way, how to create tabControl with tabPages alignmented not only Bottom, but BOTTOM | TOP | LEFT | RIGHT ? Thanks ...

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

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): | ...

In flex, how to have 'justify' text align option

How to make text in flex justified (text-align option) ...

Python implementation of BLAST alignment algorithm?

Is anyone aware of a pure python implementation of BLAST alignment? I am trying to study this algorithm... ...

widget and content alignment

I've added a Wordpress sidebar widget and that caused the content of my blog posts to be shifted downwards, resulting in a large white space where the post used to start. The widget is in the right place but the post content is moved down. Is there a code I can add to restore the post content back to the top? ...

Aligining Authorize.Net element to the center.

Hello, I have this Authorize.net element on my page, which is basically authorizing my site for payment, which basically authenticates my site as an authorize.net merchant, but I can't find out how to center it, as I think it looks better this way in my right column, rather than aligned to the left. Here is the page: http://www.mariopla...

Flex Spark: How to right align an icon on a button or tabbar button?

Hello, I would like to right align an icon on a button or tabbarbutton and keep the text left aligned in Flex 4.0 Spark. So far, I've come up with something like the following in my custom skin: <s:HGroup> <s:HGroup horizontalAlign="left"> <s:Label id="labelDisplay" textAlign="left" maxDis...