自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

lemo的专栏

Don't Grow Old - Grow Up!

  • 博客(4)
  • 资源 (16)
  • 收藏
  • 关注

原创 Apache Thrift的简单使用

 Apache Thrift的简单使用---------------------- 1. 简单介绍Thrift是Facebook的一个开源项目,主要是一个跨语言的服务开发框架。它有一个代码生成器来对它所定义的IDL定义文件自动生成服务代码框架。用户只要在其之前进行二次开发就行,对于底层的RPC通讯等都是透明的。目前它支持的语言有C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml. 2. 下载

2011-03-20 12:49:00 69205 10

转载 Thrift 是什么?

<br /><br />Thrift  是什么?<br />  Thrift源于大名鼎鼎的facebook之手,在2007年facebook提交Apache基金会将Thrift作为一个开源项目,对于当时的facebook来说创造thrift是为了解决facebook系统中各系统间大数据量的传 输通信以及系统之间语言环境不同需要跨平台的特性。所以thrift可以支持多种程序语言,例如:  C++, C#, Cocoa, Erlang, Haskell, Java, Ocami, Perl, PHP, Pyth

2011-03-19 20:42:00 10231

原创 MongoDB的Replication简单介绍

 MongoDB的Replication简单介绍 1. 什么是Replication数据复制是为了使数据得到最大的可用性,避免单点故障的发生,MongoDB支持在服务器之间进行数据的异步复制,来满足数据的最终一致性。但是同一时刻只有一台服务器是可以写的。当只有一台master时,数据的强一致性就可以得到保障。但当用户从slaves上去读数据时,这里只能保障数据的最终一致性。目前MongoDB提供了三种Replication方式,Matser/Matser, Matser/Slave,Replica Sets

2011-03-02 23:08:00 6704

原创 MongoDB简单介绍

 1. MongoDB的简单介绍MongoDB (from "humongous") 是一个可扩展的,高效的,面向文档的数据库。它的作用是介于关系数据库与key-value数据库之间的一种数据库。它具有如下几个特点: 面向文档的存储结构:它底层是用一种叫JSON的结构来做为基本的存储单元,以此来提供动态的Schema,对任意属性的索引支持数据冗余与高可用性数据的自动分片丰富的查询模式支持Map/Reduce数据流处理基于GridFS的文件存储系统 2. Quickstart 64-bit linux下面是一

2011-03-02 22:26:00 1940

scaling_mongodb

In the Terminator movies, an artificial intelligence called Skynet wages war on humans, chugging along for decades creating robots and killing off humanity. This is the dream of most ops people—not to destroy humanity, but to build a distributed system that will work long-term without relying on people carrying pagers. Skynet is still a pipe dream, unfortunately, because distributed systems are very difficult, both to design well and to keep running. A single database server has a couple of basic states: it’s either up or down. If you add another machine and divide your data between the two, you now have some sort of dependency between the servers. How does it affect one machine if the other goes down? Can your application handle either (or both) machines going down? What if the two machines are up, but can’t communicate? What if they can communicate, but only very, very, slowly? As you add more nodes, these problems just become more numerous and complex: what happens if entire parts of your cluster can’t communicate with other parts? What happens if one subset of machines crashes? What happens if you lose an entire data center? Suddenly, even taking a backup becomes difficult: how do you take a consistent snapshot of many terabytes of data across dozens of machines without freezing out the application trying to use the data? If you can get away with a single server, it is much simpler. However, if you want to store a large volume of data or access it at a rate higher than a single server can handle, you’ll need to set up a cluster. On the plus side, MongoDB tries to take care of a lot of the issues listed above. Keep in mind that this isn’t as simple as setting up a single mongod (then again, what is?). This book shows you how to set up a robust cluster and what to expect every step of the way.

2012-05-31

Managing Projects with GNU Make

In Part I, we focus on the features of make, what they do, and how to use them prop- erly. We begin with a brief introduction and overview that should be enough to get you started on your first makefile. The chapters then cover make rules, variables, func- tions, and finally command scripts. When you are finished with Part I, you will have a fairly complete working knowl- edge of GNU make and have many advanced usages well in hand.

2010-08-04

mastering unix shell scripting

