一个典型的例子就是从一个数据库中恢复信息,特别是在信息显示给用户前需要对信息进行格式化或处理的时候。
An example is recovering information from a database, particularly if there is any formatting or manipulation of the information before it is displayed to the user.
清单7显示了如何获得货币实例,以及如何格式化将要显示为货币的数值。
Listing 7 shows how to get a currency instance and how to format a number to be displayed as currency.
完全排除了键入和其他的用户输入错误,在显示格式化的数字文本和从同一个字段中接受数字文本输入之间的关系还是不太好处理。
Completely aside from typos and other user-input errors, there's always been an uneasy relationship between displaying formatted numeric text and receiving numeric text input from the same field.
在这些格式中,由这样的开始标签来显示格式化的启动。
In these formats the start of formatting is indicated by a beginning tag like.
但是有些情况下,您可能想要格式化客户端的数字(例如,接受用户输入并显示值)。
But in some cases, you might want to format the number on the client side (for example, to accept user input and display the value).
这将显示一个格式化的结果集。
图5展示了出现在初始文件时被正确格式化的数据;第一行显示字段标题,后续的每一行提供数据。
Figure 5 shows the data properly formatted as it appears in the original file; the first row displays the field headings, and each subsequent row provides the data.
JSP显示格式化的消息。
应用程序不断提取XML数据,添加一些格式化,然后将其显示在用户界面上——通常是作为HTML、xhtml或wml。
Applications constantly take XML data, add some formatting, and toss it into user interfaces — usually as HTML, XHTML, or WML.
查询结果被格式化并显示在一个HTML页面。
The query result is formatted and presented as an HTML page.
将XML看作是内容,将XSLT看作是与显示相关的格式化宏。
Think of XML as the content and XSLT as the display-related formatting macros.
格式化适合于显示或进一步处理的信息。
Format the information suitable for display or further processing.
为指定的线程提供一个格式化的MST显示。
Provides a formatted display of the MST for the specified thread.
下面的图显示了格式化oops消息的过程。
开发人员使用NumberFormat类来读取用户输入的数值,并格式化将要显示给用户看的输出。
Developers use the NumberFormat class to read Numbers entered by users and format output to be displayed for users to see.
如果memcached服务宕掉,应用程序应该回退到从原始数据源加载信息并对信息进行显示所需的格式化。
If the memcached service goes down, your application should fall back to loading the information from the original data source and formatting it as necessary for display.
最后,除了提供用于生成和显示格式化数据的操作之外,fmt库还包含了用于解析面向数字和时间数据的定制标记。
Finally, in addition to providing actions for generating and displaying formatted data, the FMT library also includes custom tags for parsing numerical and time-oriented data.
StringResourceModel也可用来格式化要显示的本地化了的消息。
StringResourceModel can also be used for formatting localized messages to be displayed.
获得了所有信息之后,进行格式化并在Web页面上显示就非常简单了;清单2顶部的简单CSS规则负责完成这些任务。
Once you obtain all this information, it's a simple matter to format and display it on a Web page; the simple CSS rules at the top of Listing 2 take care of this.
图4显示页面已经连接到服务器端的driver . php脚本,请求数据,然后格式化数据以便显示。
This figure shows that the page has connected to the driver.php script on the server side, requested the data, and then formatted it for display.
请注意,它使用一些非格式化的XML显示info字段。
Notice that it shows your Info field with a blob of unformatted XML.
Sam构建了一个简单的、优雅的解决方案,从他喜欢的Web站点上对数据进行屏幕搜集,然后把数据重新格式化,在小屏幕上显示。
Sam had built a simple, elegant solution for screen-scraping data from his favorite Web sites and reformatting them for small-screen display.
格式化适合于显示(或进一步处理)的信息。
Format the information suitable for display (or further processing).
这显示Root1文件系统尚未格式化;它只是256MB的空字节。
It turns out that the Root 1 file system isn't even formatted; it's just 256 MB of null bytes. But the Root 2 file system is golden.
在J2EE的世界中,您需要自己去找一个搜索引擎,然后使用一种方法为这个搜索引擎填充数据,然后获得结果,并对结果进行格式化,将它们显示给用户。
In the J2EE world, you have to find a search engine, then come up with a way to feed data to the search engine, get results out, and format the results for display to the user.
我仅仅在样本代码中使用了几个的格式化对象,并且仅仅显示了它们特性的一小部分。
I've used only a few formatting objects in the sample code, and I showed only a small portion of their properties.
然后,那些值被格式化并显示在图中。
虽然突出显示样式的格式化好象很方便,但后来您将可能会发现需要更改这种格式化。
Although the formatting of the highlight styles might seem convenient, you might find you need to change the formatting later.
您可以添加公司的徽标和到生成器页面的链接、格式化将要显示的日期和过滤要显示的更新的数量,等等。
You might add your company logo, a link to the generator page, format the date that is displayed, filter the number of updates to be shown, and so forth.
清单4显示了如何根据不同地区对数字进行格式化。
Listing 4 shows how to format a number according to a different locale.
应用推荐