让Ubuntu的ssh保持长时间连接_服务器应用_Linux公社-Linux系统门户网站

让Ubuntu的ssh保持长时间连接

[日期:2010-05-11] 来源:Ubuntu社区  作者:Ubuntu

Ubuntu下的ssh连接老是自己会断,一段时间不理它就会失去响应

如何让ssh连接服务器或者ssh tunnel保持连接呢?

其实也很方便,只要在/etc/ssh/ssh_config文件里加两个参数就行了

1 TCPKeepAlive yes

2 ServerAliveInterval 300

前一个参数是说要保持连接,后一个参数表示每过5分钟发一个数据包到服务器表示“我还活着”

如果你没有root权限,修改或者创建~/.ssh/ssh_config也是可以的

iTunes, App Store, iBookstore, and Mac App Store Affiliate Resources – Search API

Table of Contents

Overview

The Search API allows you to place search
fields in your website to search for content within the iTunes
Store, App Store, iBookstore and Mac App Store. You can search for a variety of content;
including apps, ebooks, movies, podcasts, music, music videos, audiobooks, and TV
shows. You can also call an ID-based lookup request to create
mappings between your content library and the digital catalog. Terms and conditions apply.

The Affiliate Program allows you to earn a commission on
qualifying revenue generated by clicks initiated from your website or app
into the iTunes Store, App Store, iBookstore, and Mac App Store. For more information on the Affiliate Program, see
http://www.apple.com/itunes/affiliates.

Searching

To search for content from a field in your website and
display the results in your website, you must create a search field
that passes a fully-qualified URL content request to the iTunes
Store, parse the JavaScript Object Notation (JSON) format returned
from the search, and display the results in your website.

The fully-qualified URL must have the following format:

http://itunes.apple.com/search?parameterkeyvalue

Where parameterkeyvalue can be one or more parameter key and
value pairs indicating the details of your query.

To construct a parameter key and value pair, you must concatenate
each parameter key with an equal sign (=) and a value string. For
example: key1=value1. To create a string of parameter key and
value pairs, you must concatenate each pair using an ampersand (&).
For example:

key1=value1&key2=value2&key3=value3

Note: When creating search fields and scripts for your website,
you should use dynamic script tags for your xmlhttp script call
requests. For example:

<script src="http://.../search?parameterkeyvalue&callback="{name of JavaScript function in webpage}"/>

The following table defines the parameter keys and values you can
specify to search for content within the iTunes Store, App Store, iBookstore and Mac App Store:

Parameter Key Description Required Values
term The URL-encoded text string you want to search for. For example: jack+johnson. Y

Any URL-encoded text string.

Note: URL encoding replaces spaces with the plus (+) character and all characters except the following are encoded: letters, numbers, periods (.), dashes (-), underscores (_), and asterisks (*).

country

The two-letter country code for the store you want to search. The search uses the default store front for the specified country. For example: US.

The default is US.

Y See http://en.wikipedia.org/wiki/ ISO_3166-1_alpha-2 for a list of ISO Country Codes.
media

The media type you want to search for. For example: movie.

The default is all.

N movie, podcast, music, musicVideo, audiobook, shortFilm, tvShow, software, ebook, all
entity

The type of results you want returned, relative to the specified media type. For example: movieArtist for a movie media type search.

The default is the track entity associated with the specified media type.

N

The following entities are available for each media type:

movie movieArtist, movie
podcast podcastAuthor, podcast
music musicArtist, musicTrack, album, musicVideo, mix, song
Please note that "musicTrack" can include both songs and music videos in the results
musicVideo musicArtist, musicVideo
audiobook audiobookAuthor, audiobook
shortFilm shortFilmArtist, shortFilm
tvShow tvEpisode, tvSeason
software software, iPadSoftware, macSoftware
ebook ebook
all movie, album, allArtist, podcast, musicVideo, mix, audiobook, tvSeason, allTrack
attribute

The attribute you want to search for in the stores, relative to the specified media type. For example, if you want to search for an artist by name specify entity=allArtist&attribute=allArtistTerm.

