Ray's playground

 

03 2010 档案

Generic Views(The Definitive Guild to Django)
摘要:Django ships with generic views to do the following:  • Perform common “simple” tasks: redirect to a different page or render a giventemplate.  • Display list and detail pages ... 阅读全文

posted @ 2010-03-31 22:01 Ray Z 阅读(214) 评论(0) 推荐(0)

Being a Web App: attributes and listeners(Head First Servlets and JSP)
摘要:MyServletContextListenerCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1packagecom.example;23importjavax.servlet.*;;45publicclassMyServletContextList... 阅读全文

posted @ 2010-03-31 21:43 Ray Z 阅读(157) 评论(0) 推荐(1)

Bindings(Essential Windows Communication Foundation)
摘要:Here are some guiding principles for working channels and bindingswithin WCF:  • The netTcpBinding binding is used for cross-machine communicationbetween .NET applications.  • The ne... 阅读全文

posted @ 2010-03-31 13:27 Ray Z 阅读(351) 评论(0) 推荐(0)

Advanced Models(The Definitive Guild to Django)
摘要:In short, a model’s manager is an object through which Django models perform databasequeries. Each Django model has at least one manager, and you can create custom managers tocustomize database ... 阅读全文

posted @ 2010-03-31 09:36 Ray Z 阅读(232) 评论(0) 推荐(0)

Advanced Templates(The Definitive Guild to Django)
摘要:Practice1: Write a custom tagPractice2: Write a custom filter 阅读全文

posted @ 2010-03-30 21:21 Ray Z 阅读(193) 评论(0) 推荐(0)

Channels(Essential Windows Communication Foundation)
摘要:WCF supports three distinct message-exchange patterns: one-way,duplex, and request-reply. To facilitate each of these patterns, WCF providesten different interfaces called channel shapes. The five sha... 阅读全文

posted @ 2010-03-30 15:10 Ray Z 阅读(244) 评论(0) 推荐(0)

Contracts(Essential Windows Communication Foundation)
摘要:WCF heavily leverages SOAP for contract definitions. Specifically, ituses WDSL for describing service endpoints and XSD for describing data.The service operations defined in WSDL are used to route inc... 阅读全文

posted @ 2010-03-30 13:18 Ray Z 阅读(248) 评论(0) 推荐(0)

Advanced Views and URLconfs(The Definitive Guild to Django)
摘要:In Python regular expressions, the syntax for named regular expression groups is(?P<name>pattern), where name is the name of the group and pattern is some pattern to match.  If you put a single ... 阅读全文

posted @ 2010-03-30 10:29 Ray Z 阅读(184) 评论(0) 推荐(0)

Being a Servlet: request AND response(Head First Servlets and JSP)
摘要:Each request runs in a separate thread!  When you use GET, the parameter data shows up in the browser’s input bar, right after actual URL (and separated with a “?”).Still another iss... 阅读全文

posted @ 2010-03-29 23:56 Ray Z 阅读(296) 评论(0) 推荐(0)

Forms(The Definitive Guild to Django)
摘要:Django comes with a form library, called django.forms, that handles many of the issues we’vebeen exploring in this chapter—from HTML form display to validation. Let’s dive in andrewo... 阅读全文

posted @ 2010-03-29 21:38 Ray Z 阅读(300) 评论(0) 推荐(1)

Basics(Essential Windows Communication Foundation)
摘要:For the client to communicate meaningful information to the service, itneeds to know the ABCs: the address, the binding, and the contract.  Services can be hosted in any operating system process, from... 阅读全文

posted @ 2010-03-29 16:51 Ray Z 阅读(242) 评论(0) 推荐(0)

Mini MVC Tutorial: hands-on MVC(Head First Servlets and JSP)
摘要:form.htmlCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1<html><body>2<h1align="center">BeerSelectionPage</h1>3<formmethod... 阅读全文

posted @ 2010-03-28 16:17 Ray Z 阅读(286) 评论(0) 推荐(0)

The Django Admin Site(The Definitive Guild to Django)
摘要:admin.pyCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1fromdjango.contribimportadmin2frommysite.books.modelsimportPublisher,Author,Book34classAuthor... 阅读全文

posted @ 2010-03-28 13:45 Ray Z 阅读(241) 评论(0) 推荐(0)

Models(The Definitive Guild to Django)
摘要:What’s the difference between a project and an app?The difference is that of configuration vs. code:  • A project is an instance of a certain set of Django apps, plus the configuration for... 阅读全文

posted @ 2010-03-27 22:44 Ray Z 阅读(231) 评论(0) 推荐(0)

Web App Architecture: high-level overview(Head First Servlets and JSP)
摘要:When you deploy your servlet into your web Container, you’ll create a fairly simple XML document called the Deployment Descriptor (DD) to tell the Container how to run yourservlets and JSPs. Alt... 阅读全文

posted @ 2010-03-27 10:58 Ray Z 阅读(190) 评论(0) 推荐(0)