The information that I gathered together in this book is the result of working with some of the most talented UNIX professionals on the topic. I have enjoyed every minute of my association with these UNIX gurus and it has been my pleasure to have the opportunity to gain so much knowledge from the pros. I want to thank every one of these experts for asking and answering questions over the last fifteen years. If my brother, Jim, had not kept telling me, “you should write a book,” after querying me for UNIX details on almost a weekly basis, I doubt this book would have ever been writ- ten. So, thanks Jim! I especially want to thank Jack Renfro at Daimler/Chrysler Corporation for giving me my first shell scripting project so long ago. I had to start with the man pages, but that is how I learned to dig deep to get an answer. Since then I have been on a mission to automate, through shell scripting, everything on every system that I come in contact with. I certainly value the years that I was able to work with Jack. I must also thank the talented people at Wiley Publishing. Margaret Eldridge started me on this project by letting me do my own thing, and Carol Long kept me going. Scott Amerman kept me on schedule, and Angela Smith did the edits that make my writing flow with ease. It has been a valuable experience for me to work with such a fine group of professionals at Wiley. I also want to thank Carole McClendon at Waterside Produc- tions for all of the support on this project. Carole is the best Agent that anyone could ever ask for. She is a true professional with the highest ethics. Of course my family had a lot to do with my success on this and every project. I want to thank Mom, Gene, Jim, Marcia, Rusty, Mallory, and Anica. I want to thank my Wife Robin for her understanding and support. The girls, Andrea and Ana, always keep a smile on my face, and Steve is always on my mind. I could not have written this book without the support of all of these people and the many others that remain unnamed. It has been an honor!

2010-03-05

programming erlang

Many of the designations used by manufacturers and sellers to distinguish their prod- ucts are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at

2010-03-05

Introduction to Information Retrieval

Introduction to Information Retrieval Introduction to Information Retrieval is the first textbook with a coherent treat- ment of classical and web information retrieval, including web search and the related areas of text classification and text clustering. Written from a computer science perspective, it gives an up-to-date treatment of all aspects of the design and implementation of systems for gathering, indexing, and searching documents and of methods for evaluating systems, along with an introduction to the use of machine learning methods on text collections. Designed as the primary text for a graduate or advanced undergraduate course in information retrieval, the book will also interest researchers and professionals. A complete set of lecture slides and exercises that accompany the book are available on the web. Christopher D. Manning is Associate Professor of Computer Science and Lin- guistics at Stanford University. Prabhakar Raghavan is Head of Yahoo! Research and a Consulting Professor of Computer Science at Stanford University. ̈ Hinrich Schutze is Chair of Theoretical Computational Linguistics at the In- stitute for Natural Language Processing, University of Stuttgart.

2010-03-05

refactoring improving the design of existing code

Your class library works, but could it be better? Refactoring: Improving the Design of Existing Code shows how refactoring can make object-oriented code simpler and easier to maintain. Today refactoring requires considerable design know-how, but once tools become available, all programmers should be able to improve their code using refactoring techniques. Besides an introduction to refactoring, this handbook provides a catalog of dozens of tips for improving code. The best thing about Refactoring is its remarkably clear presentation, along with excellent nuts-and-bolts advice, from object expert Martin Fowler. The author is also an authority on software patterns and UML, and this experience helps make this a better book, one that should be immediately accessible to any intermediate or advanced object-oriented developer. (Just like patterns, each refactoring tip is presented with a simple name, a "motivation," and examples using Java and UML.) Early chapters stress the importance of testing in successful refactoring. (When you improve code, you have to test to verify that it still works.) After the discussion on how to detect the "smell" of bad code, readers get to the heart of the book, its catalog of over 70 "refactorings"--tips for better and simpler class design. Each tip is illustrated with "before" and "after" code, along with an explanation. Later chapters provide a quick look at refactoring research. Like software patterns, refactoring may be an idea whose time has come. This groundbreaking title will surely help bring refactoring to the programming mainstream. With its clear advice on a hot new topic, Refactoring is sure to be essential reading for anyone who writes or maintains object-oriented software. --Richard Dragan Topics Covered: Refactoring, improving software code, redesign, design tips, patterns, unit testing, refactoring research, and tools. Book News, Inc. A guide to refactoring, the process of changing a software system so that it does not alter the external behavior of the code yet improves its internal structure, for professional programmers. Early chapters cover general principles, rationales, examples, and testing. The heart of the book is a catalog of refactorings, organized in chapters on composing methods, moving features between objects, organizing data, simplifying conditional expressions, and dealing with generalizations