In this example, if you search for term=maroon, iTunes returns "Maroon 5" in the search results, instead of all artists who have ever recorded a song with the word "maroon" in the title.

The default is all attributes associated with the specified media type.

N

The following attributes are available for each media type:

movie actorTerm, genreIndex, artistTerm, shortFilmTerm, producerTerm, ratingTerm, directorTerm, releaseYearTerm, featureFilmTerm, movieArtistTerm, movieTerm, ratingIndex, descriptionTerm
podcast titleTerm, languageTerm, authorTerm, genreIndex, artistTerm, ratingIndex, keywordsTerm, descriptionTerm
music mixTerm, genreIndex, artistTerm, composerTerm, albumTerm, ratingIndex, songTerm, musicTrackTerm
musicVideo genreIndex, artistTerm, albumTerm, ratingIndex, songTerm
audiobook titleTerm, authorTerm, genreIndex, ratingIndex
shortFilm genreIndex, artistTerm, shortFilmTerm, ratingIndex, descriptionTerm
software softwareDeveloper
tvShow genreIndex, tvEpisodeTerm, showTerm, tvSeasonTerm, ratingIndex, descriptionTerm
all actorTerm, languageTerm, allArtistTerm, tvEpisodeTerm, shortFilmTerm, directorTerm, releaseYearTerm, titleTerm, featureFilmTerm, ratingIndex, keywordsTerm, descriptionTerm, authorTerm, genreIndex, mixTerm, allTrackTerm, artistTerm, composerTerm, tvSeasonTerm, producerTerm, ratingTerm, songTerm, movieArtistTerm, showTerm, movieTerm, albumTerm
callback The name of the Javascript callback function you want to use when returning search results to your website. For example: wsSearchCB. Y, for cross-site searches wsSearchCB
limit

The number of search results you want the iTunes Store to return. For example: 25.

The default is 50.

N 1 to 200
lang

The language, English or Japanese, you want to use when returning search results. Specify the language using the five-letter codename. For example: en_us.

The default is en_us (English).

N en_us, ja_jp
version

The search result key version you want to receive back from your search.

The default is 2.

N 1, 2
explicit

A flag indicating whether or not you want to include explicit content in your search results.

The default is Yes.

N Yes, No
Notes
  • It is critical to encode your URLs correctly in order to be commissioned for affiliate links. Notes on affiliate encoding raw links can be found in the Advanced Affiliate Linking document.
  • To improve response times, minimize the number of search
    results the Search API returns by specifying an appropriate value
    for the limit parameter key.
  • Large websites should set up caching logic for the search and
    lookup requests sent to the Search API. For an illustration, see
    Caching Architecture later in this document.
Search Examples

The following are examples of fully-qualified URLs for specific search requests:

Lookup Examples

You can also create a lookup request to search for content in the
stores based on iTunes IDs, UPCs/ EANs, and All Music Guide
(AMG) IDs. ID-based lookups are faster and contain fewer
false-positive results.

The following are examples of fully-qualified URLs for specific lookup requests:

Understanding Search Results

The Search API returns your search results in JavaScript Object
Notation (JSON) format. JSON is built on two structures:

  • A collection of name/value pairs, also known as an object; this
    concept is similar to a Java Map object, a Javascript Dictionary,
    or a Pearl/Ruby hash. An object is an unordered set of name/value
    pairs, beginning with a left brace ( { ) and ending with a right
    brace ( } ). Each name is surrounded by double-quotes and followed
    by a colon ( : ); the name/value pairs are separated by commas ( ,
    ).
  • An ordered list of values, also known as an array. An array is
    an ordered collection of values, beginning with a left bracket ( [
    ) and ending with a right bracket ( ] ). Values are separated by
    commas ( , ).

All JSON results are encoded as UTF-8. For more information on
JSON, please see http://www.json.org.

The following example displays the JSON results for a song in the
iTunes Store:

