Thursday, December 2, 2010

Access Modifiers- C#

1. public - Access is not restricted.
2. internal - Access is limited to the current assembly.
3. private - Access is limited to the containing class.
4. protected - Access is limited to the containing class or types derived from the containing class.
5. protected internal - Access is limited to the current assembly or types derived from the containing class.

Access modifiers are not allowed on namespaces. Namespaces have no access restrictions. If no access modifier is specified in a member declaration, a default accessibility is used.

Members - "Default member accessibility" - "Allowed declared accessibility"
class private public, protected, internal, private, protected internal
interface public None
struct private public, internal, private
enum public None

the accessibility domain of a nested type cannot exceed that of the containing type.

Tuesday, March 9, 2010

Enterprise crawler

When we need to read data from storage.
  • crawleradmin --offline --getdata aa2: http://cmb1u123.cmb1.fast.no:30000/niran/sitemap/sitemap.xml
read data from meta storage.

crawlerdbtool -m viewraw -d data/store/aa2/data/6

ey (raw): 'http://cmb1u123.cmb1.fast.no:30000/niran/sitemap/c.html'

(0, 0, {1: 1268106394, 2: 0, 3: 'text/html', 4: 'ykA\xd1_\xaf;\xba@r\x94\xa2\xc8o\x8f~', 5: None, 6: ('aa2/data/6', 113539, 65539), 7: [('http://cmb1u123.cmb1.fast.no:30000/niran/sitemap/sitemap.xml', 1073741824)], 8: 'HTTP/1.1 200 OK\r\nDate: Tue, 09 Mar 2010 08:12:26 GMT\r\nServer: Apache/2.2.9 (Unix) PHP/5.2.6\r\nLast-Modified: Tue, 06 Oct 2009 14:11:21 GMT\r\nETag: "2bbf9-59780-47544cdfd5440"\r\nAccept-Ranges: bytes\r\nContent-Length: 366464\r\nConnection: close\r\nContent-Type: text/html', 9: 'deflate', 11: 'Tue, 06 Oct 2009 14:11:21 GMT', 12: '"2bbf9-59780-47544cdfd5440"', 13: 0, 14: None, 15: None, 16: (1, 1, 1), 17: 0, 18: [], 19: None, 20: 0, 21: None, 22: 0, 23: {'sm': {'priority': '0.8', 'lastmod': '2005-01-01', 'changefreq': 'monthly'}}}, 0)


Wednesday, November 18, 2009

Python Tutorial

http://www.tutorialspoint.com/python

Examples of High-Level languages

  • Java
  • C
  • Python
  • Scheme
  • Prolog
  • C++
  • C#
  • Java Script
  • Ruby
  • Lisp

Tuesday, August 18, 2009

ESP web service

http://localhost:16089/adminserver/webservices.jsp

Thursday, August 13, 2009

.NET framework 2.0 introduces a new boundary called the Application Domains

Each application running within its main process boundaries and its application domain boundaries. So, you can think of the application domain as an extra shell to isolate the application and making it more secure and robust.

The above is not the main advantage of application domains. The main advantage is the ability to run several applications domains in a single process or application. All of this is performed while maintaning the same level and quality of isolation that would exist in separate processes, without the need of making cross-process calls or switching between processes.

Advantages

You may ask, why should I create more than one application domain within my application?

The following advantages of application domains answer this question.

  • In terms of isolation, code running in one application domain can not access code or resources running in another application domain.
  • In terms of security, you can run more than one set of web controls in a single browser process. Each set of them is running in a separate application domain so each one can not access the data or resources of the other sets. You can control the permissions granted to a given piece of code by controlling the application domain inside which the code is running.

  • In terms of robustness, fault in code running in one application domain can not affect other applications although they all are running inside the same process. Individual application domain can be stopped without stopping the entire process, you can simply unload the code running in a single application domain.

So, from the above advantages, you can observe that by using application domains you can create rather robust .NET applications. It increases isolation, stability, and security of your application.