2010-03-05

The c programming language 2nd

Preface The computing world has undergone a revolution since the publication of The C Programming Language in 1978. Big computers are much bigger, and personal computers have capabilities that rival mainframes of a decade ago. During this time, C has changed too, although only modestly, and it has spread far beyond its origins as the language of the UNIX operating system. The growing popularity of C, the changes in the language over the years, and the creation of compilers by groups not involved in its design, combined to demonstrate a need for a more precise and more contemporary definition of the language than the first edition of this book provided. In 1983, the American National Standards Institute (ANSI) established a committee whose goal was to produce ``an unambiguous and machine-independent definition of the language C'', while still retaining its spirit. The result is the ANSI standard for C. The standard formalizes constructions that were hinted but not described in the first edition, particularly structure assignment and enumerations. It provides a new form of function declaration that permits cross-checking of definition with use. It specifies a standard library, with an extensive set of functions for performing input and output, memory management, string manipulation, and similar tasks. It makes precise the behavior of features that were not spelled out in the original definition, and at the same time states explicitly which aspects of the language remain machine-dependent. This Second Edition of The C Programming Language describes C as defined by the ANSI standard. Although we have noted the places where the language has evolved, we have chosen to write exclusively in the new form. For the most part, this makes no significant difference; the most visible change is the new form of function declaration and definition. Modern compilers already support most features of the standard. We have tried to retain the brevity of the first edition. C is not a big language, and it is not well served by a big book. We have improved the exposition of critical features, such as pointers, that are central to C programming. We have refined the original examples, and have added new examples in several chapters. For instance, the treatment of complicated declarations is augmented by programs that convert declarations into words and vice versa. As before, all examples have been tested directly from the text, which is in machine-readable form. Appendix A, the reference manual, is not the standard, but our attempt to convey the essentials of the standard in a smaller space. It is meant for easy comprehension by programmers, but not as a definition for compiler writers -- that role properly belongs to the standard itself. Appendix B is a summary of the facilities of the

2010-03-05

object-oriented programming with ANSI c

Object-oriented programming is the current cure-all — although it has been around for much more then ten years. At the core, there is little more to it then finally applying the good programming principles which we have been taught for more then twenty years. C++ (Eiffel, Oberon-2, Smalltalk ... take your pick) is the New Language because it is object-oriented — although you need not use it that way if you do not want to (or know how to), and it turns out that you can do just as well with plain ANSI-C. Only object-orientation permits code reuse between pro- jects — although the idea of subroutines is as old as computers and good program- mers always carried their toolkits and libraries with them. This book is not going to praise object-oriented programming or condemn the Old Way. We are simply going to use ANSI-C to discover how object-oriented pro- gramming is done, what its techniques are, why they help us solve bigger prob- lems, and how we harness generality and program to catch mistakes earlier. Along the way we encounter all the jargon — classes, inheritance, instances, linkage, methods, objects, polymorphisms, and more — but we take it out of the realm of magic and see how it translates into the things we have known and done all along. I had fun discovering that ANSI-C is a full-scale object-oriented language. To share this fun you need to be reasonably fluent in ANSI-C to begin with — feeling comfortable with structures, pointers, prototypes, and function pointers is a must. Working through the book you will encounter all the newspeak — according to Orwell and Webster a language ‘‘designed to diminish the range of thought’’ — and I will try to demonstrate how it merely combines all the good programming princi- ples that you always wanted to employ into a coherent approach. As a result, you may well become a more proficient ANSI-C programmer. The first six chapters develop the foundations of object-oriented programming with ANSI-C. We start with a careful information hiding technique for abstract data types, add generic functions based on dynamic linkage and inherit code by judicious lengthening of structures. Finally, we put it all together in a class hierarchy that makes code much easier to maintain. Programming takes discipline. Good programming takes a lot of discipline, a large number of principles, and standard, defensive ways of doing things right. Pro- grammers use tools. Good programmers make tools to dispose of routine tasks once and for all. Object-oriented programming with ANSI-C requires a fair amount of immutable code — names may change but not the structures. Therefore, in chapter seven we build a small preprocessor to create the boilerplate required. It looks like yet another new object-oriented dialect language (yanoodl perhaps?) but it should not be viewed as such — it gets the dull parts out of the way and lets us concentrate on the creative aspects of problem solving with better techniques. ooc