Templates(The Definitive Guild to Django)
摘要:Template:[代码]View:[代码]Settings:settings.pyCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1TEMPLATE_DIRS=(2'/django/mysite/templates',3#Putstringshere... 阅读全文

posted @ 2010-03-26 12:50 Ray Z 阅读(150) 评论(0) 推荐(0)

Why use Servlets & JSPs: an introduction(Head First Servlets and JSP)
摘要:􀂃 A GET request appends form data to the end of the URL.  􀂃 A POST request includes form data in the body of the request.  􀂃 A MIME type tells the browser what kind of data the browser is about to ... 阅读全文

posted @ 2010-03-25 22:31 Ray Z 阅读(154) 评论(0) 推荐(0)

Views and URLconfs(The Definitive Guild to Django)
摘要:views.pyCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1fromdjango.httpimportHttpResponse,Http4042importdatetime34defhello(request):5returnHttpRespon... 阅读全文

posted @ 2010-03-25 20:31 Ray Z 阅读(250) 评论(0) 推荐(0)

Getting Started(The Definitive Guild to Django)
摘要:Django only supports python 2.4 to python 2.6.  If you run "python setup.py install" with python 3.0+ installed, you will get error like "u'SVN' syntax error".  After running "django-admin.py startpro... 阅读全文

posted @ 2010-03-25 17:48 Ray Z 阅读(258) 评论(0) 推荐(0)

Introduction to Django(The Definitive Guild to Django)
摘要:Django is a web framework.Why I want to learn Django?  Because I want to practice my python skills. 阅读全文

posted @ 2010-03-25 12:57 Ray Z 阅读(274) 评论(0) 推荐(0)

COM Type Information(Chapter 4 of COM and .NET Interoperability)
摘要:When a .NET type attempts to access alegacy COM type, an intermediate object (termed a Runtime Callable Wrapper, or simplyRCW) is responsible for translating between COM types and .NET types. For exam... 阅读全文

posted @ 2010-03-24 20:36 Ray Z 阅读(203) 评论(0) 推荐(0)

A Primer on COM Programming Frameworks(Chapter 3 of COM and .NET Interoperability)
摘要:Mainly talk about ATL. 阅读全文

posted @ 2010-03-24 20:35 Ray Z 阅读(134) 评论(0) 推荐(0)

The Anatomy of a COM Server(Chapter 2 of COM and .NET Interoperability) part2
摘要:The final topic of this chapter is to refresh the role of IDispatch. As you have just seen,C++ and Visual Basic 6.0 are able to exercise early binding when making use of COMtypes. Early binding descri... 阅读全文

posted @ 2010-03-23 21:45 Ray Z 阅读(200) 评论(0) 推荐(0)

Arrays(Thinking in Java)
摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1importjava.util.*;23classBerylliumSphere4{5privatestaticlongcounter;6privatefinallongid=counter++... 阅读全文

posted @ 2010-03-17 22:06 Ray Z 阅读(200) 评论(0) 推荐(0)

The Anatomy of a COM Server(Chapter 2 of COM and .NET Interoperability) part1
摘要:InterfaceCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1//Interfaces.cpp:Definestheentrypointfortheconsoleapplication.23#include"stdafx.h"4#include&... 阅读全文

posted @ 2010-03-16 23:04 Ray Z 阅读(221) 评论(0) 推荐(0)

Generics(Thinking in Java)
摘要:Generic MethodsCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1publicclassGenericMethods{2public<T>voidf(Tx)3{4System.out.println(x.getClass().... 阅读全文

posted @ 2010-03-16 21:37 Ray Z 阅读(189) 评论(0) 推荐(0)

Memory Addressing(Understanding the Linux Kernel)
摘要:Linux prefers paging to segmentation for the following reasons:Memory management is simpler when all processes use the same segment register values that is, when they share the same set of linear addr... 阅读全文

posted @ 2010-03-15 12:52 Ray Z 阅读(203) 评论(0) 推荐(0)

Type Information(Thinking in Java)
摘要:ShapesCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1importjava.util.*;23abstractclassShape4{5voiddraw()6{7System.out.println(this+".draw()");8}9abs... 阅读全文

posted @ 2010-03-14 17:39 Ray Z 阅读(340) 评论(0) 推荐(0)

Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part3
摘要:C++Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include"MyCustomCallbackDLL.h"23BOOLAPIENTRYDllMain(HANDLEhModule,4DWORDul_reason_for_call,5LPVOI... 阅读全文

posted @ 2010-03-14 13:37 Ray Z 阅读(239) 评论(0) 推荐(0)

Strings(Thinking in Java)
摘要:Since String objects are immutable, you can alias to a particular String as many times as you want. Because a String is read-only, there’s no possibility that one reference will change something... 阅读全文

posted @ 2010-03-11 21:23 Ray Z 阅读(146) 评论(0) 推荐(0)

Error Handling with Exceptions(Thinking in Java)
摘要:When you override a method, you can throw only the exceptions that have been specified in the base-class version of the method. This is a useful restriction, since it means that code that works with t... 阅读全文

posted @ 2010-03-10 21:07 Ray Z 阅读(246) 评论(0) 推荐(0)

Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part2
摘要:[代码]Implementation:[代码]Client Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include<windows.h>2#include<iostream>3#include"MyCustomDLL... 阅读全文

posted @ 2010-03-09 22:30 Ray Z 阅读(280) 评论(0) 推荐(0)

Understanding Platform Invocation Services(Chapter 1 of COM and .NET Interoperability) part1
摘要:A traditional C-style DLL is not constructed using the building blocks of COM and does not have the same internal structure as a .NET binary. Rather, unmanaged DLLs contain some set of global function... 阅读全文

posted @ 2010-03-08 22:08 Ray Z 阅读(206) 评论(0) 推荐(0)

导航