About Exchange Server 5.5

Kanfu 2000-03-14 04:21:00
我在win98用Outlook Express收发局域网的电子邮件,发现只能收不能发,我怀疑是SMTP端口的问题,可我又不知道服务器用的是哪个端口,在Exchange Server上什么地方.
...全文
182 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiehua 2000-03-24
  • 打赏
  • 举报
回复
ExChange Server 5.5
其实质上是个数据库管理系统,由一个叫做Information Store的单元完成
信息数据管理。而信息数据的发送和接收由Connector完成,Connector的
作用就是完成不同格式和不同标准的信息到Information Store数据格式的
双向转换,并同时完成接收和发送的工作。
Connector有很多种,有微软提供的,也有第三方提供的。而如果你需要利用
ExChange Server收发Internet EMail,只需要安装微软提供的Internet Mail
Connector就可以了(随ExChange Server 提供);同理,如果需要支持CC:Mail
等也只需要安装相应的Connector就可以了。Lucky.......
neil 2000-03-15
  • 打赏
  • 举报
回复
对,outlook express只支持smtp发送邮件,这个时候,你必须有个smtp服务器,而exchange是不能担当的。
Kanfu 2000-03-15
  • 打赏
  • 举报
回复
有一点我说错了,我用Outlook Express不能发出邮件.用Outlook就可以.你说这是什么原因.
neil 2000-03-14
  • 打赏
  • 举报
回复
不知道你用exchange是纯粹用在局域网,还是想同时连接internet服务器,要知道
exchange默认安装的话,是没有smtp协议的。而如果简单只使用outlook去收发exchange上的邮件的话,它是不需要smtp的,而采用的是pop3/imap ,ldap
如果想进一步使用smtp和外部连接的话,你必须进一步去设置exchang于外部连接,而outlook里的smpt呢,必须设置成外部的服务器地址,exchange我也不是很熟,但这样现象如果你在设置outlook的时候也应该发现的了:如果单纯连接本地exhcange server,它根本没有让你设置smpt的地方。
Kanfu 2000-03-14
  • 打赏
  • 举报
回复
问题是默认端口25发不出mail.在server什么地方可以发现smtp端口.
King 2000-03-14
  • 打赏
  • 举报
