Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [formatting]

The tag has no usage guidance.

-4
votes
1answer
91 views

What happen to string.ToCommonSenseCase()?

I'm very confused about this. In most programming languages, there are string.ToUpperCase(), string.ToLowerCase(), sometimes Capitalize() (which capitalize the first letter of the string), even ...
14
votes
6answers
4k views

One-liners vs. readability: when to stop reducing code? [closed]

Context I recently got interested into producing better formatted code. And by better I mean "following rules endorsed by enough people to consider it a good practice" (since there will never be one ...
1
vote
2answers
120 views

Abstract composition hierarchy with multiple implementations

I need to implement a class hierarchy and be able to implement it in multiple ways. I want to create a logical representation of a query language, and then be able to parse it to/from different ...
2
votes
1answer
100 views

Custom object formatting caveats as to not confuse end users

Default display of objects in the Windows PowerShell console In PowerShell you have format.ps1xml documents. These are used to simplify what and how object data is shown to the end user. A simple ...
8
votes
1answer
14k views

How to represent a set in JSON?

JSON supports the following data structures (Java equivalents): Scalar, Array/List, and Map. A Set is not supported out-of-the-box in JSON. I thought about several ways to represent a set in JSON: [...
0
votes
1answer
71 views

Where to format number strings? Server or browser?

I am storing numbers in my database without formatting (e.g., 1434587). But I need a formatted string in the UX (e.g., $1,434,587). Is it better to store the raw number AND the formatted value in the ...
42
votes
6answers
10k views

Why not return dates as a string from the database?

In a typical web application, dates are retrieved from the database layer strongly typed (e.g. in c# as a System.DateTime as opposed System.String). When a date needs to be expressed as a string (e....
0
votes
5answers
232 views

Best format for design document? [closed]

I have an open-source project which requires me to create mathematical models to compute some things. I have to analyze some data to decide which model works well and determine the range of errors ...
3
votes
3answers
1k views

Image resolution in a RESTful interface

Background I have a RESTful HTTP API. I have a resource. GET /my/cat HTTP/1.1 Clients may want to retrieve the image representation of this resource. GET /my/cat HTTP/1.1 Accepts: image/png ...
0
votes
1answer
4k views

What operating systems will “\n” create a new line in? (Java) [closed]

(Java Version 8 Update 60) Hello. I am currently writing a program for my first Java assignment in college. My question is, in what operating systems will System.out.println("Hello,\n World"); ...
1
vote
1answer
612 views

Under what cirumstances would type 'System.Object' qualify for serialization?

I'm in charge of a comprehensive serialization format with support to serialize runtime objects (any derived type of Object). I can't find a sane scenario where one would choose to serialize an ...
1
vote
2answers
55 views

cross-application text formatting

I am not sure whether this question is a good fit for this site, but if it is not, please let me know and I will take it down. If it is off-topic, some general info on where I can look for these ...
0
votes
4answers
167 views

Is it possible to make a printable 'template' document?

I'm writing a piece of software to generate and print nametags. The issue I'm having is that nametags need to be formatted the same, but have different values (ie. different names, titles), and can be ...
0
votes
1answer
128 views

How best to format text files of statutes in HTML with specific IDs

I'm trying to find the best way to process about 20,000 lines of a statute in text format into HTML so that it can be displayed and manipulated in a granular fashion, i.e. by clause. The format is ...
2
votes
2answers
181 views

SQL Query syntax - formatting?

I'm looking at a very large (5-6 digit LOC), very complex, code-base, full of interacting bulky, interdependent, views and stored procedures (multiple 4-5 digit count silos). The source SQL has been ...
4
votes
5answers
1k views

Should I encrypt files saved by my program

I'm trying to decide on what format I should save data in, and hopefully this question will help me come to a decision. The program I'm writing uses 'databases' in which word=meaning (not a dictionary,...
6
votes
2answers
2k views

Formatting SQL Based on an AST

I am working on my .NET open source project for generating SQL... Initially, I wrote the project so it spit out exactly one SQL format... ugly. I started using this project in the real world and ...
-1
votes
5answers
2k views

Blocking IP address for web-scraping service

Background Consider the following scenario: Link. User provides a link to some poorly formatted website (e.g., creative commons content). Scrape. Server downloads the content (web scrape), always ...
6
votes
2answers
841 views

What are the advantages of expressing information in the simplest possible format?

I want to apologize in advance if my headline is not specific enough, but I think this is a general question, although I have a very concrete example: In my team we maintain a test specification ...
-1
votes
4answers
257 views

Should I Leave off the Currency Symbol? [closed]

I'm upgrading a desktop application that currently displays the currency symbol anytime money values are displayed or printed. A friend of my from the UK told me "Whenever British people see software ...
3
votes
2answers
272 views

Syntax tree dump format

When writing a compiler, it is useful to include the ability to dump the abstract syntax tree in a human readable format, for debugging purposes. This output might also be useful for other tools like ...
13
votes
2answers
30k views

How do you change how intellij auto formats code? [closed]

IntelliJ does some odd formatting with Javascript code and I am trying to figure out how to get it to stop formatting this way. Whenever I chain jQuery functions together, it over indents the auto ...
4
votes
3answers
2k views

Why do XSLT editors insert tab or space characters into XSLT to format it? [closed]

All XSLT editors I've tried till now add tab or space characters to the XSLT to indent it for formatting. This is done even in places within the XSLT where these characters are significant to the XSLT ...
1
vote
2answers
312 views

Switch form paragraph mode to line break mode in WYSIWYG editor because of client request?

I'm building a website fro a client which uses TinyMCE as the main WYSIWYG editor. Now my client asked if it is possible to write a line and make a line break and then continue without leaving a ...
19
votes
9answers
2k views

Advantages and Disadvantages of Forced Code Reformat

I'm currently working at a place that may be looking at forcing developers to use an automated code formatter on version control check-in. I'm looking for developers opinions on the advantages and ...
8
votes
8answers
1k views

How would you feel if your code editor formatted your code for you as you typed, without tabs/spaces? [closed]

As with most things, I'm sure this concept has been tried before - I just haven't come across editors that use what I've termed 'Virtual Formatting'. The principle is that there's a floating left-...
10
votes
6answers
12k views

Proper syntax formatting for SQL? [duplicate]

Is there are a widely accepted standard for formatting SQL queries? I've never been given any guidance as to the "typical" or "standard" way of doing it. I've seen three styles in the wild, and ...
10
votes
11answers
15k views

Is there a universal date format that anyone in the world can understand?

In Canada, everyone is familiar with the date format YYYY-MM-DD. In Europe or South Africa, they prefer DD-MM-YYYY. There are users from South Africa who get confused with the YYYY-MM-DD date format....