FAQ Database Discussion Community

## How do I pass an HTML document to CodeMirror as a start value?

javascript,html,xml,formatting,codemirror

## Printing a dictionary without newlines?

python,dictionary,file-io,printing,formatting
I'm trying to get the formatting right on my print-out and it's trickier than it should be. My objective is to have my code read in a dictionary, turn it to a list, sort it, then print it back out a text file looking like "String" "Float" "String" "Float" "String"...

I can't seem to find out how to format my javadoc to show to show up with links to String rather than the whole path. I've gone through several different guides with no luck. I was hoping to make it look more in line with how documents at oracle look....

## List git branches in directory using bash with formatting

git,bash,shell,ubuntu,formatting
I wants to list git branches in a set of directories using bash. Now I just want to format the branch name differently if it's "master". In other words, if the branch is 'master' I want to display it in Blue or any other color....

## CSS table cell inputs not taking full width

html,css,formatting
I have a snippet in my project that involves laying out a grid for a form using CSS tables. However, I am having trouble making it work where it does not take up the full width as I would expect. .full_width { width: 100% } .table { display: table; }...

## Represent a buffer efficiently as unicode string

c++,windows,string,unicode,formatting
I have a random buffer. I need to encode it to a unicode string (utf16 LE. as used by windows wide-char specification) so it can be used as PWSTR. For example when calling to StringCchPrintfW A possible solution can be to use base64. But in order to make it a...

## How to format the values of a model in Marionette Backbone View before rendering?

view,formatting,typescript,rendering,marionette
If you implement the onBeforeRender method the is no way to access the model values in order to format them temporarily Ideally you would want to format the values just before rendering without changing the model values of course! How to do it?...

## How to dynamically set currency symbol in Excel custom format?

excel,formatting,format
The figures in my spreadsheet use the following custom formatting: €#,###.##,, "M" So figures are expressed in millions with 2 decimal places prefixed by the euro symbol and followed by M for millions. My workbook will need to be converted to other currencies and I don't want to have to...

## How to make string paragraph easier to read for source code

powershell,formatting

## Bifurcate a string, removing the middle of the string instead of end

c#,.net,string,formatting
I want something similar to this question I found lead me to this answer on another question where I tried to convert it from php to c# my attempt to convert it... failed very badly: private string trimString(string str, int maxCharacters = 16) { int textLength = str.Length; return str.Substring(maxCharacters/2,...