Center text in table cell

I would recommend using CSS for this. You should create a CSS rule to enforce the centering, for example: .ui-helper-center { text-align: center; } And then add the ui-helper-center class to the table cells for which you wish to control the alignment: <td class=”ui-helper-center”>Content</td> EDIT: Since this answer was accepted, I felt obligated to edit … Read more

Does sizeof(T) == sizeof(const T) and alignof(T) == alignof(const T)

Section 3.9.3: The cv-qualified or cv-unqualified versions of a type are distinct types; however, they shall have the same representation and alignment requirements (3.11). 53 “cv-qualified” here refers to const and volatile. So the answer is, yes. const and volatile only specify the limitations/attributes of access to the specified object. They are not considered to … Read more

Is there a good emacs mode for displaying and editing huge delimiter separated files?

Perhaps you could tell us what you’ve already found and rejected? If you’ve been searching, then you must surely have seen http://emacswiki.org/emacs/CsvMode ? You don’t mention it, or say why it wasn’t any good, though. SES (Simple Emacs Spreadsheet) might be a useful approach: C-hig (ses) RET You can create a ses-mode buffer and yank … Read more

Is it well-defined to hold a misaligned pointer, as long as you don’t ever dereference it?

No, the new code still has undefined behaviour. C11 6.3.2.3p7: A pointer to an object type may be converted to a pointer to a different object type. If the resulting pointer is not correctly aligned 68) for the referenced type, the behavior is undefined. […] It doesn’t say anything about dereferencing the pointer – even … Read more

CSS Div fill remaining height [duplicate]

Give the container: display:flex; flex-direction:column; and for the element: flex:1; The demo: https://jsfiddle.net/ugjfwbg4/1/ body { background-color: red; height: 100%; } .wrap { height: 100vh; width: 100%; padding: 20px; background-color: yellow; display:flex; flex-direction:column; } .top { width: 100%; height: 50px; background-color: blue; } .mid { width: 100%; background-color: green; flex:1; display:flex; flex-direction:column; } .left{ flex:1; width: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)