Skip to content

Commit 1936230

Browse files
committed
java
1 parent abc1166 commit 1936230

File tree

216 files changed

+4471
-799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+4471
-799
lines changed

java/ampq.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
1212
<a xmlns="" href="https://github.com/netkiller">Github</a> |
1313
<a xmlns="" href="/search.html">Search</a> |
14-
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 22 章 AMQP(Advanced Message Queuing Protocol)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="javax/json/JsonNode.html">上一页</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="direct.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ampq"></a>第 22 章 AMQP(Advanced Message Queuing Protocol)</h1></div></div></div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="section"><a href="ampq.html#idp490">22.1. Send and Recv</a></span></dt><dt><span class="section"><a href="direct.html">22.2. direct</a></span></dt></dl></div>
14+
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 22 章 AMQP(Advanced Message Queuing Protocol)</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="javax/json/JsonNode.html">上一页</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="direct.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ampq"></a>第 22 章 AMQP(Advanced Message Queuing Protocol)</h1></div></div></div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="section"><a href="ampq.html#idp495">22.1. Send and Recv</a></span></dt><dt><span class="section"><a href="direct.html">22.2. direct</a></span></dt></dl></div>
1515

16-
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idp490"></a>22.1. Send and Recv</h2></div></div></div>
16+
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idp495"></a>22.1. Send and Recv</h2></div></div></div>
1717

1818
<p>Send</p>
1919
<pre class="screen">

java/android/.html

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>34.4. </title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="../index.html" title="Netkiller Java 手札" /><link rel="up" href="android.layout.html" title="第 34 章 Layout" /><link rel="prev" href=".html" title="34.3. Activity 间数据传递" /><link rel="next" href="ListView.html" title="34.5. ListView" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> |
3+
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
4+
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
5+
<a xmlns="" href="/journal/index.html">杂文</a> |
6+
<a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> |
7+
<a xmlns="" href="https://yq.aliyun.com/u/netkiller/">云栖社区</a> |
8+
<a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> |
9+
<a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> |
10+
<a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> |
11+
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
12+
<a xmlns="" href="https://github.com/netkiller">Github</a> |
13+
<a xmlns="" href="/search.html">Search</a> |
14+
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">34.4. </th></tr><tr><td width="20%" align="left"><a accesskey="p" href=".html">上一页</a> </td><th width="60%" align="center">第 34 章 Layout</th><td width="20%" align="right"> <a accesskey="n" href="ListView.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id=""></a>34.4. </h2></div></div></div>
15+
16+
<pre class="programlisting">
17+
18+
public class MainActivity extends AppCompatActivity {
19+
20+
//我们需要自己写一个常量作为requestCode,在请求result时传递进去
21+
public static final int REQUEST_CODE_NORMAL = 100;
22+
23+
@Override
24+
protected void onCreate(Bundle savedInstanceState) {
25+
super.onCreate(savedInstanceState);
26+
setContentView(R.layout.activity_main);
27+
28+
Button button = (Button) findViewById(R.id.Button);
29+
30+
button.setOnClickListener(new View.OnClickListener() {
31+
public void onClick(View view) {
32+
startActivityForResult(new Intent(this,SecondActivity.class),REQUEST_CODE_NORMAL);
33+
}
34+
});
35+
}
36+
37+
@Override
38+
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
39+
super.onActivityResult(requestCode, resultCode, data);
40+
if (requestCode == REQUEST_CODE_NORMAL) {
41+
//获得Result数据并处理
42+
...
43+
...
44+
}
45+
}
46+
}
47+
48+
</pre>
49+
<pre class="programlisting">
50+
51+
public class SecondActivity extends AppCompatActivity {
52+
53+
@Override
54+
protected void onCreate(Bundle savedInstanceState) {
55+
super.onCreate(savedInstanceState);
56+
setContentView(R.layout.save);
57+
58+
Button button = (Button) findViewById(R.id.SaveButton);
59+
60+
button.setOnClickListener(new View.OnClickListener() {
61+
public void onClick(View view) {
62+
Intent intent = new Intent(this,MainResultActivity.class);
63+
intent.putExtra("content",etContent.getText().toString());
64+
setResult(1,intent);
65+
//发送Result数据给请求方,然后finish()
66+
finish();
67+
}
68+
});
69+
}
70+
}
71+
72+
</pre>
73+
</div><div xmlns="" id="disqus_thread"></div><script xmlns="">
74+
75+
var disqus_config = function () {
76+
this.page.url = "http://www.netkiller.cn"; // Replace PAGE_URL with your page's canonical URL variable
77+
this.page.identifier = 'netkiller'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
78+
};
79+
80+
(function() { // DON'T EDIT BELOW THIS LINE
81+
var d = document, s = d.createElement('script');
82+
s.src = '//netkiller.disqus.com/embed.js';
83+
s.setAttribute('data-timestamp', +new Date());
84+
(d.head || d.body).appendChild(s);
85+
})();
86+
</script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&amp;d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href=".html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="android.layout.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="ListView.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">34.3. Activity 间数据传递 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 34.5. ListView</td></tr></table></div><script xmlns="">
87+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
88+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
89+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
90+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
91+
92+
ga('create', 'UA-11694057-1', 'auto');
93+
ga('send', 'pageview');
94+
95+
</script><script xmlns="" async="async">
96+
var _hmt = _hmt || [];
97+
(function() {
98+
var hm = document.createElement("script");
99+
hm.src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c";
100+
var s = document.getElementsByTagName("script")[0];
101+
s.parentNode.insertBefore(hm, s);
102+
})();
103+
</script><script xmlns="" async="async">
104+
(function(){
105+
var bp = document.createElement('script');
106+
var curProtocol = window.location.protocol.split(':')[0];
107+
if (curProtocol === 'https') {
108+
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
109+
}
110+
else {
111+
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
112+
}
113+
var s = document.getElementsByTagName("script")[0];
114+
s.parentNode.insertBefore(bp, s);
115+
})();
116+
</script><script xmlns="" type="text/javascript" src="/js/q.js" async="async"></script></body></html>