2010-03-05

expert c programming

Introduction C code. C code run. Run code run...please! —Barbara Ling All C programs do the same thing: look at a character and do nothing with it. —Peter Weinberger Have you ever noticed that there are plenty of C books with suggestive names like C Traps and Pitfalls, or The C Puzzle Book, or Obfuscated C and Other Mysteries, but other programming languages don't have books like that? There's a very good reason for this! C programming is a craft that takes years to perfect. A reasonably sharp person can learn the basics of C quite quickly. But it takes much longer to master the nuances of the language and to write enough programs, and enough different programs, to become an expert. In natural language terms, this is the difference between being able to order a cup of coffee in Paris, and (on the Metro) being able to tell a native Parisienne where to get off. This book is an advanced text on the ANSI C programming language. It is intended for people who are already writing C programs, and who want to quickly pick up some of the insights and techniques of experts. Expert programmers build up a tool kit of techniques over the years; a grab-bag of idioms, code fragments, and deft skills. These are acquired slowly over time, learned from looking over the shoulders of more experienced colleagues, either directly or while maintaining code written by others. Other lessons in C are self-taught. Almost every beginning C programmer independently rediscovers the mistake of writing:

2010-03-05

《数学之美》--程序员的数学.chm

《数学之美》--程序员的数学.chm《数学之美》--程序员的数学.chm《数学之美》--程序员的数学.chm《数学之美》--程序员的数学.chm《数学之美》--程序员的数学.chm

2010-03-04

lucene in action

Contents Preface Chapter 1 Meet Lucene Chapter 2 Indexing Chapter 3 Adding search to your application Chapter 4 Analysis Chapter 5 Advanced search techniques Chapter 6 Extending search Chapter 7 Parsing common document formats Chapter 8 Tools and extensions Chapter 9 Lucene ports Chapter 10 Administration and performance tuning Chapter 11 Case studies Appendix A Installing Lucene Appendix B Lucene index format Appendix C Resources Appendix D Using the benchmark (contrib) framework

2010-03-04

cloud computer

e were fortunate enough to be able to talk with a lot of very talented people while preparing this book for you. We spoke not only to people who implemented their own cloud solutions, but also those who help develop cloud solutions, as well as officers of several major cloud solution providers. First, we want to thank Darren Boeck of McNeilus Steel. He told us how he was able to build a virtualized environment for the clients on his network, allowing us to summarize his experiences for you. We also had the pleasure of speaking again with John Engates, CTO of Rackspace Hosting. He talked with us about Rackspace’s cloud computing services and explained their vision of how they see cloud computing as it exists today and how it will continue to evolve. Steve Fisher, senior vice president of AppExchange at Salesforce.com, was a wonderful resource, talking to us not only about what Salesforce.com brings to the cloud party, but also how businesses are using it and how he sees it evolving. Ryan Collier, member of Accenture’s Citrix XenServer Capability Group, enlightened us about the merits of the Citrix XenServer, as well as how he sees the cloud developing. Christopher Crowhurst, Vice President of Architecture & BSI at Thomson Reuters, shared his thoughts on cloud computing. He also shared a case study outlining a very forward-thinking implementation of a cloud-based service at Thompson Reuters that was successfully completed back when the words “Cloud Computing” were rarely uttered. Charles Babcock, our Technical Editor, helped us keep the facts straight and the overall content aligned with your expectations. We appreciate every edit and suggestion and know that it is a better book because of his input. We also acknowledge the patience and hard work of the people at McGraw-Hill, notably those involved in the process of bringing this book to fruition. Thanks to Wendy Rinaldi, Sponsoring Editor and Editorial Director; Patty Mon, Editorial Supervisor; Jean Bodeaux, Senior Production Supervisor; Vipra Fauzdar, Production Project Manager; Joya Anthony, Acquisitions Coordinator; and Margaret Berson, Copy Editor. You can also flip back a few pages to see the rest of the folks who worked their magic throughout the process of creating this book for you. We acknowledge all of them and appreciate their efforts.

2010-01-27

Mining the Web

Mining the Web Mining the Web Mining the Web Mining the Web

2009-03-03

Effective.STL.pdf

这是一本关于如果有效使用STL的书,感觉还可以。

2008-10-21

linux shell

about linux shell and unix shell

2008-09-26

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除