text:
package Paws::CognitoSync::BulkPublishResponse;
  use Moose;
  has IdentityPoolId => (is => 'ro', isa => 'Str');

  has _request_id => (is => 'ro', isa => 'Str');
1;

### main pod documentation begin ###

=head1 NAME

Paws::CognitoSync::BulkPublishResponse

=head1 ATTRIBUTES

=head2 IdentityPoolId => Str

A name-spaced GUID (for example,
us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.

=head2 _request_id => Str

=cut


text:
module.exports = {
  consumer_key:         'YOUR_KEY',
  consumer_secret:      'YOUR_KEY',
  access_token:         'YOUR_KEY',
  access_token_secret:  'YOUR_KEY'
}

redpajama_set_name: RedPajamaGithub


text:
Simple Todo App using Flux with ImmutableJS and React

#### Live Demo Here
[Immutable Todo](http://robert-w.github.io/immutable-flux-todo/)

#### Items Remaining
* Add History Panel for time travel functionality

### Getting Started

Install all dependencies with npm

`npm install`

Run `npm start` and go to [http://localhost:3000/](http://localhost:3000/)

You can also use `npm run prod` to generate a production bundle under a `dist` folder.

### Purpose

This was just a proof of concept and learning experience.  I wanted to test some new build tools but more importantly, learn how to use [ImmutableJS](https://facebook.github.io/immutable-js/) with [Flux](https://facebook.github.io/flux/) and [React](https://facebook.github.io/react/) while writing in ES6. Some of the other libraries and tools used in this project include the following (not counting some gulp modules like stylus, etc.):
* [Alt](http://alt.js.org/)
* [Webpack](https://webpack.github.io/)
* [Gulp](http://gulpjs.com/)
* [Browsersync](http://www.browsersync.io/)
* [Babel](https://babeljs.io/)


text:
#ifndef _DIRENT
#define _DIRENT

#include <sys/dir.h>

#define dirent direct

#endif /* _DIRENT */


text:
// ==========================================================================
//				Class Implementation : COXNetBrowseTree
// ==========================================================================

// Source file : OXNetBrowseTree.cpp

// Version: 9.3

// This software along with its related components, documentation and files ("The Libraries")
// is © 1994-2007 The Code Project (1612916 Ontario Limited) and use of The Libraries is
// governed by a software license agreement ("Agreement").  Copies of the Agreement are
// available at The Code Project (www.codeproject.com), as part of the package you downloaded
// to obtain this file, or directly from our office.  For a copy of the license governing
// this software, you may contact us at legalaffairs@codeproject.com, or by calling 416-849-8900.

// //////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "OXNetBrowseTree.h"
#include "OXMainRes.h"

#include "UTBStrOp.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

IMPLEMENT_DYNAMIC(COXNetBrowseTree, CTreeCtrl)

#define new DEBUG_NEW

// Images in the small image list for this network tree
#define NET_IMAGE_UNKNOWN				0
#define NET_IMAGE_UNKNWON_EXPANDED		1
#define NET_IMAGE_DOMAIN				2
#define NET_IMAGE_DOMAIN_EXPANDED		3
#define NET_IMAGE_SERVER				4
#define NET_IMAGE_SERVER_EXPANDED		5
#define NET_IMAGE_DISK_SHARE			6
#define NET_IMAGE_DISK_SHARE_EXPANDED	7
#define NET_IMAGE_PRINTER_SHARE			8
#define NET_IMAGE_PRINTER_SHARE_EXPANDED 9
#define NET_IMAGE_OTHER_SHARE			10
#define NET_IMAGE_OTHER_SHARE_EXPANDED	11
#define NET_IMAGE_FILE					12
#define NET_IMAGE_FILE_EXPANDED			13
#define NET_IMAGE_GROUP					14
#define NET_IMAGE_GROUP_EXPANDED		15
#define NET_IMAGE_NETWORK				16
#define NET_IMAGE_NETWORK_EXPANDED		17
#define NET_IMAGE_ROOT					18
#define NET_IMAGE_ROOT_EXPANDED			19
#define NET_IMAGE_SHARADMIN				20
#define NET_IMAGE_SHAREADMIN_EXPANDED	21
#define NET_IMAGE_DIRECTORY				22
#define NET_IMAGE_DIRECTORY_EXPANDED	23
#define NET_IMAGE_TREE					24
#define NET_IMAGE_TREE_EXPANDED			25

/////////////////////////////////////////////////////////////////////////////
// Definition of static members
static TCHAR szUnknownError[] = _T("*** Unknown Error ***");

static OSVERSIONINFO OSVersion;
struct _OX_WINDOWS_VERSION
{
	_OX_WINDOWS_VERSION()
	{
		OSVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
		VERIFY(::GetVersionEx(&OSVersion));
	}
};
static const _OX_WINDOWS_VERSION windowsVersion;

// Data members -------------------------------------------------------------
// protected:
// BOOL m_bInitialized;
// --- Whether the control has been properly initialized
//     This is done by posting the message WM_POST_INIT

// BOOL m_bShowCommentName;
// --- Whether the comment should be shown for each net resource

// BOOL m_bShowDisks;
// --- Whether disk resources should be shown

// BOOL m_bShowPrinters;
// ---- Whether printer resources should be shown

// int m_nResourceScope;
// ---- The scope of the resources that are show in the tree control

// int m_nMaxNumLevels;
// --- The last lvel in the tree that will be shown
//     Deeper levels are hidden for the user

// int m_nInitialExpandLevel;
// --- The number levels that should be initially expanded wqhen the control
//     becomes visisble for the first time

// BOOL m_bReport;
// --- Whether network errors should be shown in an message box to the user

// NETRESOURCE* m_pCurrentNetResource;
// --- The net resource associated with the last selected item

// CImageList m_netImages;
// --- The image list used by this control

// CMap<HTREEITEM, HTREEITEM, NETRESOURCE*, NETRESOURCE*> m_resourceMap;
// --- The mapping between the handle of the tree item and its associated net resource info

// private:

// Member functions ---------------------------------------------------------
// public:

BEGIN_MESSAGE_MAP(COXNetBrowseTree, CTreeCtrl)
	//{{AFX_MSG_MAP(COXNetBrowseTree)
	ON_WM_CREATE()
	ON_NOTIFY_REFLECT_EX(TVN_ITEMEXPANDING, OnItemexpanding)
	ON_NOTIFY_REFLECT_EX(TVN_SELCHANGED, OnSelchanged)
	ON_NOTIFY_REFLECT(TVN_GETDISPINFO, OnGetDispInfo)
	//}}AFX_MSG_MAP
	ON_MESSAGE(WM_POST_INIT, OnPostInit)
END_MESSAGE_MAP()

COXNetBrowseTree::COXNetBrowseTree()
:
m_bInitialized(FALSE),
m_bShowCommentName(TRUE),
m_bShowDisks(TRUE),
m_bShowPrinters(FALSE),
m_nResourceScope(RESOURCE_GLOBALNET),
m_nMaxNumLevels(100),
m_nInitialExpandLevel(0),
m_bReport(TRUE),
m_pCurrentNetResource(NULL),
m_netImages()
{
	ASSERT_VALID(this);
}

BOOL COXNetBrowseTree::IsInitialized() const
{
	return m_bInitialized;
}

BOOL COXNetBrowseTree::Initialize()
{
	// Create the small icon image list	for context list
	// ... The bitmap resource IDB_NET_IMAGELIST should contain the images
	// ... Must find the resource
	//     (Make sure OXNetBrowseTree.rc is included in your resource file)
	ASSERT(AfxFindResourceHandle(MAKEINTRESOURCE(IDB_OX_NET_IMAGELIST), RT_BITMAP) != NULL);
	VERIFY(m_netImages.Create(IDB_OX_NET_IMAGELIST,16,0,RGB(255,0,255)));
	// m_netImages.SetBkColor(GetSysColor(COLOR_WINDOW));
	m_netImages.SetBkColor(CLR_NONE);
	// ... Associate the image lists with the context list
	SetImageList(&m_netImages, TVSIL_NORMAL);

	// Build the tree contents for the first time
	BuildTreeContents();

	m_bInitialized = TRUE;
	return m_bInitialized;
}

BOOL COXNetBrowseTree::ShowCommentName(BOOL bShow)
{
	BOOL bPrevShow = m_bShowCommentName;
	m_bShowCommentName = bShow;
	return bPrevShow;
}

BOOL COXNetBrowseTree::ShowDisks(BOOL bShow)
{
	BOOL bPrevShow = m_bShowDisks;
	m_bShowDisks = bShow;
	return bPrevShow;
}

BOOL COXNetBrowseTree::ShowPrinters(BOOL bShow)
{
	BOOL bPrevShow = m_bShowPrinters;
	m_bShowPrinters = bShow;
	return bPrevShow;
}

int COXNetBrowseTree::SetResourceScope(int nScope)
{
	ASSERT(0 <= nScope);
	int nPrevScope = m_nResourceScope;
	m_nResourceScope = nScope;
	return nPrevScope;
}

int COXNetBrowseTree::SetMaxNumLevels(int nMaxNumLevels)
{
	ASSERT(0 <= nMaxNumLevels);
	int nPrevMaxNumLevels = m_nMaxNumLevels;
	m_nMaxNumLevels = nMaxNumLevels;
	return nPrevMaxNumLevels;
}

int COXNetBrowseTree::SetInitialExpandLevel(int nLevel)
{
	int nPrevLevel = m_nInitialExpandLevel;
	m_nInitialExpandLevel = nLevel;
	return nPrevLevel;
}

BOOL COXNetBrowseTree::ReportErrors(BOOL bReport)
{
	BOOL bPrevReport = bReport;
	m_bReport = bReport;
	return bPrevReport;
}

BOOL COXNetBrowseTree::BuildTreeContents()
{

	SetRedraw(FALSE);

	// If the tree till contains nodes, remove them all
	DeleteAllItems();

	// Cleanup data members
	Cleanup();

	// Create the root node
	if (0 < m_nMaxNumLevels)
		ExpandNode(NULL);

	// Expand all top level items
	HTREEITEM hTopItem = NULL;
	hTopItem = GetRootItem();
	while (hTopItem != NULL)
	{
		ExpandBranch(hTopItem, m_nInitialExpandLevel);
		hTopItem = GetNextSiblingItem(hTopItem);
	}

	// If at least one top level item is expandable, connect lines to
	// the root of the control otherwise do not
	BOOL bLinesAtRoot = FALSE;
	hTopItem = GetRootItem();
	while(!bLinesAtRoot && (hTopItem  != NULL))
	{
		bLinesAtRoot = ItemHasChildren(hTopItem);
		hTopItem = GetNextSiblingItem(hTopItem);
	}
	if (bLinesAtRoot)
		ModifyStyle(0, TVS_LINESATROOT /* add */);
	else
		ModifyStyle(TVS_LINESATROOT /* remove */, 0);

	SetRedraw(TRUE);

	return TRUE;
}

const NETRESOURCE* COXNetBrowseTree::GetCurrentNetResource() const
{
	return m_pCurrentNetResource;
}

const NETRESOURCE* COXNetBrowseTree::GetAssocNetResource(HTREEITEM hTreeItem) const
{
	return GetAssocNetResourceEx(hTreeItem);
}

void COXNetBrowseTree::ExpandBranch(HTREEITEM hParentItem, int nLevels)
{
	if (nLevels <= 0)
		return;

	ASSERT(hParentItem != NULL);

	// First expand the parent itself
	if (!Expand(hParentItem, TVE_EXPAND))
		// ... Expand failed (the network resource probably produced an error)
		return;

	// Then expand all its children
	HTREEITEM hChildItem = GetChildItem(hParentItem);
	while (hChildItem != NULL)
	{
		ExpandBranch(hChildItem, nLevels - 1);
		hChildItem = GetNextSiblingItem(hChildItem);
	}
}

int COXNetBrowseTree::GetItemLevel(HTREEITEM hTreeItem)
{
	int nLevel = -1;
	HTREEITEM hParentItem = hTreeItem;
	while (hParentItem != NULL)
	{
		hParentItem = GetParentItem(hParentItem);
		nLevel++;
	}
	return nLevel;
}

BOOL COXNetBrowseTree::Uninitialize()
{
	ASSERT(IsInitialized());

	// Destroy the the small icon image list
	VERIFY(m_netImages.DeleteImageList());

	m_bInitialized = FALSE;
	return TRUE;
}

#ifdef _DEBUG
void COXNetBrowseTree::AssertValid() const
{
	CTreeCtrl::AssertValid();
}

void COXNetBrowseTree::Dump(CDumpContext& dc) const
{
	CTreeCtrl::Dump(dc);
	dc << "\nm_bInitialized : " << m_bInitialized;
	dc << "\nm_bShowCommentName : " << m_bShowCommentName;
	dc << "\nm_bShowDisks : " << m_bShowDisks;
	dc << "\nm_bShowPrinters : " << m_bShowPrinters;
	dc << "\nm_nResourceScope : " << m_nResourceScope;
	dc << "\nm_nMaxNumLevels : " << m_nMaxNumLevels;
	dc << "\nm_nInitialExpandLevel : " << m_nInitialExpandLevel;
	dc << "\nm_bReport : " << m_bReport;
	dc << "\nm_pCurrentNetResource : " << m_pCurrentNetResource;
	dc << "\nm_netImages : " << &m_netImages;
	dc << "\n";
}
#endif //_DEBUG

COXNetBrowseTree::~COXNetBrowseTree()
{
	Cleanup();
}

// protected:
NETRESOURCE* COXNetBrowseTree::GetAssocNetResourceEx(HTREEITEM hTreeItem) const
// --- In  : hTreeItem : Node of which the associated net resource is requested
// --- Out :
// --- Returns : The net resource associated with the specified node
//				 Notice that this return value is not const
// --- Effect : Should only be called for valid tree items
{
	NETRESOURCE* pNetResource = NULL;
	if (!m_resourceMap.Lookup(hTreeItem, pNetResource))
		pNetResource = NULL;
#ifdef _DEBUG
	// ... No associated net resource found, may be a dangerous situation
	if (pNetResource == NULL)
	{
		TRACE1("COXNetBrowseTree::GetAssocNetResourceEx : No associated net resource found for tree item 0x%X, returning NULL pointer\n",
			hTreeItem);
		// ASSERT(FALSE);
	}
#endif
	return pNetResource;
}

BOOL COXNetBrowseTree::ExpandNode(HTREEITEM hTreeItem)
// --- In  : hTreeItem : Node to expand (NULL is top level)
// --- Out :
// --- Returns :
// --- Effect : Expands the specified node
{
	// If hTreeItem == NULL we have to have an empty tree
	ASSERT((hTreeItem != NULL) || (GetRootItem() == NULL));

	// Get the net resource of the parent item
	NETRESOURCE* pNetResources = NULL;
	if (hTreeItem != NULL)
	{
		pNetResources = GetAssocNetResourceEx(hTreeItem);
		ASSERT(pNetResources != NULL);
	}
	else
		pNetResources = NULL;

	if ((pNetResources != NULL) && ((pNetResources->dwUsage & RESOURCEUSAGE_CONTAINER) != RESOURCEUSAGE_CONTAINER))
		// Net resource exists, but is not a container and thus cannot be enumerated
		return FALSE;

	// Expand the node (may take a while)
	CWaitCursor wc;
	return CreateChildren(hTreeItem, pNetResources);
}

BOOL COXNetBrowseTree::CreateChildren(HTREEITEM hParentItem, NETRESOURCE* pParentNetResources)
// --- In  : hParentItem : Node of which the children nodes have to be created
//			 pParentNetResources : Net resource of this parent node
// --- Out :
// --- Returns :
// --- Effect : Computes the netresources of the children and creates the child nodes
{
	HANDLE hEnum = NULL;
	DWORD dwScope = pParentNetResources == NULL ? m_nResourceScope : pParentNetResources->dwScope;
	DWORD nResult = WNetOpenEnum(
		dwScope,				// scope of enumeration
		RESOURCETYPE_ANY,		// resource types to list
		0,						// resource usage to list
		pParentNetResources,	// pointer to resource structure
		&hEnum);				// pointer to enumeration handle buffer
	if (nResult != NO_ERROR)
	{
		TRACE2("COXNetBrowseTree::CreateChildren : WNetOpenEnum failed with error code %i == 0x%X\n",
			nResult, nResult);
		ReportNetError(nResult, pParentNetResources == NULL ? NULL : pParentNetResources->lpRemoteName);
		return FALSE;
	}

	DWORD nCurrentCount(0);
	DWORD nCurrentSkipCount(0);
	/* =============================================================================== */

	// The problem with the WNetEnumResoiurce fuction is that allthough you use
	// 0xFFFFFFFF as requested resource count (this means everything) the function
	// does NOT return ERROR_MORE_DATA if the buffer is too small.  It only returns
	// this value if the buffer supplied is too small even for one value, in this
	// case the space needed to hold the first resource found in the enumeration
	// Normally the size of this resource should be sizeof(NETRESOURCE) which is
	// 32 bytes but experience learned that this fluctuates between 32 bytes and
	// more than 1000 bytes.  This is probably due to the fact that WNetEnumResource
	// also needs allocated memory for the strings inside the NETRESOURCE struct.
	// This leads to the conclusion that we cannot calculate with certainty the size
	// of the buffer we need for a certain number of resources.  The most robust
	// solution to this problem is to request a absolute number of resources, make
	// an serious and realistic estimation of the maximum amount of memory needed
	// to hold ALL requested resources and then test to see whether you have retrieved
	// all requested resources.  If this is TRUE then again enumerate the resources
	// to determine whether there aren't any left and so on until the returned
	// number of resources is smaller than the requested number.  This last remark
	// explains why we need to be sure that the requested number of resources
	// allways fit in the amount of memory we allocated for the buffer.  We could
	// alocated a very big buffer but we prefer the loop.

	// Also note that we don't use NETRESOURCE* pRes = new NETRESOURCE[Count]
	// because the array allocated will be an array of structs of size sizeof(NETRESOURCE)
	// and that's just not correct to  hold one netresource. That's why we use
	// GlobalAlloc.

	// USERS WHO WANT TO TUNE THE PERFORMANCE OF THIS FUNCTION CAN PLAY WITH THE
	// NUMBER OF NETRESOURCES VIA THE nCOUNT VARIABLE AND WITH THE SIZE OF THE
	// ALLOCATED BUFFER VIA THE nBUFFERSIZE VARIABLE BUT KEEP THE REMARKS ABOVE
	// IN MIND.
	/* =============================================================================== */
	// Start with a reasonable buffer size
	DWORD nCount = 5;
	DWORD nBufferSize = 5000;
	LPNETRESOURCE rgpNetResources = (LPNETRESOURCE)GlobalAlloc(GPTR, nBufferSize);

	while (TRUE)
	{
		DWORD nTempCount = nCount;
		DWORD nTempBufferSize = nBufferSize;
		memset(rgpNetResources, 0, nBufferSize);
		DWORD nResult2 = WNetEnumResource(
			hEnum,					// handle to enumeration
			&nTempCount,				// pointer to entries to list
			(LPVOID)rgpNetResources, // pointer to buffer for results
			&nTempBufferSize);			// pointer to buffer size variable
		TRACE2("COXNetBrowseTree::WNetEnumResource : Number of Netresources (%i), in buffersize (0x%X)\n", nTempCount, nTempBufferSize);

		if ((nResult2 != NO_ERROR) && (nResult2 != ERROR_NO_MORE_ITEMS) &&
			(nResult2 != ERROR_MORE_DATA))
		{
			TRACE2("COXNetBrowseTree::CreateChildren : WNetEnumResource failed with error code %i == 0x%X\n",
				nResult2, nResult2);
			ReportNetError(nResult2, pParentNetResources == NULL ? NULL : pParentNetResources->lpRemoteName);
			// ... Cleanup the handle and memeory allocated
			VERIFY(WNetCloseEnum(hEnum) == NO_ERROR);
			GlobalFree((HGLOBAL)rgpNetResources);
			return FALSE;
		}

		if (nResult2 == ERROR_NO_MORE_ITEMS)
			nTempCount = 0;

		// Loop the requested number of NetResources and make tree item nodes
		{
			HTREEITEM hNewItem;
			NETRESOURCE* pSourceNetResource = NULL;
			NETRESOURCE* pCopyNetResource = NULL;
			DWORD nIndex;
			DWORD nSkipCount = 0;
			for (nIndex = 0; nIndex < nTempCount; nIndex++)
			{
				pSourceNetResource  = &rgpNetResources[nIndex];

				// Check special case for disks and printers
				if ((pSourceNetResource->dwType == RESOURCETYPE_DISK) && !m_bShowDisks)
				{
					// Skip this item
					nSkipCount++;
					continue;
				}
				if ((pSourceNetResource->dwType == RESOURCETYPE_PRINT) && !m_bShowPrinters)
				{
					// Skip this item
					nSkipCount++;
					continue;
				}

				// ... Create a new item
				hNewItem = InsertResourceItem(pSourceNetResource, hParentItem);
				if (hNewItem  == NULL)
				{
					TRACE0("COXNetBrowseTree::InsertResourceItem returned NULL\n");
					// Skip this item
					nSkipCount++;
					continue;
				}

				// Add a copy to the map
				// ... Should not yet be in map
#ifdef _DEBUG
				NETRESOURCE* pCheckNetResource = NULL;
				ASSERT(!m_resourceMap.Lookup(hNewItem, pCheckNetResource));
#endif // _DEBUG
				pCopyNetResource = new NETRESOURCE;
				// ... Copy the struct itself
				memcpy(pCopyNetResource, pSourceNetResource, sizeof(NETRESOURCE));
				// ... Make a copy of all the string members
				if (pSourceNetResource->lpLocalName != NULL)
				{
					size_t len = _tcslen(pSourceNetResource->lpLocalName) + 1;
					pCopyNetResource->lpLocalName = new TCHAR[len];
					UTBStr::tcscpy(pCopyNetResource->lpLocalName, len, pSourceNetResource->lpLocalName);
				}
				else
				{
					pCopyNetResource->lpLocalName = new TCHAR[1];
					*pCopyNetResource->lpLocalName = _T('\0');
				}

				if (pSourceNetResource->lpRemoteName != NULL)
				{
					size_t len = _tcslen(pSourceNetResource->lpRemoteName) + 1;
					pCopyNetResource->lpRemoteName = new TCHAR[len];
					UTBStr::tcscpy(pCopyNetResource->lpRemoteName, len, pSourceNetResource->lpRemoteName);
				}
				else
				{
					pCopyNetResource->lpRemoteName = new TCHAR[1];
					*pCopyNetResource->lpRemoteName = _T('\0');
				}

				if (pSourceNetResource->lpComment != NULL)
				{
					size_t len = _tcslen(pSourceNetResource->lpComment) + 1;
					pCopyNetResource->lpComment = new TCHAR[len];
					UTBStr::tcscpy(pCopyNetResource->lpComment, len, pSourceNetResource->lpComment);
				}
				else
				{
					pCopyNetResource->lpComment = new TCHAR[1];
					*pCopyNetResource->lpComment = _T('\0');
				}

				if (pSourceNetResource->lpProvider != NULL)
				{
					size_t len = _tcslen(pSourceNetResource->lpProvider) + 1;
					pCopyNetResource->lpProvider = new TCHAR[len];
					UTBStr::tcscpy(pCopyNetResource->lpProvider, len, pSourceNetResource->lpProvider);
				}
				else
				{
					pCopyNetResource->lpProvider = new TCHAR[1];
					*pCopyNetResource->lpProvider = _T('\0');
				}

				// ... Add to map
				m_resourceMap.SetAt(hNewItem, pCopyNetResource);
			}

			// we need to keep track of the real number of nodes because we
			// need it to set the correct treeitem number for the parent node
			nCurrentCount += nTempCount;
			nCurrentSkipCount += nSkipCount;

			if (hParentItem != NULL)
			{
				// Mark the parent node as expanded at least once
				VERIFY(SetItemState(hParentItem, TVIS_EXPANDEDONCE, TVIS_EXPANDEDONCE));

				// Set the number of child items to the correct value
				TV_ITEM item;
				item.hItem = hParentItem;
				item.mask = TVIF_CHILDREN;
				ASSERT(nSkipCount <= nTempCount);
				item.cChildren = nCurrentCount - nCurrentSkipCount;
				VERIFY(SetItem(&item));
			}
		}

		if (nResult2 == ERROR_MORE_DATA  || nTempCount == nCount)
			// Possibly there is more data to retrieve
		{
			nTempCount = nCount;
			continue;
		}
		else
			// There was no error and there isn't anymore data to retrieve
			break;
	}

	// Cleanup the handle and allocated memory
	VERIFY(WNetCloseEnum(hEnum) == NO_ERROR);
	GlobalFree((HGLOBAL)rgpNetResources);
	return TRUE;
}

HTREEITEM COXNetBrowseTree::InsertResourceItem(const NETRESOURCE* pNetResources, HTREEITEM hParentItem)
// --- In  : pNetResources : The net resource
//			 hParentItem : The perant node
// --- Out :
// --- Returns : The handle of the new node
// --- Effect : Creates a new node as child of the specified parent
//				The net resource of the child is provided
{
	HTREEITEM hNewItem = NULL;
	CString sLabel;

	// Start with remote net name
	sLabel = pNetResources->lpRemoteName;
	// ... Remove leading back slashes
	while ((0 < sLabel.GetLength()) && (sLabel[0] == _T('\\')))
		sLabel = sLabel.Mid(1);
	// ... Remove everything in front of (and including) the last back slash
	int nBackSlashPos = sLabel.ReverseFind(_T('\\'));
	if (0 <= nBackSlashPos)
		sLabel = sLabel.Mid(nBackSlashPos + 1);

	// Add the comment name if necessary
	if (m_bShowCommentName)
	{
		CString sComment = pNetResources->lpComment;
		if (!sComment.IsEmpty())
			sLabel += _T(" (") + sComment + _T(")");
	}

	// Check whether the node can be further expanded
	// ... It must be a container to be expandable
	BOOL bExpandable = ((pNetResources->dwUsage & RESOURCEUSAGE_CONTAINER) == RESOURCEUSAGE_CONTAINER);
	// ... The maximum level should not be exceeded
	// ... We substract 3 because :
	//	   The level of the parent item is one less than the item that will be added here
	//	   The level number of the last item is one less than the totel number of levels
	//	   bExpandable means thet this item has further children
	bExpandable = bExpandable && (GetItemLevel(hParentItem) <= m_nMaxNumLevels - 3);

	// Add the new item to the tree control
	TV_INSERTSTRUCT insertStruct;
	memset(&insertStruct, 0, sizeof(insertStruct));

	insertStruct.hParent = hParentItem;
	insertStruct.hInsertAfter = TVI_SORT;
	insertStruct.item.mask = TVIF_CHILDREN | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
	insertStruct.item.iImage = I_IMAGECALLBACK;
	insertStruct.item.iSelectedImage = I_IMAGECALLBACK;
	insertStruct.item.pszText = sLabel.GetBuffer(0);
	// ... If this item is expandable set the children count to non-zero
	//     so that + button is shown in front of item
	//     This will be set to the correct value upon expanding
	insertStruct.item.cChildren = bExpandable ? 1 : 0;
	// ... Not yet expanded
	ASSERT((insertStruct.item.state & TVIS_EXPANDEDONCE) == 0);
	BOOL bPreInsert = PreInsertResourceItem(pNetResources, &insertStruct);
	if (bPreInsert)
		hNewItem = InsertItem(&insertStruct);
	sLabel.ReleaseBuffer();
	if (bPreInsert)
		PostInsertResourceItem(pNetResources, &insertStruct, hNewItem);

	return hNewItem;
}

void COXNetBrowseTree::Cleanup()
// --- In  :
// --- Out :
// --- Returns :
// --- Effect : Clean up the internal structures
{
	// Clean up the association map between tree item handles and net resource infos
	POSITION pos;
	HTREEITEM hTreeItem;
	NETRESOURCE* pNetResource;
	pos = m_resourceMap.GetStartPosition();
	while (pos != NULL)
	{
		m_resourceMap.GetNextAssoc(pos, hTreeItem, pNetResource);
		// ... First delete the strings
		ASSERT(pNetResource->lpLocalName == NULL || AfxIsValidString(pNetResource->lpLocalName));
		ASSERT(pNetResource->lpRemoteName == NULL || AfxIsValidString(pNetResource->lpRemoteName));
		ASSERT(pNetResource->lpComment == NULL || AfxIsValidString(pNetResource->lpComment));
		ASSERT(pNetResource->lpProvider == NULL || AfxIsValidString(pNetResource->lpProvider));
		delete[] pNetResource->lpLocalName;
		delete[] pNetResource->lpRemoteName;
		delete[] pNetResource->lpComment;
		delete[] pNetResource->lpProvider;
		ASSERT(AfxIsValidAddress(pNetResource, sizeof(NETRESOURCE)));
		delete pNetResource;
	}
	m_resourceMap.RemoveAll();
}

void COXNetBrowseTree::ReportNetError(DWORD nResult, LPCTSTR pszResource)
{
	// ... pszResource may be NULL
	CString sNetResource(pszResource);
	CString sErrorMsg;
	sErrorMsg = GetResultMessage(nResult);
	CString sPrompt;
	AfxFormatString2(sPrompt, IDS_OX_NET_BROWSE_ERROR, sNetResource, sErrorMsg);
	if (m_bReport)
		AfxMessageBox(sPrompt, MB_ICONEXCLAMATION | MB_OK, IDS_OX_NET_BROWSE_ERROR);
	else
	{
		TRACE1("COXNetBrowseTree::ReportNetError : Not warning the user of the network error :\n\t%s",
			sPrompt);
		return;
	}
}

CString COXNetBrowseTree::GetResultMessage(HRESULT resultCode, ...)
{
	CString sResultMessage;
	BOOL bSuccess = FALSE;

	va_list args;
	va_start(args, resultCode);
	bSuccess = RetrieveResultMessage(_T(""), resultCode, &args, sResultMessage);
	va_end(args);
	if (bSuccess)
		return sResultMessage;
	else
		return _T("");
}

BOOL COXNetBrowseTree::RetrieveResultMessage(CString sModuleName, HRESULT resultCode,
											 va_list* pArgs, CString& sResultMessage)
											 // --- In  : pszModuleName : Name of the module containing the message resource
											 //			 resultCode : Result code to use
											 //           pARgs : Optional parameters used to build the message
											 // --- Out : sResultMessage : The resulting message
											 // --- Returns : Whether the message could be retrieved successfully
											 // --- Effect : Initializes a result item object with the specified
{
	LPTSTR pszMsgBuf = NULL;
	BOOL bUnknown = FALSE;
	DWORD dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM;
	HMODULE hModule = NULL;

	// ... Get the module handle if a module name is specified
	if (!sModuleName.IsEmpty())
	{
		hModule = ::GetModuleHandle(sModuleName);
		dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_HMODULE;
		if (hModule == NULL)
			TRACE(_T("COXResultItem::RetrieveResultMessage : Module '%s' not found\n"), (LPCTSTR)sModuleName);
	}

	// ... Get the actual message
	if (::FormatMessage(dwFlags, hModule, resultCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
		(LPTSTR)&pszMsgBuf, 0, pArgs) == 0)
	{
		TRACE2("COXResultItem::RetrieveResultMessage : No message was found for result code %i == 0x%8.8X\n",
			resultCode, resultCode);
		//pszMsgBuf = szUnknownError;
		VERIFY(sResultMessage.LoadString(IDS_OX_NETBROWSEUNKERROR));
		bUnknown = TRUE;
	}
	else
		sResultMessage = pszMsgBuf;

	// ... Clean up
	if (!bUnknown)
		LocalFree(pszMsgBuf);

	return !bUnknown;
}

BOOL COXNetBrowseTree::PreInsertResourceItem(const NETRESOURCE* /* pNetResources */, TV_INSERTSTRUCT* /* pIinsertStruct */)
// --- In  : pNetResources : The network resource info
//			 pIinsertStruct : The insert struct that is filled out
// --- Out : pIinsertStruct : The changed insert struct
// --- Returns : Whether this item may be inserted in the tree
// --- Effect : Intercept the addition of an item in the tree
{
	// Nothing to do by default
	// ... Let the insert be completed
	return TRUE;
}

void COXNetBrowseTree::PostInsertResourceItem(const NETRESOURCE* /* pNetResources */, TV_INSERTSTRUCT* /* pInsertStruct */, HTREEITEM /* hNewItem */)
// --- In  : pNetResources : The network resource info
//			 pIinsertStruct : The insert struct that is filled out
//			 hNewItem : The handle of the newly added item
// --- Out :
// --- Returns :
// --- Effect : Function that i scalled after an item has been added to the tree
{
	// Nothing to do by default
}

// private:

// ==========================================================================

LRESULT COXNetBrowseTree::OnPostInit(WPARAM wParam, LPARAM lParam)
{
	// ... Parameters are not used (reserved for future extensions)
	ASSERT(wParam == 0);
	ASSERT(lParam == 0);
	UNUSED(wParam);
	UNUSED(lParam);

	// ... Window must be valid
	ASSERT(m_hWnd != NULL);
	ASSERT(::IsWindow(m_hWnd));

	// Perform first time initialization if necessary
	if (!IsInitialized())
		VERIFY(Initialize());

	return TRUE;
}

void COXNetBrowseTree::PreSubclassWindow()
{
	// ... Window must already be valid (although it has not yet been fully subclassed)
	ASSERT(m_hWnd != NULL);
	ASSERT(::IsWindow(m_hWnd));

	PostMessage(WM_POST_INIT);

	CTreeCtrl::PreSubclassWindow();
}

int COXNetBrowseTree::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CTreeCtrl::OnCreate(lpCreateStruct) == -1)
		return -1;

	// ... Window must already be valid (although it has not yet been fully subclassed)
	ASSERT(m_hWnd != NULL);
	ASSERT(::IsWindow(m_hWnd));

	PostMessage(WM_POST_INIT);

	return 0;
}

BOOL COXNetBrowseTree::OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult)
{
	NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
	BOOL bEaten = FALSE;
	*pResult = 0;

	// If expanding and not yet expanded once : expand now
	if (	(	(pNMTreeView->action == TVE_EXPAND)  ||
		((pNMTreeView->action == TVE_TOGGLE) &&
		((pNMTreeView->itemNew.state & TVIS_EXPANDED) != 0)) ) &&
		((pNMTreeView->itemNew.state & TVIS_EXPANDEDONCE) == 0) )
	{
		ExpandNode(pNMTreeView->itemNew.hItem);
	}
	return bEaten;
}

BOOL COXNetBrowseTree::OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult)
{
	UNREFERENCED_PARAMETER(pNMHDR);

	BOOL bEaten = FALSE;
	*pResult = 0;

	// Get the net resource belonging to the currently selected item
	HTREEITEM hTreeItem = GetSelectedItem();
	if (hTreeItem != NULL)
	{
		m_pCurrentNetResource = GetAssocNetResource(hTreeItem);
		ASSERT(m_pCurrentNetResource != NULL);
	}
	else
		m_pCurrentNetResource = NULL;
	ASSERT((m_pCurrentNetResource == NULL) ||
		(AfxIsValidAddress(m_pCurrentNetResource, sizeof(NETRESOURCE))));

	return bEaten;
}

void COXNetBrowseTree::OnGetDispInfo(NMHDR* pNMHDR, LRESULT* pResult)
{
	TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR;
	*pResult = 0;

	if (((pTVDispInfo->item.mask & TVIF_IMAGE) == TVIF_IMAGE) ||
		((pTVDispInfo->item.mask & TVIF_SELECTEDIMAGE) == TVIF_SELECTEDIMAGE))
	{
		// ... Start with unknown type
		int nImage = NET_IMAGE_UNKNOWN;
		// Get the associated net resource
		const NETRESOURCE* pNetResource = NULL;
		pNetResource = GetAssocNetResource(pTVDispInfo->item.hItem);
		if (pNetResource == NULL)
			return;

		switch(pNetResource->dwDisplayType)
		{
		case RESOURCEDISPLAYTYPE_GENERIC:
			nImage = NET_IMAGE_UNKNOWN;
			break;
		case RESOURCEDISPLAYTYPE_DOMAIN:
			nImage = NET_IMAGE_DOMAIN;
			break;
		case RESOURCEDISPLAYTYPE_SERVER:
			nImage = NET_IMAGE_SERVER;
			break;
		case RESOURCEDISPLAYTYPE_SHARE:
			{
				switch(pNetResource->dwType)
				{
				case RESOURCETYPE_DISK:
					nImage = NET_IMAGE_DISK_SHARE;
					break;
				case RESOURCETYPE_PRINT:
					nImage = NET_IMAGE_PRINTER_SHARE;
					break;
				default:
					nImage = NET_IMAGE_OTHER_SHARE;
					break;
				}
			}
			break;
		case RESOURCEDISPLAYTYPE_FILE:
			nImage = NET_IMAGE_FILE;
			break;
		case RESOURCEDISPLAYTYPE_GROUP:
			nImage = NET_IMAGE_GROUP;
			break;
		case RESOURCEDISPLAYTYPE_NETWORK:
			nImage = NET_IMAGE_NETWORK;
			break;
		case RESOURCEDISPLAYTYPE_ROOT:
			nImage = NET_IMAGE_ROOT;
			break;
		case RESOURCEDISPLAYTYPE_SHAREADMIN:
			nImage = NET_IMAGE_SHARADMIN;
			break;
		case RESOURCEDISPLAYTYPE_DIRECTORY:
			nImage = NET_IMAGE_DIRECTORY;
			break;
		case RESOURCEDISPLAYTYPE_TREE:
			nImage = NET_IMAGE_TREE;
			break;
		}

		// Under Windows NT 3.51 The root node of RESOURCE_GLOBALNET tree
		// has display type RESOURCEDISPLAYTYPE_GENERIC instead of RESOURCEDISPLAYTYPE_NETWORK
		// We will adjust for this here
		if ((OSVersion.dwMajorVersion < 4) &&
			(pNetResource->dwScope == RESOURCE_GLOBALNET) &&
			(GetParentItem(pTVDispInfo->item.hItem) == NULL))
		{
			nImage = NET_IMAGE_NETWORK;
		}

		// If the item is expanded, use the next image
		if ((GetItemState(pTVDispInfo->item.hItem, TVIS_EXPANDED) & TVIS_EXPANDED) == TVIS_EXPANDED)
			nImage++;

		// Return the result
		pTVDispInfo->item.iImage = nImage;
		pTVDispInfo->item.iSelectedImage = nImage;
	}
}

void COXNetBrowseTree::PostNcDestroy()
{
	// Unitialize the control
	Uninitialize();

	CTreeCtrl::PostNcDestroy();
}


text:
package com.yitong.weixin.front.info.entity;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.yitong.weixin.common.config.Global;
import com.yitong.weixin.common.persistence.DataEntity;

/**
 * 文章Entity
 * @author ThinkGem
 * @version 2013-01-15
 */
public class ArticleDataF extends DataEntity<ArticleDataF> {

	private static final long serialVersionUID = 1L;
	private String id;		// 编号
	private String content;	// 内容
	private String copyfrom;// 来源
	private String relation;// 相关文章
	private String allowComment;// 是否允许评论

	private ArticleF article;

	public ArticleDataF() {
		super();
		this.allowComment = Global.YES;
	}

	public ArticleDataF(String id){
		this();
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@NotBlank
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Length(min=0, max=255)
	public String getCopyfrom() {
		return copyfrom;
	}

	public void setCopyfrom(String copyfrom) {
		this.copyfrom = copyfrom;
	}

	@Length(min=0, max=255)
	public String getRelation() {
		return relation;
	}

	public void setRelation(String relation) {
		this.relation = relation;
	}

	@Length(min=1, max=1)
	public String getAllowComment() {
		return allowComment;
	}

	public void setAllowComment(String allowComment) {
		this.allowComment = allowComment;
	}

	public ArticleF getArticle() {
		return article;
	}

	public void setArticle(ArticleF article) {
		this.article = article;
	}

}


text:
/**
 * This class handles keyboard navigation of controls and elements.
 *
 * @class tinymce.ui.KeyboardNavigation
 */
define("tinymce/ui/KeyboardNavigation", [
], function() {
	"use strict";

	/**
	 * This class handles all keyboard navigation for WAI-ARIA support. Each root container
	 * gets an instance of this class.
	 *
	 * @constructor
	 */
	return function(settings) {
		var root = settings.root, focusedElement, focusedControl;

		try {
			focusedElement = document.activeElement;
		} catch (ex) {
			// IE sometimes fails to return a proper element
			focusedElement = document.body;
		}

		focusedControl = root.getParentCtrl(focusedElement);

		/**
		 * Returns the currently focused elements wai aria role of the currently
		 * focused element or specified element.
		 *
		 * @private
		 * @param {Element} elm Optional element to get role from.
		 * @return {String} Role of specified element.
		 */
		function getRole(elm) {
			elm = elm || focusedElement;

			return elm && elm.getAttribute('role');
		}

		/**
		 * Returns the wai role of the parent element of the currently
		 * focused element or specified element.
		 *
		 * @private
		 * @param {Element} elm Optional element to get parent role from.
		 * @return {String} Role of the first parent that has a role.
		 */
		function getParentRole(elm) {
			var role, parent = elm || focusedElement;

			while ((parent = parent.parentNode)) {
				if ((role = getRole(parent))) {
					return role;
				}
			}
		}

		/**
		 * Returns a wai aria property by name for example aria-selected.
		 *
		 * @private
		 * @param {String} name Name of the aria property to get for example "disabled".
		 * @return {String} Aria property value.
		 */
		function getAriaProp(name) {
			var elm = focusedElement;

			if (elm) {
				return elm.getAttribute('aria-' + name);
			}
		}

		/**
		 * Is the element a text input element or not.
		 *
		 * @private
		 * @param {Element} elm Element to check if it's an text input element or not.
		 * @return {Boolean} True/false if the element is a text element or not.
		 */
		function isTextInputElement(elm) {
			var tagName = elm.tagName.toUpperCase();

			// Notice: since type can be "email" etc we don't check the type
			// So all input elements gets treated as text input elements
			return tagName == "INPUT" || tagName == "TEXTAREA";
		}

		/**
		 * Returns true/false if the specified element can be focused or not.
		 *
		 * @private
		 * @param {Element} elm DOM element to check if it can be focused or not.
		 * @return {Boolean} True/false if the element can have focus.
		 */
		function canFocus(elm) {
			if (isTextInputElement(elm) && !elm.hidden) {
				return true;
			}

			if (/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(getRole(elm))) {
				return true;
			}

			return false;
		}

		/**
		 * Returns an array of focusable visible elements within the specified container element.
		 *
		 * @private
		 * @param {Element} elm DOM element to find focusable elements within.
		 * @return {Array} Array of focusable elements.
		 */
		function getFocusElements(elm) {
			var elements = [];

			function collect(elm) {
				if (elm.nodeType != 1 || elm.style.display == 'none') {
					return;
				}

				if (canFocus(elm)) {
					elements.push(elm);
				}

				for (var i = 0; i < elm.childNodes.length; i++) {
					collect(elm.childNodes[i]);
				}
			}

			collect(elm || root.getEl());

			return elements;
		}

		/**
		 * Returns the navigation root control for the specified control. The navigation root
		 * is the control that the keyboard navigation gets scoped to for example a menubar or toolbar group.
		 * It will look for parents of the specified target control or the currently focused control if this option is omitted.
		 *
		 * @private
		 * @param {tinymce.ui.Control} targetControl Optional target control to find root of.
		 * @return {tinymce.ui.Control} Navigation root control.
		 */
		function getNavigationRoot(targetControl) {
			var navigationRoot, controls;

			targetControl = targetControl || focusedControl;
			controls = targetControl.parents().toArray();
			controls.unshift(targetControl);

			for (var i = 0; i < controls.length; i++) {
				navigationRoot = controls[i];

				if (navigationRoot.settings.ariaRoot) {
					break;
				}
			}

			return navigationRoot;
		}

		/**
		 * Focuses the first item in the specified targetControl element or the last aria index if the
		 * navigation root has the ariaRemember option enabled.
		 *
		 * @private
		 * @param {tinymce.ui.Control} targetControl Target control to focus the first item in.
		 */
		function focusFirst(targetControl) {
			var navigationRoot = getNavigationRoot(targetControl);
			var focusElements = getFocusElements(navigationRoot.getEl());

			if (navigationRoot.settings.ariaRemember && "lastAriaIndex" in navigationRoot) {
				moveFocusToIndex(navigationRoot.lastAriaIndex, focusElements);
			} else {
				moveFocusToIndex(0, focusElements);
			}
		}

		/**
		 * Moves the focus to the specified index within the elements list.
		 * This will scope the index to the size of the element list if it changed.
		 *
		 * @private
		 * @param {Number} idx Specified index to move to.
		 * @param {Array} elements Array with dom elements to move focus within.
		 * @return {Number} Input index or a changed index if it was out of range.
		 */
		function moveFocusToIndex(idx, elements) {
			if (idx < 0) {
				idx = elements.length - 1;
			} else if (idx >= elements.length) {
				idx = 0;
			}

			if (elements[idx]) {
				elements[idx].focus();
			}

			return idx;
		}

		/**
		 * Moves the focus forwards or backwards.
		 *
		 * @private
		 * @param {Number} dir Direction to move in positive means forward, negative means backwards.
		 * @param {Array} elements Optional array of elements to move within defaults to the current navigation roots elements.
		 */
		function moveFocus(dir, elements) {
			var idx = -1, navigationRoot = getNavigationRoot();

			elements = elements || getFocusElements(navigationRoot.getEl());

			for (var i = 0; i < elements.length; i++) {
				if (elements[i] === focusedElement) {
					idx = i;
				}
			}

			idx += dir;
			navigationRoot.lastAriaIndex = moveFocusToIndex(idx, elements);
		}

		/**
		 * Moves the focus to the left this is called by the left key.
		 *
		 * @private
		 */
		function left() {
			var parentRole = getParentRole();

			if (parentRole == "tablist") {
				moveFocus(-1, getFocusElements(focusedElement.parentNode));
			} else if (focusedControl.parent().submenu) {
				cancel();
			} else {
				moveFocus(-1);
			}
		}

		/**
		 * Moves the focus to the right this is called by the right key.
		 *
		 * @private
		 */
		function right() {
			var role = getRole(), parentRole = getParentRole();

			if (parentRole == "tablist") {
				moveFocus(1, getFocusElements(focusedElement.parentNode));
			} else if (role == "menuitem" && parentRole == "menu" && getAriaProp('haspopup')) {
				enter();
			} else {
				moveFocus(1);
			}
		}

		/**
		 * Moves the focus to the up this is called by the up key.
		 *
		 * @private
		 */
		function up() {
			moveFocus(-1);
		}

		/**
		 * Moves the focus to the up this is called by the down key.
		 *
		 * @private
		 */
		function down() {
			var role = getRole(), parentRole = getParentRole();

			if (role == "menuitem" && parentRole == "menubar") {
				enter();
			} else if (role == "button" && getAriaProp('haspopup')) {
				enter({key: 'down'});
			} else {
				moveFocus(1);
			}
		}

		/**
		 * Moves the focus to the next item or previous item depending on shift key.
		 *
		 * @private
		 * @param {DOMEvent} e DOM event object.
		 */
		function tab(e) {
			var parentRole = getParentRole();

			if (parentRole == "tablist") {
				var elm = getFocusElements(focusedControl.getEl('body'))[0];

				if (elm) {
					elm.focus();
				}
			} else {
				moveFocus(e.shiftKey ? -1 : 1);
			}
		}

		/**
		 * Calls the cancel event on the currently focused control. This is normally done using the Esc key.
		 *
		 * @private
		 */
		function cancel() {
			focusedControl.fire('cancel');
		}

		/**
		 * Calls the click event on the currently focused control. This is normally done using the Enter/Space keys.
		 *
		 * @private
		 * @param {Object} aria Optional aria data to pass along with the enter event.
		 */
		function enter(aria) {
			aria = aria || {};
			focusedControl.fire('click', {target: focusedElement, aria: aria});
		}

		root.on('keydown', function(e) {
			function handleNonTabOrEscEvent(e, handler) {
				// Ignore non tab keys for text elements
				if (isTextInputElement(focusedElement)) {
					return;
				}

				if (handler(e) !== false) {
					e.preventDefault();
				}
			}

			if (e.isDefaultPrevented()) {
				return;
			}

			switch (e.keyCode) {
				case 37: // DOM_VK_LEFT
					handleNonTabOrEscEvent(e, left);
					break;

				case 39: // DOM_VK_RIGHT
					handleNonTabOrEscEvent(e, right);
					break;

				case 38: // DOM_VK_UP
					handleNonTabOrEscEvent(e, up);
					break;

				case 40: // DOM_VK_DOWN
					handleNonTabOrEscEvent(e, down);
					break;

				case 27: // DOM_VK_ESCAPE
					cancel();
					break;

				case 14: // DOM_VK_ENTER
				case 13: // DOM_VK_RETURN
				case 32: // DOM_VK_SPACE
					handleNonTabOrEscEvent(e, enter);
					break;

				case 9: // DOM_VK_TAB
					if (tab(e) !== false) {
						e.preventDefault();
					}
					break;
			}
		});

		root.on('focusin', function(e) {
			focusedElement = e.target;
			focusedControl = e.control;
		});

		return {
			focusFirst: focusFirst
		};
	};
});


text:
package com.heaven7.java.data.mediator.bind;

import com.heaven7.java.data.mediator.internal.BindMethod;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * bind text size (dip value) of view . eg: TextView.
 * it will auto set text size as pix when you change text size from proxy.
 * <pre>
 *     {@literal @}BindTextSizePx("textSizePx") TextView title;
 * </pre>
 * @author heaven7
 * @since  1.2.0
 */
@Retention(RetentionPolicy.CLASS)
@Target(ElementType.FIELD)
@BindMethod("bindTextSizePx")
public @interface BindTextSizePx {

    /**
     * the property name which will be used to bind object.
     * @return the property name
     */
    String value();

    /**
     * the object index. which used for bind multi objects .
     * @return the object index.
     */
    int index() default 0;
}


text:
<?php

declare(strict_types=1);

namespace Prooph\Psr7Middleware;

/**
 * This file contains default configuration for prooph/psr7-middleware
 * It is meant to be used together with at least one of the container-aware factories
 * shipped with this package. Please refer to src/Container for the factories and
 * register them in your Interop\Container\ContainerInterface of choice
 * Then make this config available as service id `config` within your container
 * (possibly merged into your application configuration)
 */
return [
    //vendor key to avoid merge conflicts with other packages when merged into application config
    'prooph' => [
        //component key to avoid merge conflicts with other prooph components when merged into application config
        'middleware' => [
            //This section will be used by \Prooph\Psr7Middleware\Container\QueryMiddlewareFactory
            'query' => [
                // container/service id / instance to return the data
                // see \Prooph\Psr7Middleware\Response\ResponseStrategy for an example
                'response_strategy' => 'custom_response_strategy',
                // container/service id / instance, see \Prooph\Common\Messaging\MessageFactory for more details
                'message_factory' => 'custom_message_factory',
                // container/service id for the QueryBus instance, default QueryBus::class
                'query_bus' => 'custom_query_bus',
                // container/service id for the MetadataGatherer instance, default NoopMetadataGatherer::class
                // 'metadata_gatherer' => \Prooph\Psr7Middleware\MetadataGatherer::class
            ],
            //This section will be used by \Prooph\Psr7Middleware\Container\CommandMiddlewareFactory
            'command' => [
                // container/service id, see \Prooph\Common\Messaging\MessageFactory for more details
                'message_factory' => \Prooph\Common\Messaging\FQCNMessageFactory::class,
                // container/service id for the CommandBus instance, default CommandBus::class
                'command_bus' => 'custom_command_bus',
            ],
            //This section will be used by \Prooph\Psr7Middleware\Container\EventMiddlewareFactory
            'event' => [
                // container/service id, see \Prooph\Common\Messaging\MessageFactory for more details
                'message_factory' => \Prooph\Common\Messaging\FQCNMessageFactory::class,
                // container/service id for the EventBus instance, default EventBus::class
                'event_bus' => 'custom_event_bus',
            ],
            //This section will be used by \Prooph\Psr7Middleware\Container\MessageMiddlewareFactory
            'message' => [
                // container/service id to return the data
                // see \Prooph\Psr7Middleware\Response\ResponseStrategy for an example, only used for query bus
                'response_strategy' => 'custom_response_strategy',
                // container/service id, see \Prooph\Common\Messaging\MessageFactory for more details
                // must have support for all bus types e.g. command, event and query
                'message_factory' => 'custom_message_factory',
                // container/service id for the MessageBus instance, default MessageBus::class
                'message_bus' => 'custom_message_bus',
            ],
        ],
    ],
];


text:
package gander

import gander.images.Image
import gander.opengraph.OpenGraphData
import org.joda.time.DateTime
import org.jsoup.nodes.{Document, Element}

/**
  * An article
  *
  * @param title of the article
  * @param cleanedArticleText stores the lovely, pure text from the article, stripped of html,
  *                           formatting, etcjust raw text with paragraphs separated by
  *                           newlines. This is probably what you want to use.
  * @param metaDescription description field in HTML source
  * @param metaKeywords field in the HTML source
  * @param canonicalLink of this article if found in the meta data
  * @param domain of this article we're parsing
  * @param topNode holds the top Element we think is a candidate for the main
  *                body of the article
  * @param topImage holds the top Image object that we think represents this article
  * @param tags holds a set of tags that may have been in the article, these are not meta
  *             keywords
  * @param movies holds a list of any movies we found on the page like youtube, vimeo
  * @param finalUrl tores the final URL that we're going to try and fetch content against,
  *                 this would be expanded if any escaped fragments were found in the
  *                 starting url
  * @param linkHash stores the MD5 hash of the url to use for various identification tasks
  * @param rawHtml stores the RAW HTML straight from the network connection
  * @param doc the JSoup Document object
  * @param rawDoc this is the original JSoup document that contains a pure object from the
  *               original HTML without any cleaning options done on it
  * @param publishDate Sometimes useful to try and know when the publish date of an article was
  * @param additionalData A property bucket for consumers of goose to store custom data
  *                       extractions. This is populated by an implementation of
  *                       {@link goose.extractors.AdditionalDataExtractor} which is executed
  *                       before document cleansing within {@link goose.CrawlingActor#crawl}
  * @param openGraphData Facebook Open Graph data that that is found in Article Meta tags
  */
final case class Article(title: String,
                         cleanedArticleText: Option[String],
                         metaDescription: String,
                         metaKeywords: String,
                         canonicalLink: String,
                         domain: String,
                         topNode: Option[Element],
                         topImage: Option[Image],
                         tags: Set[String],
                         movies: List[Element],
                         finalUrl: String,
                         linkHash: String,
                         rawHtml: String,
                         doc: Document,
                         rawDoc: Document,
                         publishDate: Option[DateTime],
                         additionalData: Map[String, String],
                         openGraphData: OpenGraphData)


text:
package com.google.android.exoplayer.raw.parser;

/**
 * Created by yychu on 18/03/2015.
 */
public class MPEG2Part3AudioReader {
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>ForwardingFileObject (Java Platform SE 7 )</title>
<meta name="date" content="2014-12-18">
<meta name="keywords" content="javax.tools.ForwardingFileObject class">
<meta name="keywords" content="fileObject">
<meta name="keywords" content="toUri()">
<meta name="keywords" content="getName()">
<meta name="keywords" content="openInputStream()">
<meta name="keywords" content="openOutputStream()">
<meta name="keywords" content="openReader()">
<meta name="keywords" content="getCharContent()">
<meta name="keywords" content="openWriter()">
<meta name="keywords" content="getLastModified()">
<meta name="keywords" content="delete()">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 7

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

javax.tools

Class ForwardingFileObject<F extends FileObject>

java.lang.Object

javax.tools.ForwardingFileObject<F>

Type Parameters:

F - the kind of file object forwarded to by this object

All Implemented Interfaces:

FileObject

Direct Known Subclasses:

ForwardingJavaFileObject

public class ForwardingFileObject<F extends FileObject>
extends Object
implements FileObject

Forwards calls to a given file object.  Subclasses of this class
 might override some of these methods and might also provide
 additional fields and methods.

Since:

1.6

Field Summary

Fields

Modifier and Type
Field and Description

protected F
fileObject

The file object which all methods are delegated to.

Constructor Summary

Constructors

Modifier
Constructor and Description

protected
ForwardingFileObject(F fileObject)

Creates a new instance of ForwardingFileObject.

Method Summary

Methods

Modifier and Type
Method and Description

boolean
delete()

Deletes this file object.

CharSequence
getCharContent(boolean ignoreEncodingErrors)

Gets the character content of this file object, if available.

long
getLastModified()

Gets the time this file object was last modified.

String
getName()

Gets a user-friendly name for this file object.

InputStream
openInputStream()

Gets an InputStream for this file object.

OutputStream
openOutputStream()

Gets an OutputStream for this file object.

Reader
openReader(boolean ignoreEncodingErrors)

Gets a reader for this object.

Writer
openWriter()

Gets a Writer for this file object.

URI
toUri()

Returns a URI identifying this file object.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

fileObject

protected final F extends FileObject fileObject

The file object which all methods are delegated to.

Constructor Detail

ForwardingFileObject

protected ForwardingFileObject(F fileObject)

Creates a new instance of ForwardingFileObject.

Parameters:

fileObject - delegate to this file object

Method Detail

toUri

public URI toUri()

Description copied from interface: FileObject

Returns a URI identifying this file object.

Specified by:

toUri in interface FileObject

Returns:

a URI

getName

public String getName()

Description copied from interface: FileObject

Gets a user-friendly name for this file object.  The exact
 value returned is not specified but implementations should take
 care to preserve names as given by the user.  For example, if
 the user writes the filename "BobsApp\Test.java" on
 the command line, this method should return "BobsApp\Test.java" whereas the toUri
 method might return file:///C:/Documents%20and%20Settings/UncleBob/BobsApp/Test.java.

Specified by:

getName in interface FileObject

Returns:

a user-friendly name

openInputStream

public InputStream openInputStream()
                            throws IOException

Description copied from interface: FileObject

Gets an InputStream for this file object.

Specified by:

openInputStream in interface FileObject

Returns:

an InputStream

Throws:

IllegalStateException - if this file object was
 opened for writing and does not support reading

UnsupportedOperationException - if this kind of file
 object does not support byte access

IOException - if an I/O error occurred

openOutputStream

public OutputStream openOutputStream()
                              throws IOException

Description copied from interface: FileObject

Gets an OutputStream for this file object.

Specified by:

openOutputStream in interface FileObject

Returns:

an OutputStream

Throws:

IllegalStateException - if this file object was
 opened for reading and does not support writing

UnsupportedOperationException - if this kind of
 file object does not support byte access

IOException - if an I/O error occurred

openReader

public Reader openReader(boolean ignoreEncodingErrors)
                  throws IOException

Description copied from interface: FileObject

Gets a reader for this object.  The returned reader will
 replace bytes that cannot be decoded with the default
 translation character.  In addition, the reader may report a
 diagnostic unless ignoreEncodingErrors is true.

Specified by:

openReader in interface FileObject

Parameters:

ignoreEncodingErrors - ignore encoding errors if true

Returns:

a Reader

Throws:

IllegalStateException - if this file object was
 opened for writing and does not support reading

UnsupportedOperationException - if this kind of
 file object does not support character access

IOException - if an I/O error occurred

getCharContent

public CharSequence getCharContent(boolean ignoreEncodingErrors)
                            throws IOException

Description copied from interface: FileObject

Gets the character content of this file object, if available.
 Any byte that cannot be decoded will be replaced by the default
 translation character.  In addition, a diagnostic may be
 reported unless ignoreEncodingErrors is true.

Specified by:

getCharContent in interface FileObject

Parameters:

ignoreEncodingErrors - ignore encoding errors if true

Returns:

a CharSequence if available; null otherwise

Throws:

IllegalStateException - if this file object was
 opened for writing and does not support reading

UnsupportedOperationException - if this kind of
 file object does not support character access

IOException - if an I/O error occurred

openWriter

public Writer openWriter()
                  throws IOException

Description copied from interface: FileObject

Gets a Writer for this file object.

Specified by:

openWriter in interface FileObject

Returns:

a Writer

Throws:

IllegalStateException - if this file object was
 opened for reading and does not support writing

UnsupportedOperationException - if this kind of
 file object does not support character access

IOException - if an I/O error occurred

getLastModified

public long getLastModified()

Description copied from interface: FileObject

Gets the time this file object was last modified.  The time is
 measured in milliseconds since the epoch (00:00:00 GMT, January
 1, 1970).

Specified by:

getLastModified in interface FileObject

Returns:

the time this file object was last modified; or 0 if
 the file object does not exist, if an I/O error occurred, or if
 the operation is not supported

delete

public boolean delete()

Description copied from interface: FileObject

Deletes this file object.  In case of errors, returns false.

Specified by:

delete in interface FileObject

Returns:

true if and only if this file object is successfully
 deleted; false otherwise

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 7

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.


text:
<!DOCTYPE html>
<html>
  <head>
    <title>Ticket Sherpa</title>
    <link rel="stylesheet" type="text/css" href="/main.css">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans|Quicksand" rel="stylesheet">
  </head>
  <body>
    <div id="root">
    </div>
    <script src="/bundle.js"></script>
  </body>
</html>


text:
package cn.org.eshow.service;

import cn.org.eshow.bean.query.CategoryQuery;
import cn.org.eshow.common.page.Page;
import cn.org.eshow.model.Category;

import javax.jws.WebService;
import java.util.List;

@WebService
public interface CategoryManager extends GenericManager<Category, Integer> {

	/**
	 *
	 * @param query
	 * @return
     */
	List<Category> list(CategoryQuery query);

	/**
	 *
	 * @param query
	 * @return
     */
	Page<Category> search(CategoryQuery query);
}