...
1.5. Khi nào thì nên sử dụng UDP
Rất nhiều ứngdụng trên Internet sử dụng UDP. Dựa trên các ưu và nhược điểm của
UDP chúng ta có thể kết luận UDP có ích khi:
Sử dụngcho các phương thức truyền ... s.toUpperCase();
dp.setData(s.getBytes());
Sưu tầm bởi: www.daihoc.com.vn
171
Chương 7
Lập trìnhứngdụngcho giao thức UDP
1. Tổng quan về giao thức UDP
TCP/IP là một họ các giao thức được ... thức TCP/IP.
Các tầng OSI
Họ giao thức
TCP
TCP/IP Stack
7 Tầng ứngdụng
Tầng ứngdụng
HTTP
FTP
SMTP
RIP
DNS
6 Tầng trình diễn
5 Tầng phiên
4 Tầng giao vận Tầng giao vận TCP UDP
3...
... dismissModalViewControllerAnimated:YES];
You could design your own modal view controllers for when you want to have users
make a choice before returning them to their regular program. More commonly, you’ll
use picker controllers ...
ViewController
within your program.
15.3 Using the flipside controller
To create a flipside controller, choose the Utility
Application template when you start a new proj-
ect. It will create a small ... also do some slightly more complex
things, either during setup or at runtime.
At setup you can choose to create a navigational
hierarchy and push a user into it before he or she
takes any actions....
... You’re
placing buttons on the toolbar that call three methods:
choosePic:
,
takePic:
(when
a camera’s available), and
savePic:
.
choosePic:
C
and
takePic:
D
are similar methods. Each ... integrated into the rest of
your application, it’s a pretty good choice—it often works well for video, but it’s a
somewhat more questionable choice for audio.
The Media Player framework includes two ... [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self
action:@selector(choosePic:)];
UIBarButtonItem *camButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCamera...
...
ES
, or Open
GL
for Embedded Systems, which features
a reduced
API
for use on devices like mobile phones. For full information on using
Open
GL
, you should pick up a book on the topic or ... within a graphical context. You only
“paint” a path when it’s complete, at which point you can choose to either fill it or
stroke it.
Many of the functions required to define and draw paths ...
array
Applies the transformation
392
C
HAPTER
19
Graphics: Quartz, Core Animation, and OpenGL
include
anchorPoint
,
backgroundColor
,
opacity
,
position
,
transform
, and several
others. This means...
... method has its own advantages, and we
continue to think that web development is often a better choice when you’re interacting
C
422
C
HAPTER
20
The web: web views and internet protocols
with ... iPhone web apps using
HTML
,
CSS
, JavaScript, and the
dynamic programming language of your choice. As we said at the time, web devel-
opment is one of two major ways that you can program ... the user touches the web view,
but we wanted to show the
UIWebView
delegate meth-
ods, so we chose this slightly more circuitous route.
And that’s it—a simple web thumbnail program, as
shown...
... http://lapcatsoftware.com/blog/ Coding blog that’s mostly about
iPhone and Cocoa
Mobile Orchard http://www.mobileorchard.com/ A news blog
Safe from the Losing Fight http://www.losingfight.com/blog/ ...
CSR
, download a certificate, and download a provisioning
profile. From that point, the member can choose to compile onto a device rather than
to the iPhone Simulator by changing the pop-up window ... mechanism special-
ized for searches
UISegmentedControl UIControl
A control for making one of sev-
eral choices
UISlider UIControl
A control for setting discrete
values
Table A.1 A listing of the most...
...
cut-down, mobile
HTML. In addition, the W3C Mobile Web Initiative has begun work on
standards such as mobileOK (which is meant to highlight mobile best practices).
It is our belief that the mobile ... develop-
ment and the SDK so that you can better choose which of them to use for any individ-
ual development project.
10 CHAPTER 1 Introducing the iPhone
1.2.3 Mobile web standards
Prior to the release ... portrait. Choosing
between them is not just a
question of which is easier to read,
but also requires thinking about
how much of each view is taken up
by toolbars and other chrome.
Mobile Safari...
... end-all of
iPhone software. We feel there are genuinely places where web development is a bet-
ter choice.
We’ll argue the reasons that you might select web development over
SDK right
here, in ... SDK?
There are two ways you can develop for the iPhone. One approach is to write web
pages for mobile Safari, using
HTML, CSS, JavaScript, and your favorite dynamic
language. The other is to ... have to look great. You can
develop them quickly using the web and then your administrators can choose whether
to input data from their iPhones or from their desktops. Conversely, you want to...
... page for non-iPhone users. Just as it’s
great to have mobile versions of your desktop pages, you should also have desktop ver-
sions of your mobile pages.
Figure 3.3 Facebook’s iPhone Optimized ... what it looks like. You’ll be able to
choose whether to have status-like bars or bottom bars depending on the needs of
your program. Once you’ve made a choice, you can just pick the right class ... last-generation cell phone browser; thus the Wire-
less Markup Language is largely irrelevant. However, XHTML mobile profile documents do
work at .mobi domains.
36 CHAPTER 3 Redeveloping web pages for the...
... transitioning rotation) that worked on Safari
but not mobile Safari and a whole category of functionality (explicit animation) that
worked on mobile Safari, but nowhere else. We expect that by ... page:
<meta name="apple -mobile- web-app-capable" content="yes" />
This code doesn’t change the web app when it’s run through the browser. It’s only
when a user chooses to save your ... vector-based graphic design pro-
gram that can be used on a variety of browsers, including Safari and mobile Safari.
Among Canvas’s features are gradients (which work almost identically to the gradients...
... class="group">Entered <? echo $recent[$i][entrydate]; ?>
<?
}
$lastdate = $recent[$i][entrydate];
?>
<li>
<a href="display-entry.phtml?mainid=<?
echo $recent[$i][mainid]; ... $recent[$i][mainid]; ?>" target="_self"><?
echo $recent[$i][title]; ?></a>
<i><? echo $recent[$i][authors]; ?></i>
<?
}
?>
</ul>
</body>
[XHTML?]
You ... creating a fully functional web page and can
thus link to anywhere on the web.
Your penultimate anchor line
D
shows an offsite link. The
target="_self"
attri-
bute is required when...
... overlap.
lighter
Blending choice Where the shapes overlap, the color value is added.
darker
Blending choice Where the shapes overlap, the color value is subtracted.
xor
Blending choice Where the shapes ... of each other.
Value Type Summary
source-over
Stacking choice New shapes are drawn on top of existing content.
destination-over
Stacking choice New shapes are drawn behind existing content.
copy
New ... be drawn. With
createLinearGradient
you’re defining a
Table 6.4 By setting variables, you can choose how your fills and strokes look.
Property Type Value Summary
fillStyle
Style variable CSS3...
... a few minutes in Dashcode.
Step Description
1. Create a project. Select File > New Project.
Choose a Custom project.
2. Create a gauge. Drag a gauge from the Parts library to the top center ... include
a left-rounded push button, a push but-
ton, and a right-rounded push button.
You can choose to put these buttons in
one of two places.
First, you could opt to place them in
a header. ... buttons
rounded corners (15px) and the middle button unrounded corners (0px). Finally,
you may choose to change the color of the text and the button background for the
current page.
Once you’ve...
... variety of tools for debugging.
After you install Firebug, you can activate it at any time by choosing Open Firebug
from among your Firefox tools. When you do that, a panel will appear along ... browser to see how
your iPhone web pages really work. On the Macintosh you’ve got three great
choices—Safari, Firefox, and the iPhone Simulator. Each has its own debug-
ging advantages.
8.2.1 ... Develop menu. If the Develop menu doesn’t appear, you can activate
it in the Safari preferences: choose the Advanced tab, and check the “Show Develop
Table 8.1 Setting up your local Macintosh...
... lot like whatever language you’re familiar with. However, it
may vary from your web language of choice in how it deals with some big-picture
areas, such as declarations, memory management, file ... elements
C is full of other features that may or may not have turned up in your programming
language of choice. Among them are symbolic constants (which are permanent decla-
rations, typically used to...