Thursday, December 8, 2011

Working with NoSQL Databases

How to get started with NoSQL?

Since 2009 NoSQL databases becomes more and more popular. But why?

  • No usage of SQL, that means
    • Less complexity
    • Better portability
    • Boundlessness
    • User-friendliness
  • Most databases are Open-Source
  • Performance
  • Scalability

Famous companies like Twitter, Facebook and Amazon are using NoSQL databases.
What sorts of NoSQL databases are used today?

  • Key-Value stores
    • Easy to implement
    • Only key-value-pairs can be stored
    • Difficult to build complex data structures
  • Column stores
    • Columns don't have to be defined in advance.
    • A row can have different numbers of cells
  • Document stores
    • Like key-value stores, but allows nested values
  • Graph databases
    • Objects and relationships are modelled and persisted as nodes and edges of a graph

What NoSQL databases are present today?

Wednesday, December 7, 2011

Html32TextWriter C#

Writes a series of HTML 3.2–specific characters and text to the output stream for an ASP.NET server control. The Html32TextWriter class provides formatting capabilities that ASP.NET server controls use when rendering HTML 3.2 content to clients.

using System.IO;
using System.Web.UI;
namespace Examples.AspNet
{
public class CustomHtml32TextWriter : Html32TextWriter
{
// Create a constructor for the class
// that takes a TextWriter as a parameter.
public CustomHtml32TextWriter(TextWriter writer)
: this(writer, DefaultTabString)
{ }
// Create a constructor for the class that takes
// a TextWriter and a string as parameters.
public CustomHtml32TextWriter(TextWriter writer, String tabString)
: base(writer, tabString)
{
}

Control.ClientID Property for asp.net control

Gets the control ID for HTML markup that is generated by ASP.NET


<asp:Label ID="SelectedSport" runat="server" ClientIDMode="Static">

ASP.NET provides multiple algorithms for how to generate the ClientID property value. You select which algorithm to use for a control by setting its ClientIDModeproperty. The algorithms are identified by the ClientIDMode enumeration values that are listed in the following table.

ASP.Net Control Properties


Name
Description
Gets the browser-specific adapter for the control.
Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control.
Infrastructure. Gets the control that contains this control's data binding.

Gets a value that indicates whether the server control's child controls have been created.

Nutch Error: no agents listed in ‘http.agent.name’ property

Add the value to the file “nutch-site.xml”, “nutch-default.xml” under the folder: runtime/local, not the files under the root folder.

Tuesday, December 6, 2011

Run Nutch In Eclipse

Source  : http://wiki.apache.org/nutch/RunNutchInEclipse

Before you start


Setting up Nutch to run into Eclipse can be tricky, and most of the time you are much faster if you edit Nutch in Eclipse but run the scripts from the command line. However, it's very useful to be able to debug Nutch in Eclipse and is also extremely useful when applying and testing patches as it enables you to see them working in a larger context. This being said, you will still benefit greatly by looking at the hadoop.log output.
This tutorial covers a fully internal Eclipse/Nutch set up, using only Eclipse tools and associated plugins.

Prerequsites


