wrap

git diff - handling long lines?

I'm running git-diff on a file, but the change is at the end of a long line. If I use cursor keys to move right it loses colour coding and worse the lines don't line up, making it harder to track the change. Is there a way to prevent that problem, or to simply make the lines wrap instead? (running git 1.5.5 via mingw32) ...

Truncate stdin line length?

I've been parsing through some log files and I've found that some of the lines are too long to display on one line so Terminal.app kindly wraps them onto the next line. However, I've been looking for a way to truncate a line after a certain number of characters so that Terminal doesn't wrap, making it much easier to spot patterns. I wro...

How do I wrap a string in a file in Python?

How do I create a file-like object (same duck time as File) with the contents of a string? ...

ASP.NET GridView CommandField Update/Cancel does not wrap

Hi. My question is on the ASP.NET GridView control. I am using a CommandField in the Columns tag as seen below. <asp:CommandField ShowEditButton="True" HeaderStyle-Width="40px" UpdateText="Save" ButtonType="Link" HeaderStyle-Wrap="true" ItemStyle-Wrap="true" ItemStyle-Width="40px"/> What renders is the shown in the following image ...

GridView item text wrapping

I have a GridView control that I am dynamically creating at runtime. I am creating all the columns like this. foreach (GridColumnConfig column in columns) { BoundField boundField = new BoundField(); boundField.HeaderText = column.Title; boundField.DataField = column.FieldName; boundField.SortExpression = column.FieldName...

How do I wrap a function in Javascript?

I'm writing a global error handling "module" for one of my applications. One of the features I want to have is to be able to easily wrap a function with a Try{} Catch{} block, so that all calls to that function will automatically have the error handling code that'll call my global logging method. (To avoid polluting the code everywhere ...

Silverlight 2.0 - Can't get the text wrapping behaviour that I want

I am having trouble getting Silverlight 2.0 to lay out text exactly how I want. I want text with line breaks and embedded links, with wrapping, like HTML text in a web page. Here's the closest that I have come: <UserControl x:Class="FlowPanelTest.Page" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x=...

Excel automatically merge cells

I have an Excel table with several items 1, 2, 3..., each of which has subitems 1.1, 1.2, etc. I'm using the list of subitems as my key column and populating the main items using vlookups, but only showing each main item once. /| A | B | C | -+---------+----------+----------+ 1| Item1 | 1.Note | Item1.1 | 2| ...

What's a possible justification for not wrapping long argument lists? (StyleCop SA1115)

I'm stuck in a battle between ReSharper and StyleCop, and I'd like to let ReSharper win, but I want to hear the arguments in favour of StyleCop before I do that. When I'm writing long argument lists ReSharper sensibly chops the parameter list and restarts it on the next line. I find that much more readable. When I run StyleCop over the...

Wrap/encrypt another executable (for licensing)

I want to create a wrapper around another executable (ie - I have an executable that prints hello World, but I want the user to enter a password before the hello world executable is run). I don't want to edit the original executable's source. I also want to encrypt the original executable (hello world in this example) and do not want to...

HTML Textarea horizontal scroll

I would like to provide a horizontal scroll to a textarea in my HTML page. The scroll should appear without wrapping, if I type a long line without a line break. A few friends suggested using overflow-y CSS attribute, which did not work for me. The browsers that I use are IE 6+ and Mozilla 3+. ...

Needed: Wrappable Counter where < and > do "the right thing", language C

Hi Folks, I need the code to a couter that is allowed to overflow and where < > continue to tell earlier values from later values, for some defined interval. To clarify, one possible implementation would be: Consider two such counters cur and dut (device under test), consider two functions: bool isEarlier(cur, dut) // Is dut earl...

CSS: how to stop text from taking up more than 1 line?

Is there a word-wrap or any other attribute that stops text from wrapping? I have a height, and overflow:hidden, and the text still breaks. Needs to work in all browsers, in before CSS3. ...

sIFR 3.0 - Text wrap/wrapping inconsistent in Firefox 3 on PC only.

This is a recurring problem I have in Firefox 3.0. It seems when I keep refreshing sometimes it wraps, sometimes it doesn't. When it doesn't wrap, I can adjust the window size and the sIFR'd element will snap to its correct size. I need my elements to wrap on load, based on the width of it's container. I have the most current 'nightly b...

sIFR 2.0: My sIFR text isn't wrapping on a liquid design. Any solutions?

Hello, I have a simple line of text I'm replacing with sIFR for a header on my site. The site is liquid so it scales when the browser window changes width. But when I shrink the browser window down, the alt text (when I turn it on for testing) wraps to another line, but the sIFR text doesn't. I've seen written elsewhere on the web that...

CSS div's overlapping

I am trying to build a comments section for my website. In the comments section, I want it laid out wordpress-style, with the avatar to the left. It works, but what is happening is the comment text is wrapping around the avatar underneath. For an example, here. This probably has a simple solution to it but I am a CSS amatuer. This is the...

How to make a DIV not wrap ?

This requirement sounds wired, but it is actually requirement. I need to create a container DIV style that containing multiple other DIV's. It is asked that these DIV's wouldn't wrap if the browser window is resized to be narrow. I tried to make it work like below. <style> .container { min-width: 3000px; overflow: hi...

Why this "clear: both" Doesn't Prevent Wrapping?

I suppose a DIV with "clear:both" style can make its parent containing DIV doesn't wrap, but below HTML seems not work in that way. If the browser window is narrow, the second DIV "OK OK" still wraps to next line. <div style="overflow: hidden;"> <div style="float: left; overflow: hidden; white-space: nowrap"> ...

WPF: Text wrapping not working

I've got a grid defined simply: <Grid Margin="0,5,0,0"> <Grid.ColumnDefinitions> <ColumnDefinition Width="50"></ColumnDefinition> <ColumnDefinition Width="50"></ColumnDefinition> <ColumnDefinition Width="48"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition> </Grid.ColumnDefinitions> Then I'm t...

Wrap files in one executable package

Hi I'd like to wrap a bunch of files (an .exe a .xml, some images) in 1 executable package. When the user launches this executable package the .exe included in this executable package should run. Is this possible in the first place on the windows platform? What I'm not looking for is a self extracting zip or an installer because both o...