6
голосов
2ответов
3373 просмотров

Java: create new implementation of type at runtime?

So, I realize the answer to this is probably "it's hard", but: I've got a weird idea, and was wondering if it's possible in Java to create a method like: <T> T wrapInterface (Class<T> interfaceClass, T wrappedObject) { if (mClass.isInterface()) { //create a new implementation ...

34
голосов
6ответов
20599 просмотров

Wrapping C++ class API for C consumption

I have a set of related C++ classes which must be wrapped and exported from a DLL in such a way that it can be easily consumed by C / FFI libraries. I'm looking for some "best practices" for doing this. For example, how to create and free objects, how to handle base classes, alternative solutions...

4
голосов
2ответов
5690 просмотров

Wrap Text inside fixed Div with css or javascript?

I have tinymce editor(textarea) and one div. Whenever I type inside the text editor, it shows at the preview div which is (200px) in real time which is looks alike stackoverflow preview. What I want to achieve is, if we type one words without space and if exceed 200px, I want to wrap it to the ...

0
голосов
2ответов
2066 просмотров

iphone: Text around an image

Is it possible to have text go around an image ? like in the picture? alt text http://andyj.be/image.png

0
голосов
2ответов
652 просмотров

Cut of text if too wide in CSS or Asp.net

I have this text inside a div with a fixed width: Some headline (2009-10-10 small) Some headline (2009-10-10 small) Some headline (2009-10-10 large) But when the headline is too wide the result is: Some headline (2009-10-10 small) Some wide headline (2009-10-10 large) Some headline (2009-10-1...

6
голосов
3ответов
12798 просмотров

WPF toolkit datagrid cell text wrapping

My WPF datagrid's columns are fixed width, which means long text in the rows are cut off. How can I have the text wrap?

1
голосов
3ответов
2258 просмотров

fit-to-window-width for a QWebView

I'm writing an ebook viewer in C++ using Qt 4.5, using the QWebView object to render html files. Some of the html files need a high window width, otherwise an horizontal scroll bar will appear, which is very annoying, thus I would like to implement an option to fit the content to the window widt...

0
голосов
1ответов
912 просмотров

TextAttribute.TRACKING and LineBreakMeasurer

has anyone ever successfully used the java.awt.font.LineBreakMeasurer to draw word-wrapping text that has java.awt.font.TextAttribute.TRACKING (also known as letter spacing) set on the font? i create the font by: Map<TextAttribute, Object> map = new HashMap<TextAttribute, Object> ()...

0
голосов
1ответов
130 просмотров

How to wrap an untrusted application?

Imagine an untrusted application (plugin) that reads from the standard input and writes to the standard output. How to get the output returned for the specified input by this application preventing any side effects? For example, if application deletes file on a disk, it should be detected and t...

1
голосов
1ответов
358 просмотров

word wrap pros/cons

I got used so much to this in notepad++ that when i switched to eclipse/aptana i missed it sooo much. But after some time i did get used to not having that functionality. I guess that it's better not to have it because it is forcing you to watch for "readability" part of coding. What i want to k...

519
голосов
5ответов
385578 просмотров

How to prevent line breaks in list items using CSS

I'm trying to put a link called Submit resume in a menu using a li tag. Because of the whitespace between the two words it wraps to two lines. How to prevent this wrapping with CSS?

21
голосов
5ответов
26387 просмотров

C#/WPF: Disable Text-Wrap of RichTextBox

Does anyone know how I can disable the text wrapping of a RichTextBox? E.g. if I have a large string which doesn't fit in the window, the RichTextBox places the part of the string which can't be shown of a new line. I want to disable that (and make it visible only by using the Scrollbar). Thanks...

1
голосов
1ответов
1845 просмотров

Wrapping a word in LaTeX

How can you wrap the word longWord_anotherLongWord_long_again to many lines in the tabular environment? The word should be LongWord_ anotherLongWord_ long_again

1
голосов
1ответов
977 просмотров

WPF TexBlock in Grid in ListView not Sizing Correctly?

I have a TextBlock that is in a Grid that is an ItemTemplate for a ListView. I have the items so that they grow when the window is resized, but I cannot figure out how to have the TextBlock be limited to that size. I've tried to do this with the width on the ColumnDefinition - if I set the Widt...

0
голосов
1ответов
1422 просмотров

text not wrapping around some floated images, wraps in IE & FF but not chrome, safari

I have a hand-coded site @ hartbro.com Part of the site is a blog, in which I include pictures. Here's the HTML code around one of the images that's causing trouble. <a href="blogcontent/090811.jpg" class="img"> <img src="blogcontent/090811.jpg" alt="Downed trees" width="25%" class="flo...

1
голосов
1ответов
402 просмотров

Finding width of characters to do wordwrap

I'm writing a custom texteditor using WPF and am using a stack of TextBlocks to render the lines. That leads me to the problem to find when to wordwrap from one line to the next. What is the best way to do this? Is there a way to find the width of each characther/glyph (other than creating a For...

0
голосов
3ответов
1214 просмотров

Word wrap in Firefox 2.0

Word-wrap is not working in FF 2.0. I know FF above 2.0 supports this word-wrap. But I want to know is there any alternatives do fix this issue for FF2.0. It works fine with all IE versions. .wrapgridtext { word-break : break-all; max-width : 0; word-wrap: break-word; } this clas...

5
голосов
3ответов
1802 просмотров

Tips on wrapping a C library in Objective-C

I have a library written in C that I would like to use in an Objective-C app, either on the Mac or the iPhone. Unfortunately, since this library is being written by individuals in the open source space, the documentation is quite sparse and incomplete. While I can figure out how to use the stuff...

35
голосов
1ответов
4534 просмотров

Is there any way to get vim to auto wrap python strings at 79 chars?

I found this answer about wrapping strings using parens extremely useful, but is there a way in Vim to make this happen automatically? I want to be within a string, typing away, and have Vim just put parens around my string and wrap it as necessary. For me, this would be a gigantic time saver a...

11
голосов
3ответов
2138 просмотров

Python PEP8 printing wrapped strings without indent

There is probably an easy answer for this, just not sure how to tease it out of my searches. I adhere to PEP8 in my python code, and I'm currently using OptionParser for a script I'm writing. To prevent lines from going beyond a with of 80, I use the backslash where needed. For example: if __...

1
голосов
2ответов
1813 просмотров

Internationalized word wrapping in Java

I need good word-wrapping handling for Java. Not too difficult, except for one wrinkle: since I'm working on an internationalized application, it needs to handle Chinese, Japanese and Korean text properly. In those languages, word wrapping occurs between characters, since the characters themselve...

10
голосов
1ответов
884 просмотров

Line wrapping within emacs *compilation* buffer

I have a little problem with compiling my project in emacs. The compilation buffer does not line-wrap and I have some very long compile and link commands which I would like to sanity check sometimes. Does anyone know how to force line-wrap on the output added to the compilation buffer, ideally ...

34
голосов
5ответов
34106 просмотров

How do I enable text wrapping on all column headers?

How does one enable text wrapping on all column headers of a DataGrid, without disabling the other default header functionality? Such as column resizing, sort direction indicator, etc which are needed. Is there a way to do this?

2
голосов
4ответов
1966 просмотров

WPF: How to embed button inside text flow (wrap text around button)?

I'd like an advice to the following problem: I want to embed a Button into a text flow, but when I embed a Button and Label (or TextBlock) into the WrapPanel, I get the first figure: alt text http://sklad.tomaskafka.com/files/wpf-wrappanel-problem.png I think that one of solutions could be Flow...

6
голосов
4ответов
11921 просмотров

enter does not work in textarea in Internet Explorer 8

When I press enter in a textarea which has whitespace attribute is set to nowrap through css, it is ineffective. No new line is created. Instread a simple whitespace appears. This is only true in IE8. I Have tried current version of Opera,Chrome and Firefox and I have not encountered such problem...

17
голосов
4ответов
79672 просмотров

Latex floating and text wrapped image

I have a LaTeX document with an image in it. There is a section, four subsections, the latter 3 having just some text, and the first having a description environment with some stuff. I want to have an image on the top right and have everything text wrap nicely around it. The wrapfig package tak...

17
голосов
9ответов
26136 просмотров

How to prevent the floating layout wrapping when firefox zoom is reduced

Given the following HTML. It display two columns: #left, #right. Both are fixed width and have 1px borders. Width and borders equal the size of upper container: #wrap. When I zoom out Firefox 3.5.2 by pressing Ctrl+- columns get wrapped (demo). How to prevent this? <!DOCTYPE html PUBLIC "-/...

2
голосов
2ответов
2618 просмотров

Wrap URL within a string with a href tags using Coldfusion

I have a Coldfusion site that is pulling in a feed that contains urls. I have some control over the urls so I know they will always start with http://. I want to wrap those urls in a href tags so they are clickable but I'm having trouble figuring it out. Any info you guys could give me would be a...

14
голосов
3ответов
6046 просмотров

Text wrapping in WPF hyperlink

In my WPF application I have this: <StackPanel> <TextBlock> <Hyperlink> <TextBlock TextWrapping="Wrap" Name="HyperlinkText" /> </Hyperlink> </TextBlock> </StackPanel> But if I set HyperlinkText.Text to a long text that wraps, the w...

44
голосов
3ответов
19601 просмотров

Decrease line spacing in a TextBlock / FlowDocument

Some fonts have a large amount of whitespace above and below the characters. Is there a way to correct for that, and tighten up the space between lines of a word-wrapped paragraph in WPF (in either a TextBlock or a FlowDocument)? Kind of like a negative margin between lines? There's a LineHeight...