回复
SMTP的端口是25。
1 , WinLocaleConvert.zip
This program shows the international settings of the country you select such as Format Currency, Date Format, Day Name, Month Name...
2 , netstuff.zip
This program queries the network and shows the Domains/Servers/Workstations structure. It also shows the users of each Server or Workstation and can send messages to the selected PC. This programs works only on a Windows NT 4.0 Machine!
3 , projectgroupx.zip
You may use this code as a learning tool only. The application may not be sold in any shape or form. So 下载 the code and get involved with the News Group, help us to help you.
4 , urllink.zip
User control to launch web browser and jump to URL.
5 , vbftp.zip
Sample application that implements FTP connection, 下载, and upload using the WinInet FTP API from Visual Basic
6 , browser.zip
Simple web browser using the Microsoft Internet Control.
7 , ftp.zip
Complete FTP application.
8 , chatclnt.zip
Client side of an internet chat program
9 , chatserv.zip
Server side of an internet chat program
10 , hlink.zip
Is a control that you can use to link your program to a web site.
11 , Popmail.zip
Checks your email!
12 , telnet.zip
Telnet Application
13 , validip.zip
Validate an IP address
14 , dmvbtest.zip
This is a complete email sending client in Visual Basic
15 , CarlosChatApp.zip
This is a program that enables two people to chat across the internet. You must know each others IP address and have an understanding of ports
16 , inteferorprovider.zip
program which communicates with each other and allows one computer to perform a task on the other
17 , itimer.zip
Internet Timer. Also calculates the cost of the call. Can AutoDetect Phone call charges from the time and date.
18 , tlsNet.zip
TILISOFT Internet ActiveX Controls - Retrieve HTML pages from the Net - Post data to HTTP server
19 , pingmon.zip
A ping monitor for the network administrator. Based on API code
20 , webbrowser.zip
Easily build your very own custom web browser,using the web browser object
21 , StealthSRC.zip
StealthMail 2.1 - full SOURCECODE for the StealthMail 2.1 program. Uses only VB6 code, and NO API calls!
22 , Worldmeet.zip
This is the source code for a client and server chat program.
23 , RemoteFileExp.zip
This utility allows you to remotely reboot, log-off, 下载 files, delete files,luanch applications, auto navigate a web browser and view desktops via TCP/IP
24 , Lagmeter.zip
This Will Allow You To See A Visual Representation Of The Latency of Your Local Machines IP. A.k.a Lag Meter
25 , mailcheck.zip
Mail Checker Sample Application. Create your own POP3 client to retrieve e-mails from mail server. Source code + tutorial.
26 , chat.zip
This code shows you how to creat a local network chat room so that you and your friends can have a chat room which nowone else can enter
27 , news.zip
Demonstrates how to downlaod text from a webpage without a browser open. This could be used for what i used it for in the past for a news program
28 , url.zip
Worldwide list of URL extensions by country
29 , EmailChk.zip
This Application checks for unread email using outlook. MS Agent will popup to announce how many unread mails you got. This also checks sub-folders on your inbox. Configuration is added to choose which MS Agent to use and the Time interval use to check for mails
30 , wsc_ftp_client.zip
FTP Client Sample Application. It was built with MS Winsock Control. It is a complete FTP client that allows you to browse FTP directories, 下载 and upload files, resume broken file transfer, create and remove directories, delete and rename files. All the operations execute in an asynchronous mode with the progress indication .
31 , MultiServer.zip
This is real simple source code for a Multi-Client server, it allows upto 65535 users to connnect to your server,via winsock control- it can be customised to become any server, such as IRC, FTP. plus all the functions are in their to relay data and store information on each users accounts.
32 , GuardDuty.zip
Lets you create your very own Cyber Sitter or Net Nanny Type software- it blocks access to sites based on keywords such as "sex","hack" or "security" alternatively whatever you want ! - it's the long awaited project version of previously released WEB ADDRESS SPY!
33 , whisper.zip
Complete LAN chat program
34 , vbtelnetserver.zip
Telnet Server. Allows multiple connections, uses Access DB to store Access Control Lists/Users
35 , CasperEdit.zip
Almost complete HTML editor with many functions. This is only a pre-released version so some stuff doesn't work.
36 , browser0516.zip
Its a fully functional web browser
37 , lovevirusCleaner.zip
With the onslaught of the Love Bug virus in the last 24 hours, many of us had to provide solutions prior to the Virus Protection companies. This VB6 code cleans the ILOVEYOU virus from systems
38 , shras21.zip
Custom Control, that lets you have full control of Dial Up Networking
39 , FullBrowser.zip
: This is A Complete Internet Browser Like IE With More Fuctions Like Bulk mail And Many more. Requires several third-party OCX files including Autocomplete.ocx.
40 , webpagmaker.zip
Web page maker
41 , vs.zip
Viru-Spy. Relays sytem information to your email account. Run on someone else machine to retrieve system info,dial up passwords, bookmarked urls etc etc
42 , icqp.zip
Send ICQ messages from VB
43 , DekMate2.0.zip
All new DeskMate2.0 with added new features like email checking, NT messaging system, movie screen, system tray alerts as well as the old features like, Online Weather, News headlines, Online Horoscopes, Movie Reviews etc.
44 , TelDialOut1.zip
TelDialOut is a program that dials a phone number from an application using the modem. I had observed the large number of postings on various forums about this topic so I have included a well documented application to assist those who would be using this feature in their applications
45 , TreeViewXML.zip
Great example program for programmers learning XML. This program shows you how to use the msxml.dll control, as well as the treeview control. Users must have msxml.dll version 2.0 for binary compatibility.
46 , CustEditXML.zip
Complete VB application that retrieves customer information from an XML script, allows you to make changes to the data, and saves the record using other XML scripts. This is a great example for learning MSXML.dll and TransactXML.dll procedures.
47 , email1mapi.zip
Visual Basic code for Sending email using MAPI control.
48 , Dan.zip
Dan's All purpose masterful program
49 , metasite.zip
this vb code executes a request from metacrawler.com and returns all links results in a TreeView.
50 , email.zip
Sending Email using MAPI control.
51 , EmailChecker.zip
Checks your new mails from mutiple mail servers(yeah it works!!!!!). it switches tray icons on different states & displays the number of new messages (as msn messenger display messages) and plays a WAV file
52 , urlhist.zip
This sample demonstrates how to loop through the history folder of Internet Explorer.
53 , AdvancedWebBrowser.zip
Advanced web browser..something like IE but less options really nice interface..code is very easy to understand..teaches you the basics of using vb.
54 , iusage.zip
NO its not another internet usage monitor its different.Apart from calculating the cost and total time you spend on the net it even reminds you to switch of the net after a time interval which you specify.Check out this cool program.
55 , dauntless.zip
This is an exceptionally good piece of code. One program runs on a machine somewhere, and the other on your machine. You can then send commands to the other machine, take screen snapshots and more... It uses the INET control for all functionality, but you could do the same with the Winsock DLL.
56 , netcontrol2.zip
Following on from the original NetControl by Danny, this little ActiveX/OXC project contains some small modifications and the sourcecode for the control. You can send messages with a client/server type setup.
57 , al40.zip
Apparently, if you use AOL to connect to the Internet and you do not touch it for 45 minutes it will timeout and drop the connection. This little program will ensure that it keeps the connection active.
58 , yougotmail.zip
Kenneth has developed this is a great little application which reads a Microsoft Exchange mailbox and lets you know via playing a .WAV file when you have mail.
59 , netcontrol.zip
This little project is Dannys first attempt at an ActiveX control and its very good. There are two mini projects included here. The first is called SlotDemo and allows you to send messages or data in a client/server type role. Its uses some very clever programming.
60 , cethernetaddress.zip
We found this bit of code somewhere on the Internet a few months ago and tidied it up a bit. I don't know the author's name so cannot give them credit. But basically this sample will return the Ethernet Address of the card in the current machine.
61 , cnetworkinfo.zip
This little demo will return, using Windows API calls, the following: IP Address, Network Username, WorkdstationID, Windows version, build version and service pack info, the windows directory, the PDC name if you are logged onto an NT server and the time
62 , ccheckduncount.zip
If you want to check if there is a RAS/DUN conneciton activ, then this little routine will return true or false depending on whats going on. If RAS isn't installed on the machine, it will crash but otherwise its a great routine. For more information
63,winskip.zip
Using the Winsock Control to get IP Information
64,opnblank.zip
Open a Blank Browser Window
65,distitl.zip
Display the Title of a Page in a Form's Caption Bar
66,disbrows.zip
Disable Input to a WebBrowser Control
67,lbllink.zip
Make a Label Act Like an Internet Link
68,linkcmbo.zip
Link a ComboBox to a WebBrowser Control
69,navbutns.zip
Navigation Buttons
70,status.zip
Show Browser Status
71,iphost.zip
Get Local IP and HostName using WinSock
72,xmldirviewer.zip
This is a sample from an XML implementation I created for my company's Intranet, giving the capability for user maintained content
73,phone.zip
A Cellular Phone Application Uses MSCOMM, Modem and normal telephone lines to make calls.
74,PhoneDial.zip
A Phone Dialing program that play both DTMF Tones and MF Tones using wav files. It does not use A real Phone.
75,dnslookup.zip
Easy DNS Lookup and Reverse Name lookup using qdns.dll (dll vb source is included in zip). For use see included sample ASP page.
76,Mar_05_2001.zip
About myself, i am a computer pro experienced in creating dynamic data driven web sites. About the code, it demonstrates the usage of internet transfer control to 下载 the content from the web.
77,InstantMessenger.zip
A basic Instant Messenger.
78,WebCapture.zip
Just mention the site URL and easily Capture the desired Data, Tag's from that Web Site. Also
helps in understanding the use of DoEvents, Error traping and many more features.
79,destructureur.zip
this code analyse DOM of a web document(Document Object Model).
Usefull in order to rettrieve all links, images, scripts informations like url, index, absolute index of all HTML objects.
80,bla.zip
This is an Internet Public Chat Application, which is unique. This is for All. I have seen several Internet Chat systems developed but they were not good enough to encourage the Novice programmers understand the complexities of using the Winsock control. This is the Internet Chat System developed using Winsock Control only and no API calls, or any other DLLs.
81,EmailSystem.zip
In this tutorial of 100+ pages, you can get every thing which is mainly related to build a complete web based email system. this artical will cover everthing of SMTP, POP3, MIME and HTTP.
82,inanny.zip
Inanny is a netnanny like clone,u can use inanny to block sites locally.The new version works with netscape(all versions) as well as ie(all versions).
83,source_build84.zip
IRC Client that supports all basic needs of an IRC Client and a bit more. Uses Raw RTF code, so it's very fast displaying text. Also handles IDENTd properly.
84,Blitz.zip
Blitz Chat System is a complete Chat Server and Client application for internet and intranet users. It has facilities like room selection,
85,QNavigator.zip
Q Navigator Ver 1.1 is an updated form of my Web Browser, which has the best features (and more) of all browsers.
86,atomicclock.zip
RJ Soft's AtomicClock (Atomic Clock.Exe) sets your computers Date and Time from an atomic clock via tcp/ip at 12:01 AM every day. Atomic Clock sits in the system tray so you can load it and forget it or click on the icon and tell it to reset the Date and Time.
86,demooutlook.zip
Send Text or HTML Mail(You can join an ONLINE photo). Retrieve all your input box mails and create a new folder.
87,weather.zip
This is a grand application allowing you to get 10 day weather forecasts for almost every region of the world. Also gives you weather imagery maps. Must see. Kind of a big 下载, but I wanted to make sure everything was included.
88,下载er2.zip
Website 下载er.Updated with many new features.
89,SurfMonitorCODE2.zip
OK folks.....this is a better version of the SurfMonitor code. Not only does it have the 'Autodetect' feature, it also manages the registry better and creates log files. The administrator can also apply time and date restrictions on users....
90,ThePorter.zip
This is an anti-hacker tool I've created. It's much like Lockdown 2000. It sits on your system tray listening for incoming connections on various ports.
91,SurfMonitorCODE.zip
Allows an individual to restrict multiple users to access the users only for a certain amount of time. It also has an 'Autodetect' feature to automatically detect an internet connection and disconnect in case
92,下载er.zip
Just enter the URL of a webspage you want to 下载 and all the links in the webpage will be 下载ed including any image files . The program is still in the development stage .
93,bmail.zip
This software for bulk email for personal and corporate use. The enclosed zip conatains all the codes and readme text. This software uses MAPI and CDO for Windows 9x.
94,winsock.zip
Application demonstrates the use of the VB Winsock control and some of its properties.
95,HTMLEd.zip
A simple HTML editor written in Visual Basic.
96,emailnotifier.rar
This is an application that monitors the local host for IP address changes and notifies a list of people by e-mail if the IP address changes. Both the IP address and the e-mail list are stored between sessions
97,pbaspediter.zip
A Full Advanced ASP/Html Editer with Database, Cookies, includes, sounds, forms, body, Tables wizards and more. (Wizards do html & responce.write) Color coding html. tag inserts, Plugins, Templates, Java codebase, vbscript codebases, full asp codebase Asp Preview on localhost and normal preview and LOTS MORE MUST SEE
98,Exchange_Viewer.zip
You must have Access 2000 installed in order to print. Other than that you should be fine. This will anonymously query an exchange 5.5 or higher exchange server and retrieve The names and email addresses and place them into an access database. This code has many useful examples.
99,Automatic_Updater.zip
UPDATED 11/10/2000 Now With even more options!! This application allows you to check for an updated version of a file or a program via FTP, then 下载 that update if it is available.
100,PingX.zip
Ping(s) a computer and returns the results.
101,hmupdatedold.zip
HotmailBox - Alternative Hotmail client that accesses your inbox. Includes support for multiple accounts, synchronizes your account, has a built-in address book and support for attachments (with the exception of images, so far).
102,hypermap.zip
Hyper_Map allows you to define areas on a webpage graphic for jumping to different URLs. Image mapping is a neat way to create links. Also, the program demonstrates Picture1 draw properties and some HTML creation.
103,icqvb.zip
ICQ Control Center, The worlds most complete icq api example freely availble on the net, this revised edition contains protocol information sample code and much much more !
104,HTMLMail.zip
This application allows to send HTML mails ! Now you can send images, formatted text in your mails, put some really cool effects !
105,NTPSync.zip
Synchronize Your System Time with a Network Time Protocol (NTP) Server.
106,WinsockTrans.zip
This code allows you to transfer files from one pc to another using winsock.
107,Winsock下载.zip
Winsock 下载er - Lets you 下载 any file from the internet (Binary, ASCII, Text) any size.
108,ftp2.zip
An FTP application with complete VB source code included.
109,vb-aim.zip
AOL instant messenger client written in VB.
110,ping2src.zip
Version 2.02 of the popular Idoru Ping Monitor. Includes a Password Hacker, and shows important info on your machine
111,OnYxBrowser.zip
A full avtive browser, with all IE's trimings, i have left out the exe and some of the ocx. but ppl who have vb60 should have these ocx.
112,PostMan.zip
VB application which uses winsock control to send mail to your mail server!
113,transfer.zip
Simple file transfer (FTP) application. Contains both the client and server VB source code .vbp applications. Destination filename is set to "Temp".
114,inter.zip
Detects if the user is connected to the internet.
115,frmClient.zip
Started to program a remote tool FTP program. Give some feedback otherwise i'm going to code it in Delphi.
116,prjClient.zip
Live wire winsock file transfer program which retreives remote drives/directories and working on files and enables upload/下载 of files with progressbar.
117,webbrowser2.zip
I have tried to develop a very good browser. Now I myself can't rate it... so i am leaving to you guys out there to rate it..
118,InternetBrowser.zip
It is an interesting Internet Browser. Add your favorites, URLs, Home Page, and History to Windows 95/98 Registry. Must see.
119,Browser2.zip
[UPDATED]:Complete Internet Browser. Must see.
120,display.zip
This code sample enables users to 下载 and display HTML, RTF, or Text files in a RichTextBox Control, using the Microsoft Internet Transfer Control included in Visual Basic 5.0.
121,easyhttp.zip
Retrieve Web page or file (including all HTTP headers and message body) througn HTTP protocol directly from VB program which utilize the MS WinSock Control.
122,emailcheck.zip
This application checks for incoming mail (POP3 client).
123,NetSend.zip
A Simple Application to Send Messages Without using a COMMAND Prompt.
124,ChatPrg.zip
This application provides seamless interaction between users of an intranet. The database acts as a Server and it has to be loaded on the server of your local intranet and each .exe serves as
a client.
125,Chatty.zip
This is a simple one-to-one chat program using Winsock. It includes a text based chat, a messaging feature and also a secure communication feature, much like SSL. I use the RSA 64 bit encryption for the secure channel.
126,Telephonic.zip
The program can be used in your desktop, as is. You will find dialing much more confortable and fast than the original Windows Dialer.exe.
127,ClientServer.zip
A messages Client / Server application (compile and source code).You can send messages from a client to another and server remote all users activity and distribute the messages to client who request that
128,MESSENGER.zip
E-MAIL PROGRAM. ALLOWS USER TO LOG INTO ISP SERVICE AND SEND MESSAGES AND FILES.
129,ip.zip
Very simple application which shows how to get your PC's IP address using the VB Winsock control.
130,CS_Tools_2.zip
This program can save you days to weeks of work on a huge domain with hundreds to thousands of users with its "Bulk Administration" and remote feature. Features Bulk Administration Allows you to administer the login path, profile path, home directory, and more with one click of a button for all users! Alternate Credentials Allows you to specify a different username and password to complete your tasks.
131,networkinfo.zip
Application which gets all network information from the system.
132,gethtml.zip
This example uses the Inet control to 下载 the HTML source from any webpage. This could easily be used in conjunction with the Get Web Links example to make a full fledged web-spider and search engine program...
133,getweblinks.zip
This example uses the WebBrowser control to load a web page then enumerate and display all of the links on that page. This example could be easily expanded to be used as a web-spider with a little bit of effort.
134,bs2vb.zip
This example is a very simple solution to sending and receiving data to and from a Parallax Basic Stamp. This example requires a Basic Stamp and the MSComm control. Also included is an example Basic Stamp II program to work with the example...
135,Chatptop.zip
A Peer-to-Peer chatting program with a very easy user interface.
136,f_160.zip
A basic example on how to transfer files across the network using the WinSock Control(18KB)
137,f_159.zip
A simple example of exchanging data across a network using the WinSock control(4KB)
138,f_115.zip
A simple web browser built using the Web Browser control(2KB)
• Table of Contents • Index • Reviews • Reader Reviews • Errata • Academic Python Cookbook, 2nd Edition By David Ascher, Alex Martelli, Anna Ravenscroft Publisher : O'Reilly Pub Date : March 2005 ISBN : 0-596-00797-3 Pages : 844 Copyright Preface The Design of the Book The Implementation of the Book Using the Code from This Book Audience Organization Further Reading Conventions Used in This Book How to Contact Us Safari® Enabled Acknowledgments Chapter 1. Text Introduction Recipe 1.1. Processing a String One Character at a Time Recipe 1.2. Converting Between Characters and Numeric Codes Recipe 1.3. Testing Whether an Object Is String-like Recipe 1.4. Aligning Strings Recipe 1.5. Trimming Space from the Ends of a String Recipe 1.6. Combining Strings Recipe 1.7. Reversing a String by Words or Characters Recipe 1.8. Checking Whether a String Contains a Set of Characters Recipe 1.9. Simplifying Usage of Strings' translate Method Recipe 1.10. Filtering a String for a Set of Characters Recipe 1.11. Checking Whether a String Is Text or Binary Recipe 1.12. Controlling Case Recipe 1.13. Accessing Substrings Recipe 1.14. Changing the Indentation of a Multiline String Recipe 1.15. Expanding and Compressing Tabs Recipe 1.16. Interpolating Variables in a String Recipe 1.17. Interpolating Variables in a Stringin Python 2.4 Recipe 1.18. Replacing Multiple Patterns in a Single Pass Recipe 1.19. Checking a String for Any of Multiple Endings Recipe 1.20. Handling International Text with Unicode Recipe 1.21. Converting Between Unicode and Plain Strings Recipe 1.22. Printing Unicode Charactersto Standard Output
go程序设计语言 Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING STARTED Chapter 1—Origins, Context and Popularity of Go...............................................................1 1.1 Origins and evolution................................................................................................1 1.2 Main characteristics, context and reasons for developing a new language....................4 1.2.1 Languages that influenced Go.........................................................................4 1.2.2 Why a new language?......................................................................................5 1.2.3 Targets of the language....................................................................................5 1.2.4 Guiding design principles...............................................................................7 1.2.5 Characteristics of the language........................................................................7 1.2.6 Uses of the language........................................................................................8 1.2.7 Missing features?.............................................................................................9 1.2.8 Programming in Go......................................................................................10 1.2.9 Summary......................................................................................................10 Chapter 2—Installation and Runtime Environment............................................................11 2.1 Platforms and architectures.....................................................................................11 (1) The gc Go-compilers:..................................................................................11 (2) The gccgo-compiler:....................................................................................13 (3) File extensions and packages:.......................................................................14 2.2 Go Environment variables........................................................................................14 2.3 Installing Go on a Linux system...............................................................................16 2.4 Installing Go on an OS X system.............................................................................21 2.5 Installing Go on a Windows system.........................................................................21 2.6 What is installed on your machine? .........................................................................26 2.7 The Go runtime.......................................................................................................27 2.8 A Go interpreter ......................................................................................................27 Chapter 3—Editors, IDE’s and Other tools.........................................................................28 3.1 Basic requirements for a decent Go development environment.................................28 3.2 Editors and Integrated Development Environments.................................................29 3.2.1. Golang LiteIDE ..........................................................................................32 3.2.2. GoClipse......................................................................................................33 3.3 Debuggers................................................................................................................34 3.4 Building and running go-programs with command- and Makefiles..........................35 3.5 Formatting code: go fmt or gofmt............................................................................39 3.6 Documenting code: go doc or godoc........................................................................40 3.7 Other tools...............................................................................................................41 3.8 Go’s performance.....................................................................................................41 3.9 Interaction with other languages...............................................................................43 3.9.1. Interacting with C .......................................................................................43 3.9.2. Interacting with C++....................................................................................45 PART 2—CORE CONSTRUCTS AND TECHNIQUES OF THE LANGUAGE Chapter 4—Basic constructs and elementary data types.......................................................49 4.1. Filenames—Keywords—Identifiers..........................................................................49 4.2. Basic structure and components of a Go-program...................................................50 4.2.1 Packages, import and visibility......................................................................51 4.2.3 Comments....................................................................................................56 4.2.4 Types............................................................................................................57 4.2.5 General structure of a Go-program...............................................................58 4.2.6 Conversions..................................................................................................60 4.2.7 About naming things in Go..........................................................................60 4.3. Constants................................................................................................................60 4.4. Variables..................................................................................................................63 4.4.1 Introduction.................................................................................................63 4.4.2 Value types and reference types.....................................................................66 4.4.3 Printing........................................................................................................68 4.4.4 Short form with the := assignment operator..................................................69 4.4.5 Init-functions................................................................................................70 4.5. Elementary types and operators...............................................................................73 4.5.1. Boolean type bool........................................................................................73 4.5.2. Numerical types...........................................................................................75 4.5.2.1 ints and floats.............................................................................................75 4.5.2.2 Complex numbers.....................................................................................79 4.5.2.3 Bit operators..............................................................................................79 4.5.2.4 Logical operators........................................................................................81 4.5.2.5 Arithmetic operators.................................................................................82 4.5.2.6 Random numbers......................................................................................82 4.5.3. Operators and precedence............................................................................84 4.5.4. Aliasing types...............................................................................................84 4.5.5. Character type.............................................................................................85 4.6. Strings.....................................................................................................................86 4.7. The strings and strconv package..............................................................................88 4.7.1—Prefixes and suffixes:...................................................................................88 4.7.2—Testing whether a string contains a substring:.............................................89 4.7.3—Indicating at which position (index) a substring or character occurs in a string:...................................................................................................89 4.7.4—Replacing a substring:................................................................................90 4.7.5—Counting occurrences of a substring:..........................................................90 4.7.6—Repeating a string:.....................................................................................90 4.7.7—Changing the case of a string:....................................................................91 4.7.8—Trimming a string:.....................................................................................92 4.7.9—Splitting a string:........................................................................................92 4.7.10—Joining over a slice:..................................................................................92 4.7.11—Reading from a string:..............................................................................93 4.8. Times and dates.......................................................................................................95 4.9. Pointers...................................................................................................................96 Chapter 5—Control structures...........................................................................................101 5.1—The if else construct............................................................................................101 5.2—Testing for errors on functions with multiple return values..................................106 5.3—The switch keyword............................................................................................110 5.4—The for construct................................................................................................114 5.4.1 Counter-controlled iteration.......................................................................114 Character on position 2 is:...........................................................................................116 5.4.2 Condition-controlled iteration ...................................................................117 5.4.3 Infinite loops .............................................................................................118 5.4.4 The for range construct...............................................................................119 5.5—Break / continue..................................................................................................121 5.6—Use of labels with break and continue—goto.......................................................123 Chapter 6—Functions.......................................................................................................126 6.1 Introduction...........................................................................................................126 6.2 Parameters and return values..................................................................................129 6.2.1 Call by value / Call by reference..................................................................129 6.2.2 Named return variables...............................................................................131 6.2.3 Blank identifier...........................................................................................133 6.2.4 Changing an outside variable......................................................................134 6.3 Passing a variable number of parameters.................................................................135 6.4 Defer and tracing...................................................................................................137 6.5 Built-in functions...................................................................................................142 6.6 Recursive functions................................................................................................143 6.8 Closures (function literals).....................................................................................147 6.9 Applying closures: a function returning another function ......................................150 6.10 Debugging with closures......................................................................................153 6.11 Timing a function ...............................................................................................154 6.12 Using memoization for performance....................................................................154 Chapter 7—Arrays and Slices.............................................................................................157 7.1 Declaration and initialization.................................................................................157 7.1.1 Concept......................................................................................................157 7.1.2 Array literals................................................................................................161 7.1.3 Multidimensional arrays..............................................................................162 7.1.4 Passing an array to a function......................................................................163 7.2 Slices......................................................................................................................164 7.2.1 Concept......................................................................................................164 7.2.2 Passing a slice to a function.........................................................................168 7.2.3 Creating a slice with make()........................................................................168 7.2.4 Difference between new() and make().........................................................170 7.2.5 Multidimensional slices...............................................................................171 7.2.6 The bytes package.......................................................................................171 7.3 For range construct................................................................................................172 7.4 Reslicing.................................................................................................................175 7.5 Copying and appending slices................................................................................176 7.6 Applying strings, arrays and slices...........................................................................178 7.6.1 Making a slice of bytes from a string...........................................................178 7.6.2 Making a substring of a string.....................................................................179 7.6.3 Memory representation of a string and a slice..............................................179 7.6.4 Changing a character in a string..................................................................180 7.6.5 Comparison function for byte arrays...........................................................180 7.6.6 Searching and sorting slices and arrays.......................................................181 7.6.7 Simulating operations with append.............................................................182 7.6.8 Slices and garbage collection.......................................................................182 Chapter 8—Maps..............................................................................................................185 8.1 Declaration, initialization and make.......................................................................185 8.1.1 Concept......................................................................................................185 8.1.2 Map capacity..............................................................................................188 8.1.3 Slices as map values.....................................................................................188 8.2 Testing if a key-value item exists in a map—Deleting an element...........................188 8.3 The for range construct..........................................................................................190 8.4 A slice of maps......................................................................................................191 8.5 Sorting a map.........................................................................................................192 8.6 Inverting a map......................................................................................................194 Chapter 9—Packages.........................................................................................................196 A The standard library..................................................................................................196 9.1 Overview of the standard library.............................................................................196 9.2 The regexp package................................................................................................199 9.3 Locking and the sync package................................................................................200 9.4 Accurate computations and the big package...........................................................202 B Custom and external packages: use, build, test, document, install.............................203 9.5 Custom packages and visibility...............................................................................203 9.6 Using godoc for your custom packages...................................................................208 9.7 Using go install for installing custom packages.......................................................210 9.8 Custom packages: map structure, go install and go test..........................................212 9.8.1 Map-structure for custom packages.............................................................212 9.8.2 Locally installing the package......................................................................215 9.8.3 OS dependent code.....................................................................................216 9.9 Using git for distribution and installation...............................................................216 9.9.1 Installing to github.....................................................................................216 9.9.2 Installing from github.................................................................................217 9.10 Go external packages and projects. ......................................................................218 9.11 Using an external library in a Go program............................................................219 Chapter 10—Structs and Methods.....................................................................................224 10.1 Definition of a struct............................................................................................224 10.2 Creating a struct variable with a Factory method..................................................232 10.2.1 A factory for structs..................................................................................232 10.2.2 new() and make() revisited for maps and structs:.......................................234 10.3 Custom package using structs...............................................................................235 10.4 Structs with tags...................................................................................................236 10.5 Anonymous fields and embedded structs..............................................................237 10.5.1 Definition.................................................................................................237 10.5.2 Embedded structs.....................................................................................238 10.5.3 Conflicting names.....................................................................................239 10.6 Methods...............................................................................................................240 10.6.1 What is a method?....................................................................................240 10.6.2 Difference between a function and a method............................................244 10.6.3 Pointer or value as receiver........................................................................245 10.6.4 Methods and not-exported fields..............................................................247 10.6.5 Methods on embedded types and inheritance............................................248 10.6.6 How to embed functionality in a type.......................................................251 10.6.7 Multiple inheritance..................................................................................253 10.6.8 Universal methods and method naming....................................................256 10.6.9 Comparison between Go types and methods and other object-oriented languages...........................................................................256 10.7 The String()-method and format specifiers for a type...........................................258 10.8 Garbage collection and SetFinalizer......................................................................261 Chapter 11—Interfaces and reflection................................................................................263 11.1 What is an interface?............................................................................................263 11.2 Interface embedding interface(s)...........................................................................270 11.3 How to detect and convert the type of an interface variable: type assertions.........270 11.4 The type switch....................................................................................................273 11.5 Testing if a value implements an interface.............................................................274 11.6 Using method sets with interfaces.........................................................................275 11.7 1st example: sorting with the Sorter interface........................................................277 11.8 2nd example: Reading and Writing......................................................................282 11.9 Empty Interface...................................................................................................284 11.9.1 Concept....................................................................................................284 11.9.2 Constructing an array of a general type or with variables of different types............................................................................................286 11.9.3 Copying a data-slice in a slice of interface{}...............................................287 11.9.4 Node structures of general or different types.............................................288 11.9.5 Interface to interface.................................................................................289 11.10 The reflect package.............................................................................................290 11.10.1 Methods and types in reflect...................................................................290 11.10.2 Modifying (setting) a value through reflection........................................293 11.10.3 Reflection on structs...............................................................................294 11.11 Printf and reflection...........................................................................................296 11.12 Interfaces and dynamic typing............................................................................298 11.12.1 Dynamic typing in Go............................................................................298 11.12.2 Dynamic method invocation...................................................................300 11.12.3 Extraction of an interface........................................................................301 11.12.4 Explicitly indicating that a type implements an interface........................303 11.12.5 Empty interface and function overloading..............................................304 11.12.6 Inheritance of interfaces..........................................................................304 11.13 Summary: the object-orientedness of Go............................................................306 11.14 Structs, collections and higher order functions...................................................306 PART 3—ADVANCED GO Chapter 12—Reading and writing.....................................................................................313 12.1 Reading input from the user.................................................................................313 12.2 Reading from and writing to a file........................................................................317 12.2.1 Reading from a file....................................................................................317 12.2.2 The package compress: reading from a zipped file.....................................321 12.2.3 Writing to a file.........................................................................................322 12.3 Copying files........................................................................................................324 12.4 Reading arguments from the command-line.........................................................325 12.4.1 With the os-package..................................................................................325 12.4.2 With the flag-package...............................................................................326 12.5 Reading files with a buffer....................................................................................328 12.6 Reading and writing files with slices.....................................................................330 12.7 Using defer to close a file.....................................................................................332 12.8 A practical example of the use of interfaces: fmt.Fprintf......................................332 12.9 The json dataformat.............................................................................................334 12.10 The xml dataformat............................................................................................340 12.11 Datatransport through gob.................................................................................342 12.12 Cryptography with go........................................................................................345 Chapter 13—Error-handling and Testing...........................................................................348 13.1 Error-handling.....................................................................................................349 13.1.1 Defining errors..........................................................................................349 13.1.2 Making an error-object with fmt..............................................................353 13.2 Run-time exceptions and panic............................................................................353 13.4 Error-handling and panicking in a custom package..............................................357 13.5 An error-handling scheme with closures...............................................................360 13.6 Starting an external command or program...........................................................363 13.7 Testing and benchmarking in Go.........................................................................364 13.8 Testing: a concrete example..................................................................................367 13.9 Using table-driven tests........................................................................................369 13.10 Investigating performance: tuning and profiling Go programs............................371 13.10.1 Time and memory consumption.............................................................371 13.10.2 Tuning with go test.................................................................................371 13.10.3 Tuning with pprof...................................................................................371 Chapter 14—Goroutines and Channels.............................................................................375 14.1 Concurrency, parallelism and goroutines..............................................................375 14.1.1 What are goroutines?................................................................................375 14.1.2 The difference between concurrency and parallelism.................................377 14.1.3 Using GOMAXPROCS............................................................................378 14.1.4 How to specify the number of cores to be used on the command-line?.....379 14.1.5 Goroutines and coroutines........................................................................381 14.2 Channels for communication between goroutines................................................381 14.2.1 Concept....................................................................................................381 14.2.2 Communication operator <-.....................................................................383 14.2.3 Blocking of channels.................................................................................385 14.2.4 Goroutines synchronize through the exchange of data on one (or more) channel(s)........................................................................................387 14.2.5 Asynchronous channels—making a channel with a buffer.........................387 14.2.6 Goroutine using a channel for outputting result(s)....................................388 14.2.7 Semaphore pattern....................................................................................389 14.2.8 Implementing a parallel for-loop...............................................................391 14.2.9 Implementing a semaphore using a buffered channel................................391 14.2.10 For—range applied to channels...............................................................394 14.2.11 Channel directionality............................................................................396 14.3 Synchronization of goroutines: closing a channel—testing for blocked channels..400 14.4 Switching between goroutines with select.............................................................403 14.5 Channels, Timeouts and Tickers...........................................................................408 14.6 Using recover with goroutines..............................................................................412 14.7 Comparing the old and the new model: Tasks and Worker processes....................413 14.8 Implementing a lazy generator..............................................................................416 14.9 Implementing Futures..........................................................................................420 14.10 Multiplexing......................................................................................................421 14.10.1 A typical client-server pattern..................................................................421 14.10.2 Teardown: shutdown the server by signaling a channel............................424 14.11 Limiting the number of requests processed concurrently....................................427 14.12 Chaining goroutines...........................................................................................428 14.13 Parallelizing a computation over a number of cores............................................429 14.14 Parallelizing a computation over a large amount of data.....................................430 14.15 The leaky bucket algorithm................................................................................431 14.16 Benchmarking goroutines...................................................................................433 14.17 Concurrent acces to objects by using a channel..................................................434 Chapter 15—Networking, templating and web-applications..............................................436 15.1 A tcp-server .........................................................................................................436 15.2 A simple webserver...............................................................................................445 15.3 Polling websites and reading in a web page...........................................................448 15.4 Writing a simple web application.........................................................................452 15.5 Making a web application robust..........................................................................454 15.6 Writing a web application with templates.............................................................456 15.7 Exploring the template package............................................................................461 15.7.1. Field substitution: {{.FieldName}}............................................................462 15.7.2. Validation of the templates.......................................................................463 15.7.3 If-else........................................................................................................464 15.7.4 Dot and with-end.....................................................................................465 15.7.5 Template variables $..................................................................................466 15.7.6 Range-end.................................................................................................467 15.7.7 Predefined template functions...................................................................467 15.8 An elaborated webserver with different functions.................................................468 (works only on Unix because calls /bin/date)........................................................474 15.9 Remote procedure calls with rpc...........................................................................474 15.10 Channels over a network with netchan...............................................................477 15.11 Communication with websocket........................................................................478 15.12 Sending mails with smtp....................................................................................480 PART 4—APPLYING GO Chapter 16—Common Go Pitfalls or Mistakes..................................................................485 16.1 Hiding (shadowing) a variable by misusing short declaration...............................486 16.2 Misusing strings...................................................................................................486 16.3 Using defer for closing a file in the wrong scope...................................................487 16.4 Confusing new() and make()................................................................................488 16.5 No need to pass a pointer to a slice to a function..................................................488 16.6 Using pointers to interface types...........................................................................488 16.7 Misusing pointers with value types.......................................................................489 16.8 Misusing goroutines and channels........................................................................489 16.9 Using closures with goroutines.............................................................................490 16.10 Bad error handling.............................................................................................491 16.10.1 Don’t use booleans:.................................................................................491 16.10.2 Don’t clutter your code with error-checking:...........................................492 Chapter 17—Go Language Patterns...................................................................................494 17.1 The comma, ok pattern........................................................................................494 17.2 The defer pattern..................................................................................................495 17.3 The visibility pattern............................................................................................497 17.4 The operator pattern and interface.......................................................................497 17.4.1 Implement the operators as functions.......................................................497 17.4.2 Implement the operators as methods.........................................................498 17.4.3 Using an interface.....................................................................................499 Chapter 18—Useful Code Snippets—Performance Advice.................................................500 18.1 Strings..................................................................................................................500 18.2 Arrays and slices...................................................................................................501 18.3 Maps....................................................................................................................502 18.4 Structs..................................................................................................................502 18.5 Interfaces..............................................................................................................503 18.6 Functions.............................................................................................................503 18.7 Files......................................................................................................................504 18.8 Goroutines and channels......................................................................................505 18.9 Networking and web applications.........................................................................507 18.9.1. Templating:......................................................................................................507 18.10 General..............................................................................................................508 18.11 Performance best practices and advice................................................................508 Chapter 19—Building a complete application....................................................................509 19.1 Introduction.........................................................................................................509 19.2 Introducing Project UrlShortener.........................................................................509 19.3 Data structure......................................................................................................510 19.4 Our user interface: a web server frontend.............................................................515 19.5 Persistent storage: gob..........................................................................................519 19.6 Using goroutines for performance........................................................................524 19.7 Using json for storage...........................................................................................527 19.8 Multiprocessing on many machines......................................................................528 19.9 Using a ProxyStore...............................................................................................532 19.10 Summary and enhancements..............................................................................536 Chapter 20—Go in Google App Engine............................................................................538 20.1 What is Google App Engine ?...............................................................................538 20.2 Go in the cloud ...................................................................................................540 20.3 Installation of the Go App Engine SDK: the development environment for Go...540 20.3.1. Installation...............................................................................................540 20.3.2. Checking and testing...............................................................................542 20.4 Building your own Hello world app ....................................................................543 20.4.1 Map structure—Creating a simple http-handler........................................543 20.4.2 Creating the configuration file app.yaml...................................................544 20.4.3 Iterative development................................................................................548 20.4.4. Integrating with the GoClipse IDE..........................................................548 20.5 Using the Users service and exploring its API.......................................................549 20.6 Handling forms....................................................................................................551 20.7 Using the datastore...............................................................................................552 20.8 Uploading to the cloud.......................................................................................556 Chapter 21—Real World Uses of Go.................................................................................559 21.1 Heroku—a highly available consistent data store in Go. ......................................559 21.2 MROffice—a VOIP system for call centers in Go................................................561 21.3 Atlassian—a virtual machine cluster management system.....................................562 21.4 Camlistore—a content addressable storage system................................................563 21.5 Other usages of the Go language..........................................................................563 APPENDICES...................................................................................................................567 (A) CODE REFERENCE...........................................................................................567 (B)CUTE GO QUOTES.............................................................................................571 GO QUOTES: TRUE BUT NOT SO CUTE....................................................572 (C) LIST OF CODE EXAMPLES (Listings)...............................................................572 (E) References in the text to Go—packages..................................................................583 (F) References in the text to Go—tools........................................................................586 (G) Answers to Questions............................................................................................586 (H) ANSWERS TO EXERCISES................................................................................590 (I) BIBLIOGRAPHY (Resources and References)........................................................593 Index..............................................................................................................................597 List of Illustrations Chapter 1—Origins, Context and Popularity of Go...............................................................1 Fig 1.1: The designers of Go: Griesemer, Thompson and Pike..........................................1 Fig 1.2: The logo’s of Go..................................................................................................3 Fig 1.3: Influences on Go.................................................................................................5 Chapter 3—Editors, IDE’s and Other tools.........................................................................28 Fig 3.1: LiteIDE and its AST-view..................................................................................33 Fig 3.2: GoClipse and its outline code-view...................................................................34 Chapter 4—Basic constructs and elementary data types.......................................................49 Fig 4.1: Value type..........................................................................................................67 Fig 4.2: Assignment of value types..................................................................................67 Fig 4.3: Reference types and assignment.........................................................................67 Fig 4.4: Pointers and memory usage...............................................................................98 Fig 4.5: Pointers and memory usage, 2...........................................................................99 Chapter 7—Arrays and Slices.............................................................................................157 Fig 7.1: Array in memory.............................................................................................158 Fig 7.2: Slice in memory..............................................................................................166 Chapter 9—Packages.........................................................................................................196 Fig 9.1: Package documentation with godoc.................................................................210 Chapter 10—Structs and Methods.....................................................................................224 Fig 10.1: Memory layout of a struct.............................................................................227 Fig 10.2: Memory layout of a struct of structs..............................................................229 Fig. 10.3: Linked list as recursive struct........................................................................230 Fig 10.4: Binary tree as recursive struct.........................................................................230 Chapter 11—Interfaces and reflection................................................................................263 Fig 11.1: Interface value in memory.............................................................................264 Chapter 14—Goroutines and Channels.............................................................................375 Fig 14.1: Channels and goroutines...............................................................................382 Fig 14.2: The sieve prime-algorithm.............................................................................397 Chapter 15—Networking, templating and web-applications..............................................436 Fig 15.1—Screen of exercise 15.6.................................................................................454 Chapter 19—Building a complete application....................................................................509 Fig 19.1: Handler functions in goto.............................................................................515 Fig 19.2: The Add handler...........................................................................................518 Fig 19.3: The response of the Add handler...................................................................519 Fig 19.4: The response of the Redirect handler.............................................................519 Fig 19.5: Distributing the work load over master- and slave computers........................529 Chapter 20—Go in Google App Engine............................................................................538 Fig 20.1: The Application Control Panel......................................................................558
The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface................................................................................................................................. xix PART 1—WHY LEARN GO—GETTING STARTED Chapter 1—Origins, Context and Popularity of Go...............................................................1 1.1 Origins and evolution................................................................................................1 1.2 Main characteristics, context and reasons for developing a new language....................4 1.2.1 Languages that influenced Go.........................................................................4 1.2.2 Why a new language?......................................................................................5 1.2.3 Targets of the language....................................................................................5 1.2.4 Guiding design principles...............................................................................7 1.2.5 Characteristics of the language........................................................................7 1.2.6 Uses of the language........................................................................................8 1.2.7 Missing features?.............................................................................................9 1.2.8 Programming in Go......................................................................................10 1.2.9 Summary......................................................................................................10 Chapter 2—Installation and Runtime Environment............................................................11 2.1 Platforms and architectures.....................................................................................11 (1) The gc Go-compilers:...........................................................

6,850

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