现在让我们编写一个简单的MIDlet,根据地区显示字符串和图片。
Now let's write a simple MIDlet that displays a string according to the locale as well as an image.
WasteIn CharArrays查询能够显示字符串所引用的字符数组中浪费的空间。
The waste in char arrays query shows the amount of wasted space in character arrays that are only referenced by strings.
这些是位置、文本内容和颜色、字体大小、淡入和淡出速度(以毫秒为单位)及保存显示字符串的数组的默认变量。
These are the default variables for the position, text contents, and color, font size, fade-in and fade-out speed in milliseconds, and an array to hold the display string.
只要始终是相同的部分的时候,日期仍将很容易可比,我可以修剪它,当我将其转换为屏幕显示字符串。
As long as the time part always remains the same throughout, the dates will still be easily comparable and I can just trim it up when I convert it to string for screen display.
UNIX的设计由大量的函数调用(称为系统调用)组成,其中包括一些简单的任务,如在屏幕上显示字符串来设置任务优先级。
The UNIX design consists of hundreds of function calls (called system calls) covering simple tasks, such as displaying a character string on the screen to setting task priorities.
当然我可以显示字符串,但是其实我还可以令字符串相加,如你所见到的,我可以令字符串相乘,你们可以想想答案是什么。
OK, I can certainly print out strings, but I can actually add strings together, and just as you saw, I can multiply strings, you can kind of guess what this is going to do.
您可以为这个属性设置为在状态栏中想要显示的任意字符串。
This attribute should be set to any string that you want displayed in the status bar.
下面显示了几个查询字符串示例,演示了如何在文本搜索中使用这些属性。
Several query string examples are shown below to demonstrate how these attributes are employed in a text search.
将向量中剩余的符号结合到字符串并在屏幕上显示结果。
Join remaining tokens in the vector into the string and display the result on the screen.
表格1和表格2显示了更多转换符号替代字符串的详细情况。
Table 1 and Table 2 show more details of the substitution strings for conversion symbols.
要用不同的语言来显示本地字符串,就需要准备不同地区的资源文件。
To display the native strings in different languages, you need to prepare the resource files for different locales.
写入内存,另一个进程读取并显示此字符串。
"Into Shared memory, and the latter reads and displays the string."
由于每部电话都向数据库显示自己的请求和查询字符串,因此它们以设备可显示的格式轻松快速地接收输出。
With each phone presenting its own request and query string to the database, output is quickly and easily received in a format that the device can display.
显示输入页面,以便用户提供字符串。
系统确认正确的登陆,显示主页,并且提示输入搜索字符串
System confirms correct login, presents main page, and prompts for a search string.
出于演示的目的,下面的清单只显示了对(多)行字符串的处理,而省略了错误处理。
The listing shows only the handling for (multi-)linestrings and also omits the error handling for illustration purposes.
然后,循环遍历文档中的所有商品并提取相关信息,创建用来向用户显示信息的HTML字符串。
Then iterate through all the items in the document and extract the relevant information to create the HTML string that is used to publish this information to the user.
不要忘记收集那些可能不会在用户界面页显示的字符串,如Portlet标题、页面标题、状态和代码系统。
Don't forget to collect strings that may not be displayed in user interface pages, such as portlet tiles, page titles, status, and code systems.
设置usage字符串来显示一个提示,以免提交无效的参数。
Set the usage string to show a hint for when invalid parameters are submitted.
为了调试这个程序,我使用了XMLString:transcode函数来转换将在控制台上显示的宽字符字符串,如图1所示。
To debug this program, I'm using the XMLString: : transcode function to convert the wide character strings for display on a console, as shown in Figure 1.
println方法的作用就是在控制台中显示整个参数字符串然后返回到下一行的开头。
The effect of the println method is to display the entire argument string on the console and then to return to the beginning of the next line.
改变页面显示文本的字符串源。
Modify the string resources for text displayed on the pages.
我想为zh - TW, de - de和es - es这几个地区显示“Welcome”字符串和一幅图片。
I want to display the string 'Welcome' and an image for locales zh-TW, de-DE, and es-ES.
输出显示ST_AsSVG产生的字符串。
这是简单的只读portlet,它将根据portlet的当前模式显示不同的文本字符串。
This is a simple read-only portlet that displays a different string of text depending on the portlet's current mode. There are two things to note.
您的文本编辑器可能具有搜索功能,可显示包含指定字符串的所有行。
Your text editor might have a search feature that displays all lines that contain a specified string.
做出选择后,系统将显示这个向导,该向导将显示与外部化相关的所有字符串。
After the selection, a wizard will be presented that displays all the strings that are relevant to externalization.
在列表1所显示的例子中,输入字符串变量被跟踪。
In the example shown in Listing 1, the input string variable is tracked.
它惟一的参数是要显示的字符串的地址,通过将字符串的地址压入堆栈(第30行),将这个参数传递给它。
Its only argument is the address of the string to be displayed, which is passed on to it by pushing the address of the string in the stack (line 30).
清单2显示了字符串测试的更多示例。
应用推荐