{"wrapperType":"track",
 "kind":"song",
 "artistId":909253,
 "collectionId":120954021,
 "trackId":120954025,
 "artistName":"Jack Johnson",
 "collectionName":"Sing-a-Longs and Lullabies for the Film Curious George",
 "trackName":"Upside Down",
 "collectionCensoredName":"Sing-a-Longs and Lullabies for the Film Curious George",
 "trackCensoredName":"Upside Down",
 "artistViewUrl":"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewArtist?id=909253",
 "collectionViewUrl":"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=120954025&id=120954021&s=143441",
 "trackViewUrl":"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=120954025&id=120954021&s=143441",
 "previewUrl":"http://a1099.itunes.apple.com/r10/Music/f9/54/43/mzi.gqvqlvcq.aac.p.m4p",
 "artworkUrl60":"http://a1.itunes.apple.com/r10/Music/3b/6a/33/mzi.qzdqwsel.60x60-50.jpg",
 "artworkUrl100":"http://a1.itunes.apple.com/r10/Music/3b/6a/33/mzi.qzdqwsel.100x100-75.jpg",
 "collectionPrice":10.99,
 "trackPrice":0.99,
 "collectionExplicitness":"notExplicit",
 "trackExplicitness":"notExplicit",
 "discCount":1,
 "discNumber":1,
 "trackCount":14,
 "trackNumber":1,
 "trackTimeMillis":210743,
 "country":"USA",
 "currency":"USD",
 "primaryGenreName":"Rock"}

The following table defines the JSON result keys and values:

Result Key Description Returned Return Values and Examples
wrapperType The name of the object returned by the search request. Y

track, collection, artist

For example: track.

*explicitness

The Recording Industry Association of America (RIAA) parental advisory for the content returned by the search request.

For more information, see http://itunes.apple.com/WebObjects/MZStore.woa/wa/parentalAdvisory.

Y

explicit (explicit lyrics, possibly explicit album cover), cleaned (explicit lyrics "bleeped out"), notExplicit (no explicit lyrics)

For example: "trackExplicitness":"notExplicit".

kind The kind of content returned by the search request. Y

book, album, coached-audio, feature-movie, interactive- booklet, music-video, pdf podcast, podcast-episode, software-package, song, tv- episode, artist

For example: song.

trackName The name of the track, song, video, TV episode, and so on returned by the search request. Y For example: "Banana Pancakes".
artistName The name of the artist returned by the search request. Y For example: Jack Johnson.
collectionName The name of the album, TV season, audiobook, and so on returned by the search request. Y For example: "In Between Dreams".
*censoredName

The name of the album, TV season, audiobook, and so on returned by the search request, with objectionable words *’d out.

Note: Artist names are never censored.

Y For example: "S**t Happens".
artworkUrl100, artworkUrl60 A URL for the artwork associated with the returned media type, sized to 100×100 pixels or 60×60 pixels. Only returned when artwork is available For example: "http:// a1.itunes.apple.com/jp/r10/Music/ y2005/m06/d03/h05/ s05.oazjtxkw.100×100-75.jpg".
*viewURL A URL for the content associated with the returned media type. You can click the URL to view the content in the iTunes Store. Y For example: "http:// itunes.apple.com/WebObjects/ MZStore.woa/wa/viewAlbum? i=68615807&id=68615813&s=1434 62".
previewUrl A URL referencing the 30-second preview file for the content associated with the returned media type. . Only returned when media type is track For example: "http:// a392.itunes.apple.com/jp/r10/ Music/y2005/m06/d03/h05/s05.zdzqlufu.p.m4p".
trackTimeMillis The returned track’s time in milliseconds. Only returned when media type is track  

Caching Architecture

Legal

Affiliate may use certain promotional content as may be provided by Apple, including previews of songs and music videos, album art, and App icons ("Promo Content"), for the purposes of promoting the subject of the Promo Content; provided such Promo Content: (i) is placed only on pages that promote the content on which the Promo Content is based; (ii) is proximate to a "Download on iTunes" or "Available on the App Store" badge (as approved by Apple) that acts as a link directly to pages within iTunes or the App Store where consumers can purchase the promoted content; (iii) includes attribution indicating the Promo Content was "provided courtesy of iTunes" if such Promo Content includes song or music video previews; (iv) is streamed only, and not downloaded, saved, cached, or synchronized with video, if such Promo Content includes song or music video previews; (v) is not used for independent entertainment value apart from its promotional purpose; and (vi) is not used to promote any other goods or services. Affiliate acknowledges that Apple provides the Promo Content "as is," and disclaims any and all representations or warranties, including, but not limited to, non-infringement. Affiliate shall forward any claims received in connection with the Promo Content to Apple immediately upon receipt, and will remove any Promo Content immediately upon request from Apple.