  • Grab the newest version of Eclipse availble here.
  • All of the following should be available from the Eclipse Marketplace. However if not, you can download them throughout Eclipse as follows.
  • Once you've set up Eclipse, download Subclipse as per here. N.B. If you experience an error with the 1.8.x release, try 1.6.x. This tends to solve compatibility problems.
  • Grab IvyDE plugin for Eclipse as here.
  • Grab m2e plugin for Eclipse here

NutchTutorial

Source : http://wiki.apache.org/nutch/NutchTutorial

Introduction

Apache Nutch is an open source Web crawler written in Java. By using it, we can find Web page hyperlinks in an automated manner, reduce lots of maintenance work, for example checking broken links, and create a copy of all the visited pages for searching over. That’s where Apache Solr comes in. Solr is an open source full text search framework, with Solr we can search the visited pages from Nutch. Luckily, integration between Nutch and Solr is pretty straightforward as explained below.
Apache Nutch release 1.3 has Solr integration embedded, greatly simplifying Nutch-Solr integration. It also removes the legacy dependence upon both Apache Tomcat for running the old Nutch Web Application and upon Apache Lucene for indexing. Just download a 1.3 binary release from here.

Table of Contents

Timer jobs in sharepoint


Manage timer jobs

You can check the status of a timer job and edit the timer job definition.
For the general administration of all jobs, the SharePoint Central Administration Web site has a Timer Job Status page and a Job Definitions page. You can find these pages in Central Administration, on the Monitoring page, in theTimer Jobs section.
From the View menu, you can filter the timer jobs at the following levels:
  • All   Displays all timer jobs for the farm.
  • Service   Displays all the timer jobs for a particular service. If you select this command, use the Service menu to select the service by which you want to filter the listed jobs.
  • Web Application   Displays all the timer jobs for a Web application. If you select this option, use the Web Application menu to select the Web application by which you want to filter the listed jobs.
  • Server   Displays all the timer jobs for the specified server. If you select this command, use the Server menu to select the server by which you want to filter the listed jobs.
  • Job Definition   Displays all the timer jobs for the specified job definition. On the Timer Job Status page, use the Job Definition menu to select the job definition by which you want to filter the listed jobs.
  • Failed Jobs   Displays all the timer jobs on the farm that have failed to finish.
The SharePoint 2010 Timer service (SPTimerv4) is based on the Gregorian calendar for scheduling. For every job that you schedule, you specify when the timer job will run, specified in a 24-hour time format. You must specify the time in local time instead of as an offset from Coordinated Universal Time (UTC). The time is stored in that format. Daily, weekly, and monthly schedules also include a window of execution. The timer service will select a random time within this interval to start executing the job on each applicable server. This feature is appropriate for high-load jobs that run on multiple servers on the farm. Running this kind of job on all the servers at the same time might place an unreasonable load on the farm. Timer job schedules can be specified by using Windows PowerShell. For more information, see Timer jobs cmdlets (SharePoint Server 2010).

Default timer jobs

Debugging and Logging Capabilities in SharePoint 2010


Microsoft SharePoint 2010 is a very extensible product that developers can customize to suit various business needs. Because SharePoint is based on Microsoft ASP.NET, it provides developers with the same debugging and logging options that are available to traditional ASP.NET websites. In addition to what ASP.NET provides, SharePoint 2010 introduces additional options to assist developers in monitoring and troubleshooting applications in the areas of debugging and logging.
This article touches on various debugging and logging points and techniques that developers can use in their custom SharePoint 2010 applications.

What's New in SharePoint 2010 for Logging and Debugging

The best applications contain a good measure of logging to assist developers in tracking down errors when things do not go as they were designed or when unexpected things occur. Microsoft Office SharePoint Server 2007 offered developers all the tools that were available in ASP.NET, such as the debug and trace log. Developers could also write to the SharePoint log, known as the Unified Logging Service (ULS), but it required some extra work to write directly to the log files.
Microsoft added more logging and debugging capabilities to SharePoint 2010 to help developers include additional monitoring and troubleshooting to their custom applications. This article addresses the following new areas in SharePoint 2010:
  • Correlation tokens
  • Logging database
  • Custom error pages
  • Developer Dashboard

Adding a Custom Action to a SharePoint 2010 Display Form


It is common when customizing SharePoint 2010 to want to extend the user interface. Fortunately, this is easy to do by using the ribbon menu. You can add new functionality to the SharePoint 2010 ribbon as custom actions. Custom actions enable you to expand or extend the standard behavior of SharePoint 2010 core components such as using a custom action to email the details of a list item.
This topic describes two approaches for adding a custom action to a display form of SharePoint 2010 list items. The custom action is added to the ribbon as a button.
You have two options to add custom actions to a display form:
  • Adding a custom action through SharePoint 2010 features. SharePoint features enable you to easily deploy customizations. This is the preferred method when you need to package the customizations and deploy them to different servers.
  • Adding a custom action by using Microsoft SharePoint Designer 2010. SharePoint Designer helps create rapid, no-code customizations on the local server.

Custom Action Elements

 

Featured Posts

Learn how to install Apache, MySQL and PHP on Ubuntu. Complete LAMP stack installation guide with one-shot commands, PHP testing and php-opcache troubleshooting

How to Install LAMP Stack on Ubuntu | Complete Guide UBUNTU • LINUX • SERVER • PHP ...