现在让我们编写一个简单的MIDlet,根据地区显示字符串和图片。
Now let's write a simple MIDlet that displays a string according to the locale as well as an image.
这个小部件显示字符串 “Hello World”和一个按钮,如图2 所示。
This widget displays the string "Hello World" and a button as shown in Figure 2.
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.
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产生的字符串。
如果这两个颜色字符串匹配,就会显示这种颜色的消息。
If the two color strings match, a message with that color is displayed.
您的文本编辑器可能具有搜索功能,可显示包含指定字符串的所有行。
Your text editor might have a search feature that displays all lines that contain a specified string.
在列表1所显示的例子中,输入字符串变量被跟踪。
In the example shown in Listing 1, the input string variable is tracked.
这就是为什么看到本地定义的字符串首先显示。
This is why you see the locally defined string appearing first.
它惟一的参数是要显示的字符串的地址,通过将字符串的地址压入堆栈(第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显示了字符串测试的更多示例。
但是,由于模式接受空值作为字符串的有效输入,因此,在表单中字符串类型的元素并不显示为必填的。
However, elements of type string do not appear as mandatory in the form because the schema accepts an empty value as valid input for a string.
应用推荐