This agreement and your use of Promo Content are governed by California law.

Business Insider:美国移动广告的未来发展趋势 | 中文互联网数据研究资讯中心-199IT

美国科技博客网站Business Insider主持召开的移动广告大会上周在纽约市举行。在这次大会上,Business Insider新成立研究和分析部门BI Intelligence以幻灯片形式阐述了移动广告产业的未来发展趋势,其中涉及智能手机、平板电脑、用户使用习惯以及新型移动广告策略等等。

去年移动设备产业回顾

智能手机销量超过PC机,智能手机产业将进一步壮大

2011年第四季度全球智能手机和常规功能手机用户比率

2011年到2012年美国智能手机增长情况

美国智能手机用户的年龄结构情况

平板电脑也是移动设备的重要组成部分,也将在销量上超过PC机……

移动设备用户的使用时间正快速增长

在全球网络总流量中,移动设备已占据10%

在Twitter和美国音乐服务网站Pandora总流量中,一半以上来自移动设备

Facebook已拥有5亿移动用户

这么说来,移动广告产业一定有着巨大增长潜力,对不对?并非如此。
移动广告产业规模仍小得可怜(去年美国移动广告的市场规模为12.5亿美元)

这在数字广告总支出中所占比率很低

绝大部分“移动广告”,只不过是通过移动设备进行的搜索活动以及通过此类设备观看的显示广告

为何移动广告产业规模无法变得更为庞大?移动广告和台式机广告的ARPU(平均每用户每月收入)情况对比

移动广告的CPM(每千次印象费用)价格更低

“移动广告支出没有赶上用户使用时间增长的速度”

多数人士认为,这种现象的原因是“移动产业仍处于初生阶段”,只是这种看法并不完全属实,移动产业已有5(或17)年时间
在最初5年中,移动广告的增长速度远低于电视广告和传统互联网广告


由此可见,或许有其他挑战存在其中……
移动设备的显示屏较小,智能手机用户对打扰性广告确实非常反感

智能手机上的广告的效果可能很不好

尽管如此……
在如何使用新媒体事宜上,仍需花上一段时间
互联网的未来就是移动

即便很理性的分析师,也看好移动广告产业的增长潜力


“原创性”移动广告格式正浮出水面
短信广告

移动显示广告

点击后可拨打广告主电话的移动广告

Twitter移动广告

Pandora移动广告

Facebook移动广告

基于地理位置的广告

移动广告的一些核心趋势……移动用户在应用所停留时间,长于使用浏览器浏览网络的时间

在各类移动应用中,游戏和社交网络应用最受欢迎

过去两年中,移动用户用于玩游戏的时间增长了20多倍

社交网络和游戏也是最能获得广告资金的两个业务领域

图片和视频应用也非常热门

用户愿意观看较长时间、广告投放方式比较友好的内容

移动互联网用户正迅猛增长

那些有影响力的用户,CPM(每千次印象费用)的标准也最高

移动广告中男女性别所导致的CPM差异

不同内容导致的CPM差异

相比较而言,平板电脑则更适合投放移动广告……
与智能手机用户相比,平板电脑用户更愿意接受广告

平板电脑广告更有效果

用户通过平板电脑消费大量内容

因此平板电脑将成为广告支持媒体的理想移动设备

一些关键论点……
公众使用他们的智能手机来购物

移动电子商务呈爆炸式增长……

因此,将移动视为“广告平台”的看法不同……
或许应将其视为“营销、沟通和销售渠道”
可以肯定的是……
移动就是未来发展趋势

via:199it整理自腾讯科技