java/android/AndroidManifest.xml.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>30.2. AndroidManifest.xml</title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="../index.html" title="Netkiller Java 手札" /><link rel="up" href="index.html" title="第 30 章 Android" /><link rel="prev" href="index.html" title="第 30 章 Android" /><link rel="next" href="ch30s03.html" title="30.3. Layout" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> |
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>第 32 章 AndroidManifest.xml</title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="home" href="../index.html" title="Netkiller Java 手札" /><link rel="up" href="index.html" title="第 30 章 Android" /><link rel="prev" href=".html" title="31.2. 代码格式化" /><link rel="next" href="android.config.html" title="第 33 章 配置文件" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> |
33
<a xmlns="" href="//netkiller.github.io/">简体中文</a> |
44
<a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> |
55
<a xmlns="" href="/journal/index.html">杂文</a> |
@@ -11,9 +11,9 @@
1111
<a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> |
1212
<a xmlns="" href="https://github.com/netkiller">Github</a> |
1313
<a xmlns="" href="/search.html">Search</a> |
14-
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">30.2. AndroidManifest.xml</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">上一页</a> </td><th width="60%" align="center">第 30 章 Android</th><td width="20%" align="right"> <a accesskey="n" href="ch30s03.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="AndroidManifest.xml"></a>30.2. AndroidManifest.xml</h2></div></div></div>
14+
<a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 32 章 AndroidManifest.xml</th></tr><tr><td width="20%" align="left"><a accesskey="p" href=".html">上一页</a> </td><th width="60%" align="center">第 30 章 Android</th><td width="20%" align="right"> <a accesskey="n" href="android.config.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="AndroidManifest.xml"></a>第 32 章 AndroidManifest.xml</h2></div></div></div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="section"><a href="AndroidManifest.xml.html#idp576">32.1. 开启网络</a></span></dt></dl></div>
1515

16-
<div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idp512"></a>30.2.1. 开启网络</h3></div></div></div>
16+
<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idp576"></a>32.1. 开启网络</h2></div></div></div>
1717

1818
<pre class="screen">
1919

@@ -63,7 +63,7 @@
6363
s.setAttribute('data-timestamp', +new Date());
6464
(d.head || d.body).appendChild(s);
6565
})();
66-
</script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&amp;d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="ch30s03.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">第 30 章 Android </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 30.3. Layout</td></tr></table></div><script xmlns="">
66+
</script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&amp;d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href=".html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="android.config.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">31.2. 代码格式化 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 第 33 章 配置文件</td></tr></table></div><script xmlns="">
6767
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
6868
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6969
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

0 commit comments

Comments
 (0)