text:
layout: base
title:  'Statistics of Poss in UD_Indonesian-CSUI'
udver: '2'
---

## Treebank Statistics: UD_Indonesian-CSUI: Features: `Poss`

This feature is universal.
It occurs with 1 different values: `Yes`.

17 tokens (0%) have a non-empty value of `Poss`.
1 types (0%) occur at least once with a non-empty value of `Poss`.
1 lemmas (0%) occur at least once with a non-empty value of `Poss`.
The feature is used with 1 part-of-speech tags: <tt>PRON</tt> (17; 0% instances).

### `PRON`

17 <tt>PRON</tt> tokens (3% of all `PRON` tokens) have a non-empty value of `Poss`.

The most frequent other feature values with which `PRON` and `Poss` co-occurred: <tt>Number</tt><tt>=Sing</tt> (17; 100%), <tt>Person</tt><tt>=3</tt> (17; 100%), <tt>PronType</tt><tt>=Prs</tt> (17; 100%).

`PRON` tokens may have the following values of `Poss`:

* `Yes` (17; 100% of non-empty `Poss`): nya
* `EMPTY` (662): nya, dia, itu, kita, ia, mereka, ini, saya, demikian, kami

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE DeriveDataTypeable #-}

module Caramia.Internal.Error
    ( throwSDLError
    , SDLError(..) )
    where

import Data.Typeable
import Control.Exception
import qualified Data.Text as T
import Foreign.C.String
import qualified Graphics.UI.SDL as SDL

throwSDLError :: IO a
throwSDLError = do
    str <- peekCString =<< SDL.getError
    throwIO $ SDLError $ T.pack str

-- | Thrown when something goes wrong with SDL2.
--
-- The text is (hopefully) human-readable description of what happened.
data SDLError = SDLError T.Text
                deriving ( Eq, Ord, Show, Read, Typeable )

instance Exception SDLError


text:
package thereisnospon.acclient.utils.net.callback;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Headers;
import okhttp3.Response;

/**
 * Created by yzr on 16/6/5.
 */
public  abstract class StringCallback  extends NetCallback{

    public abstract void onFail(String msg);
    public abstract void onSuccess(String str, Headers headers);
    @Override
    public void onFailure(Call call, IOException e) {
        onFail(e.getMessage());
    }

    @Override
    public void onResponse(Call call, Response response) throws IOException {

        if(!response.isSuccessful()){
            onFail("fail"+response.code());
        }else{
            onSuccess(response.body().string(),response.headers());
        }
    }
}


text:
using Microsoft.Scripting.Hosting;

using Oxide.Core.Plugins;
using Oxide.Core.Plugins.Watchers;

namespace Oxide.Ext.Python.Plugins
{
    /// <summary>
    /// Responsible for loading Python based plugins
    /// </summary>
    public class PythonPluginLoader : PluginLoader
    {
        /// <summary>
        /// Gets the Python engine
        /// </summary>
        private ScriptEngine PythonEngine { get; set; }

        /// <summary>
        /// Gets or sets the watcher
        /// </summary>
        public FSWatcher Watcher { get; set; }

        /// <summary>
        /// Gets the Python Ext
        /// </summary>
        private PythonExtension PythonExtension { get; set; }

        public override string FileExtension => ".py";

        /// <summary>
        /// Initializes a new instance of the PythonPluginLoader class
        /// </summary>
        /// <param name="engine"></param>
        /// <param name="pythonExtension"></param>
        public PythonPluginLoader(ScriptEngine engine, PythonExtension pythonExtension)
        {
            PythonEngine = engine;
            PythonExtension = pythonExtension;
        }

        /// <summary>
        /// Gets a plugin given the specified filename
        /// </summary>
        /// <param name="filename"></param>
        /// <returns></returns>
        protected override Plugin GetPlugin(string filename)
        {
            return new PythonPlugin(filename, PythonEngine, Watcher);
        }

        /// <summary>
        /// Loads a plugin using this loader
        /// </summary>
        /// <param name="directory"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public override Plugin Load(string directory, string name)
        {
            PythonExtension.InitializeTypes();
            return base.Load(directory, name);
        }
    }
}


text:
<?php
class LoginAction extends BaseAction{
	public function _initialize() {
		parent::_initialize();
	}
	public function index(){
		if (IS_POST){
			$username=trim($this->_post('email'));
			if (!$username){
				$this->error('请输入账号');
			}
			$username=str_replace(array("'"),array(''),$username);
			//
			$username=htmlspecialchars($username);
			$thisUser=M('Agent')->where(array('name'=>$username))->find();
			if (!$thisUser){
				$this->error('账号和密码不匹配哦');
			}
			if (md5(md5(trim($_POST['password'])).$thisUser['salt'])!=$thisUser['password']){
				$this->error('账号和密码不匹配');
			}
			$_SESSION['agentid']=$thisUser['id'];
			$this->success('登录成功',U('Index/index'));
		}else {
			$this->display();
		}
	}
}

?>


text:
/*
 * This file was generated by the SOM Compiler.
 * FileName: .\wpstrtup.h.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.7
 *     SOM Emitter emith: 2.42
 */

/*
 *
 *
 *    Module Name: WPStartup2
 *
 *
 */

#ifndef SOM_WPStartup2_h
#define SOM_WPStartup2_h

#include <som.h>

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * Define the class name as an object type
 */
#ifndef WPStartup2
#define WPStartup2 SOMObject
#endif
#include <wpfolder.h>

/*
 * Start of user-defined types:
 */
#ifndef SOMClass
    #define SOMClass SOMObject
#endif /* SOMClass */
#ifndef WPFolder
    #define WPFolder SOMObject
#endif /* WPFolder */
#ifndef M_WPObject
    #define M_WPObject SOMObject
#endif /* M_WPObject */
#ifndef WPObject
    #define WPObject SOMObject
#endif /* WPObject */
#ifndef WPImageFile
    #define WPImageFile SOMObject
#endif /* WPImageFile */
#ifndef M_WPFileSystem
    #define M_WPFileSystem SOMObject
#endif /* M_WPFileSystem */
#ifndef M_WPFolder
    #define M_WPFolder SOMObject
#endif /* M_WPFolder */
#ifndef M_WPStartup2
    #define M_WPStartup2 SOMObject
#endif /* M_WPStartup2 */

/*
 * End of user-defined types.
 */

/*
 * Passthru lines: File: "C.h", "after"
 */

#define WPStartup2_MajorVersion 1
#define WPStartup2_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define WPStartup2NewClass wpStartup2c
#pragma linkage(wpStartup2c, system)
#define WPStartup2ClassData wpStartup2d
#define WPStartup2CClassData wpStartup2x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */

/*
 * Include the meta class file
 */
#include <wpstrtup.h>
/*--------------Migration------------*/
#define WPStartup2_classObj WPStartup2ClassData.classObject
#define _WPStartup2 WPStartup2_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK WPStartup2NewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);
#pragma linkage(WPStartup2NewClass, system)

/*
 * Declare the class data structure
 */
SOMEXTERN struct WPStartup2ClassDataStructure {
	SOMClass *classObject;
	somMToken isSet;
	somMToken markSet;
} SOMDLINK WPStartup2ClassData;

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct WPStartup2CClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOMDLINK WPStartup2CClassData;

/*
 * New and Renew macros for WPStartup2
 */
#define WPStartup2New() \
   (_somNew(_WPStartup2 ? _WPStartup2 : WPStartup2NewClass(WPStartup2_MajorVersion, WPStartup2_MinorVersion)))
#define WPStartup2Renew(buf) \
   (_somRenew(_WPStartup2 ? _WPStartup2 : WPStartup2NewClass(WPStartup2_MajorVersion, WPStartup2_MinorVersion), buf))

/*
 * Override method: wpMenuItemSelected
 */
#define WPStartup2_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId) \
	WPObject_wpMenuItemSelected(somSelf,hwndFrame,ulMenuId)

/*
 * Override method: wpModifyPopupMenu
 */
#define WPStartup2_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition) \
	WPObject_wpModifyPopupMenu(somSelf,hwndMenu,hwndCnr,iPosition)

/*
 * Override method: wpOpen
 */
#define WPStartup2_wpOpen(somSelf,hwndCnr,ulView,param) \
	WPObject_wpOpen(somSelf,hwndCnr,ulView,param)

/*
 * Override method: wpObjectReady
 */
#define WPStartup2_wpObjectReady(somSelf,ulCode,refObject) \
	WPObject_wpObjectReady(somSelf,ulCode,refObject)

/*
 * New Method: isSet
 */
typedef BOOL   SOMLINK somTP_WPStartup2_isSet(WPStartup2 *somSelf);
#pragma linkage(somTP_WPStartup2_isSet, system)
typedef somTP_WPStartup2_isSet *somTD_WPStartup2_isSet;
#define somMD_WPStartup2_isSet "::WPStartup2::isSet"
#define WPStartup2_isSet(somSelf) \
    (SOM_Resolve(somSelf, WPStartup2, isSet) \
	(somSelf))
#ifndef SOMGD_isSet
    #if (defined(_isSet) || defined(__isSet))
        #undef _isSet
        #undef __isSet
        #define SOMGD_isSet 1
    #else
        #define _isSet WPStartup2_isSet
    #endif /* _isSet */
#endif /* SOMGD_isSet */

/*
 * New Method: markSet
 */
typedef BOOL   SOMLINK somTP_WPStartup2_markSet(WPStartup2 *somSelf,
		HOBJECT hObj);
#pragma linkage(somTP_WPStartup2_markSet, system)
typedef somTP_WPStartup2_markSet *somTD_WPStartup2_markSet;
#define somMD_WPStartup2_markSet "::WPStartup2::markSet"
#define WPStartup2_markSet(somSelf,hObj) \
    (SOM_Resolve(somSelf, WPStartup2, markSet) \
	(somSelf,hObj))
#ifndef SOMGD_markSet
    #if (defined(_markSet) || defined(__markSet))
        #undef _markSet
        #undef __markSet
        #define SOMGD_markSet 1
    #else
        #define _markSet WPStartup2_markSet
    #endif /* _markSet */
#endif /* SOMGD_markSet */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define WPStartup2_wpSetFldrFlags WPFolder_wpSetFldrFlags
#define WPStartup2_wpQueryFldrFlags WPFolder_wpQueryFldrFlags
#define WPStartup2_wpSetFldrFont WPFolder_wpSetFldrFont
#define WPStartup2_wpQueryFldrFont WPFolder_wpQueryFldrFont
#define WPStartup2_wpSetFldrAttr WPFolder_wpSetFldrAttr
#define WPStartup2_wpQueryFldrAttr WPFolder_wpQueryFldrAttr
#define WPStartup2_wpSetNextIconPos WPFolder_wpSetNextIconPos
#define WPStartup2_wpQueryNextIconPos WPFolder_wpQueryNextIconPos
#define WPStartup2_wpPopulate WPFolder_wpPopulate
#define WPStartup2_wpQueryContent WPFolder_wpQueryContent
#define WPStartup2_wpAddFolderView1Page WPFolder_wpAddFolderView1Page
#define WPStartup2_wpAddFolderView2Page WPFolder_wpAddFolderView2Page
#define WPStartup2_wpAddFolderView3Page WPFolder_wpAddFolderView3Page
#define WPStartup2_wpAddFolderIncludePage WPFolder_wpAddFolderIncludePage
#define WPStartup2_wpAddFolderSortPage WPFolder_wpAddFolderSortPage
#define WPStartup2_wpAddFolderBackgroundPage WPFolder_wpAddFolderBackgroundPage
#define WPStartup2_wpAddFolderMenu2Page WPFolder_wpAddFolderMenu2Page
#define WPStartup2_wpAddFolderSelfClosePage WPFolder_wpAddFolderSelfClosePage
#define WPStartup2_wpInitIconPosData WPFolder_wpInitIconPosData
#define WPStartup2_wpFreeIconPosData WPFolder_wpFreeIconPosData
#define WPStartup2_wpStoreIconPosData WPFolder_wpStoreIconPosData
#define WPStartup2_wpQueryIconPosition WPFolder_wpQueryIconPosition
#define WPStartup2_wpSetFldrSort WPFolder_wpSetFldrSort
#define WPStartup2_wpQueryFldrSort WPFolder_wpQueryFldrSort
#define WPStartup2_wpRestoreFldrRunObjs WPFolder_wpRestoreFldrRunObjs
#define WPStartup2_wpStoreFldrRunObjs WPFolder_wpStoreFldrRunObjs
#define WPStartup2_wpHideFldrRunObjs WPFolder_wpHideFldrRunObjs
#define WPStartup2_wpDeleteContents WPFolder_wpDeleteContents
#define WPStartup2_wpSetFldrDetailsClass WPFolder_wpSetFldrDetailsClass
#define WPStartup2_wpQueryFldrDetailsClass WPFolder_wpQueryFldrDetailsClass
#define WPStartup2_wpSearchFolder WPFolder_wpSearchFolder
#define WPStartup2_wpContainsFolders WPFolder_wpContainsFolders
#define WPStartup2_wpQueryOpenFolders WPFolder_wpQueryOpenFolders
#define WPStartup2_wpModifyFldrFlags WPFolder_wpModifyFldrFlags
#define WPStartup2_wpAddToContent WPFolder_wpAddToContent
#define WPStartup2_wpDeleteFromContent WPFolder_wpDeleteFromContent
#define WPStartup2_wpSetDetailsColumnVisibility WPFolder_wpSetDetailsColumnVisibility
#define WPStartup2_wpIsDetailsColumnVisible WPFolder_wpIsDetailsColumnVisible
#define WPStartup2_wpSetFldrSortClass WPFolder_wpSetFldrSortClass
#define WPStartup2_wpQueryFldrSortClass WPFolder_wpQueryFldrSortClass
#define WPStartup2_wpSetSortAttribAvailable WPFolder_wpSetSortAttribAvailable
#define WPStartup2_wpIsSortAttribAvailable WPFolder_wpIsSortAttribAvailable
#define WPStartup2_wpQueryIconViewPos WPFolder_wpQueryIconViewPos
#define WPStartup2_wpAddFirstChild WPFolder_wpAddFirstChild
#define WPStartup2_wpFlushNotifications WPFolder_wpFlushNotifications
#define WPStartup2_wpSetMenuBarVisibility WPFolder_wpSetMenuBarVisibility
#define WPStartup2_wpQueryMenuBarVisibility WPFolder_wpQueryMenuBarVisibility
#define WPStartup2_wpQueryIconTextBackgroundColor WPFolder_wpQueryIconTextBackgroundColor
#define WPStartup2_wpSetIconTextBackgroundColor WPFolder_wpSetIconTextBackgroundColor
#define WPStartup2_wpQueryIconTextColor WPFolder_wpQueryIconTextColor
#define WPStartup2_wpSetIconTextColor WPFolder_wpSetIconTextColor
#define WPStartup2_wpQueryShadowTextColor WPFolder_wpQueryShadowTextColor
#define WPStartup2_wpSetShadowTextColor WPFolder_wpSetShadowTextColor
#define WPStartup2_wpQueryIconTextVisibility WPFolder_wpQueryIconTextVisibility
#define WPStartup2_wpSetIconTextVisibility WPFolder_wpSetIconTextVisibility
#define WPStartup2_wpQueryFldrBackground WPFolder_wpQueryFldrBackground
#define WPStartup2_wpSetFldrBackground WPFolder_wpSetFldrBackground
#define WPStartup2_wpSetRealName WPFileSystem_wpSetRealName
#define WPStartup2_wpSetType WPFileSystem_wpSetType
#define WPStartup2_wpQueryType WPFileSystem_wpQueryType
#define WPStartup2_wpSetAttr WPFileSystem_wpSetAttr
#define WPStartup2_wpQueryAttr WPFileSystem_wpQueryAttr
#define WPStartup2_wpAddFile1Page WPFileSystem_wpAddFile1Page
#define WPStartup2_wpAddFile2Page WPFileSystem_wpAddFile2Page
#define WPStartup2_wpAddFile3Page WPFileSystem_wpAddFile3Page
#define WPStartup2_wpAddFileMenuPage WPFileSystem_wpAddFileMenuPage
#define WPStartup2_wpQueryCreation WPFileSystem_wpQueryCreation
#define WPStartup2_wpQueryLastAccess WPFileSystem_wpQueryLastAccess
#define WPStartup2_wpQueryLastWrite WPFileSystem_wpQueryLastWrite
#define WPStartup2_wpQueryFileSize WPFileSystem_wpQueryFileSize
#define WPStartup2_wpQueryEASize WPFileSystem_wpQueryEASize
#define WPStartup2_wpSetDateInfo WPFileSystem_wpSetDateInfo
#define WPStartup2_wpSetFileSizeInfo WPFileSystem_wpSetFileSizeInfo
#define WPStartup2_wpRefresh WPFileSystem_wpRefresh
#define WPStartup2_wpQueryRefreshFlags WPFileSystem_wpQueryRefreshFlags
#define WPStartup2_wpSetRefreshFlags WPFileSystem_wpSetRefreshFlags
#define WPStartup2_wpPrintPlainTextFile WPFileSystem_wpPrintPlainTextFile
#define WPStartup2_wpSetTitleAndRenameFile WPFileSystem_wpSetTitleAndRenameFile
#define WPStartup2_wpConfirmRenameFileWithExt WPFileSystem_wpConfirmRenameFileWithExt
#define WPStartup2_wpVerifyUpdateAccess WPFileSystem_wpVerifyUpdateAccess
#define WPStartup2_wpQueryEASupport WPFileSystem_wpQueryEASupport
#define WPStartup2_wpAddUserItemsToPopupMenu WPFileSystem_wpAddUserItemsToPopupMenu
#define WPStartup2_wpIsDiskSwapped WPFileSystem_wpIsDiskSwapped
#define WPStartup2_wpQueryRealName WPFileSystem_wpQueryRealName
#define WPStartup2_wpQueryFilename WPFileSystem_wpQueryFilename
#define WPStartup2_wpQueryDisk WPFileSystem_wpQueryDisk
#define WPStartup2_wpQueryDateInfo WPFileSystem_wpQueryDateInfo
#define WPStartup2_wpConfirmKeepAssoc WPFileSystem_wpConfirmKeepAssoc
#define WPStartup2_wpAddObjectGeneralPage WPObject_wpAddObjectGeneralPage
#define WPStartup2_wpAddObjectGeneralPage2 WPObject_wpAddObjectGeneralPage2
#define WPStartup2_wpAddObjectWindowPage WPObject_wpAddObjectWindowPage
#define WPStartup2_wpAddSettingsPages WPObject_wpAddSettingsPages
#define WPStartup2_wpAddToObjUseList WPObject_wpAddToObjUseList
#define WPStartup2_wpAllocMem WPObject_wpAllocMem
#define WPStartup2_wpAppendObject WPObject_wpAppendObject
#define WPStartup2_wpAssertObjectMutexSem WPObject_wpAssertObjectMutexSem
#define WPStartup2_wpClose WPObject_wpClose
#define WPStartup2_wpCnrInsertObject WPObject_wpCnrInsertObject
#define WPStartup2_wpCnrRemoveObject WPObject_wpCnrRemoveObject
#define WPStartup2_wpCnrSetEmphasis WPObject_wpCnrSetEmphasis
#define WPStartup2_wpConfirmDelete WPObject_wpConfirmDelete
#define WPStartup2_wpConfirmObjectTitle WPObject_wpConfirmObjectTitle
#define WPStartup2_wpCopiedFromTemplate WPObject_wpCopiedFromTemplate
#define WPStartup2_wpCopyObject WPObject_wpCopyObject
#define WPStartup2_wpCreateAnother WPObject_wpCreateAnother
#define WPStartup2_wpCreateFromTemplate WPObject_wpCreateFromTemplate
#define WPStartup2_wpCreateShadowObject WPObject_wpCreateShadowObject
#define WPStartup2_wpDelete WPObject_wpDelete
#define WPStartup2_wpDeleteFromObjUseList WPObject_wpDeleteFromObjUseList
#define WPStartup2_wpDisplayHelp WPObject_wpDisplayHelp
#define WPStartup2_wpDisplayMenu WPObject_wpDisplayMenu
#define WPStartup2_wpDoesObjectMatch WPObject_wpDoesObjectMatch
#define WPStartup2_wpDraggedOverObject WPObject_wpDraggedOverObject
#define WPStartup2_wpDragOver WPObject_wpDragOver
#define WPStartup2_wpDrop WPObject_wpDrop
#define WPStartup2_wpDroppedOnObject WPObject_wpDroppedOnObject
#define WPStartup2_wpEndConversation WPObject_wpEndConversation
#define WPStartup2_wpFilterPopupMenu WPObject_wpFilterPopupMenu
#define WPStartup2_wpFilterMenu WPObject_wpFilterMenu
#define WPStartup2_wpFindUseItem WPObject_wpFindUseItem
#define WPStartup2_wpFormatDragItem WPObject_wpFormatDragItem
#define WPStartup2_wpFree WPObject_wpFree
#define WPStartup2_wpFreeMem WPObject_wpFreeMem
#define WPStartup2_wpHide WPObject_wpHide
#define WPStartup2_wpInitData WPObject_wpInitData
#define WPStartup2_wpInsertPopupMenuItems WPObject_wpInsertPopupMenuItems
#define WPStartup2_wpInsertMenuItems WPObject_wpInsertMenuItems
#define WPStartup2_wpInsertSettingsPage WPObject_wpInsertSettingsPage
#define WPStartup2_wpMenuItemHelpSelected WPObject_wpMenuItemHelpSelected
#define WPStartup2_wpModifyMenu WPObject_wpModifyMenu
#define WPStartup2_wpMoveObject WPObject_wpMoveObject
#define WPStartup2_wpPrintObject WPObject_wpPrintObject
#define WPStartup2_wpQueryConcurrentView WPObject_wpQueryConcurrentView
#define WPStartup2_wpQueryButtonAppearance WPObject_wpQueryButtonAppearance
#define WPStartup2_wpQueryConfirmations WPObject_wpQueryConfirmations
#define WPStartup2_wpQueryDefaultHelp WPObject_wpQueryDefaultHelp
#define WPStartup2_wpQueryDefaultView WPObject_wpQueryDefaultView
#define WPStartup2_wpQueryDetailsData WPObject_wpQueryDetailsData
#define WPStartup2_wpQueryError WPObject_wpQueryError
#define WPStartup2_wpSetFolder WPObject_wpSetFolder
#define WPStartup2_wpQueryFolder WPObject_wpQueryFolder
#define WPStartup2_wpQueryIcon WPObject_wpQueryIcon
#define WPStartup2_wpQueryIconData WPObject_wpQueryIconData
#define WPStartup2_wpQueryMinWindow WPObject_wpQueryMinWindow
#define WPStartup2_wpQueryNameClashOptions WPObject_wpQueryNameClashOptions
#define WPStartup2_wpQueryStyle WPObject_wpQueryStyle
#define WPStartup2_wpSetTaskRec WPObject_wpSetTaskRec
#define WPStartup2_wpFindTaskRec WPObject_wpFindTaskRec
#define WPStartup2_wpQueryTitle WPObject_wpQueryTitle
#define WPStartup2_wpRegisterView WPObject_wpRegisterView
#define WPStartup2_wpReleaseObjectMutexSem WPObject_wpReleaseObjectMutexSem
#define WPStartup2_wpRender WPObject_wpRender
#define WPStartup2_wpRenderComplete WPObject_wpRenderComplete
#define WPStartup2_wpReplaceObject WPObject_wpReplaceObject
#define WPStartup2_wpRequestObjectMutexSem WPObject_wpRequestObjectMutexSem
#define WPStartup2_wpRestore WPObject_wpRestore
#define WPStartup2_wpRestoreData WPObject_wpRestoreData
#define WPStartup2_wpRestoreLong WPObject_wpRestoreLong
#define WPStartup2_wpRestoreState WPObject_wpRestoreState
#define WPStartup2_wpRestoreString WPObject_wpRestoreString
#define WPStartup2_wpSaveData WPObject_wpSaveData
#define WPStartup2_wpSaveImmediate WPObject_wpSaveImmediate
#define WPStartup2_wpSaveDeferred WPObject_wpSaveDeferred
#define WPStartup2_wpSaveLong WPObject_wpSaveLong
#define WPStartup2_wpSaveState WPObject_wpSaveState
#define WPStartup2_wpSaveString WPObject_wpSaveString
#define WPStartup2_wpScanSetupString WPObject_wpScanSetupString
#define WPStartup2_wpSetConcurrentView WPObject_wpSetConcurrentView
#define WPStartup2_wpSetButtonAppearance WPObject_wpSetButtonAppearance
#define WPStartup2_wpSetDefaultHelp WPObject_wpSetDefaultHelp
#define WPStartup2_wpSetDefaultView WPObject_wpSetDefaultView
#define WPStartup2_wpSetError WPObject_wpSetError
#define WPStartup2_wpQueryScreenGroupID WPObject_wpQueryScreenGroupID
#define WPStartup2_wpSetupOnce WPObject_wpSetupOnce
#define WPStartup2_wpSetIcon WPObject_wpSetIcon
#define WPStartup2_wpSetIconData WPObject_wpSetIconData
#define WPStartup2_wpSetMinWindow WPObject_wpSetMinWindow
#define WPStartup2_wpModifyStyle WPObject_wpModifyStyle
#define WPStartup2_wpSetTitle WPObject_wpSetTitle
#define WPStartup2_wpSetup WPObject_wpSetup
#define WPStartup2_wpSwitchTo WPObject_wpSwitchTo
#define WPStartup2_wpUnInitData WPObject_wpUnInitData
#define WPStartup2_wpViewObject WPObject_wpViewObject
#define WPStartup2_wpQueryTrueStyle WPObject_wpQueryTrueStyle
#define WPStartup2_wpQueryHandle WPObject_wpQueryHandle
#define WPStartup2_wpUnlockObject WPObject_wpUnlockObject
#define WPStartup2_wpIsObjectInitialized WPObject_wpIsObjectInitialized
#define WPStartup2_wpCreateShadowObjectExt WPObject_wpCreateShadowObjectExt
#define WPStartup2_wpCnrDeleteUseItem WPObject_wpCnrDeleteUseItem
#define WPStartup2_wpIsDeleteable WPObject_wpIsDeleteable
#define WPStartup2_wpQueryCoreRecord WPObject_wpQueryCoreRecord
#define WPStartup2_wpSetObjectID WPObject_wpSetObjectID
#define WPStartup2_wpQueryObjectID WPObject_wpQueryObjectID
#define WPStartup2_wpSetDefaultIconPos WPObject_wpSetDefaultIconPos
#define WPStartup2_wpQueryDefaultIconPos WPObject_wpQueryDefaultIconPos
#define WPStartup2_wpCnrRefreshDetails WPObject_wpCnrRefreshDetails
#define WPStartup2_wpFindViewItem WPObject_wpFindViewItem
#define WPStartup2_wpLockObject WPObject_wpLockObject
#define WPStartup2_wpIsLocked WPObject_wpIsLocked
#define WPStartup2_wpQueryContainerFlagPtr WPObject_wpQueryContainerFlagPtr
#define WPStartup2_wpWaitForClose WPObject_wpWaitForClose
#define WPStartup2_wpSetMenuStyle WPObject_wpSetMenuStyle
#define WPStartup2_wpQueryMenuStyle WPObject_wpQueryMenuStyle
#define WPStartup2_wpIdentify WPObject_wpIdentify
#define WPStartup2_wpSetStyle WPObject_wpSetStyle
#define WPStartup2_somDefaultInit SOMObject_somDefaultInit
#define WPStartup2_somDestruct SOMObject_somDestruct
#define WPStartup2_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define WPStartup2_somDefaultAssign SOMObject_somDefaultAssign
#define WPStartup2_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define WPStartup2_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define WPStartup2_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define WPStartup2_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define WPStartup2_somDefaultVAssign SOMObject_somDefaultVAssign
#define WPStartup2_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define WPStartup2_somInit SOMObject_somInit
#define WPStartup2_somFree SOMObject_somFree
#define WPStartup2_somUninit SOMObject_somUninit
#define WPStartup2_somGetClass SOMObject_somGetClass
#define WPStartup2_somGetClassName SOMObject_somGetClassName
#define WPStartup2_somGetSize SOMObject_somGetSize
#define WPStartup2_somIsA SOMObject_somIsA
#define WPStartup2_somIsInstanceOf SOMObject_somIsInstanceOf
#define WPStartup2_somRespondsTo SOMObject_somRespondsTo
#define WPStartup2_somDispatch SOMObject_somDispatch
#define WPStartup2_somClassDispatch SOMObject_somClassDispatch
#define WPStartup2_somCastObj SOMObject_somCastObj
#define WPStartup2_somResetObj SOMObject_somResetObj
#define WPStartup2_somDispatchV SOMObject_somDispatchV
#define WPStartup2_somDispatchL SOMObject_somDispatchL
#define WPStartup2_somDispatchA SOMObject_somDispatchA
#define WPStartup2_somDispatchD SOMObject_somDispatchD
#define WPStartup2_somPrintSelf SOMObject_somPrintSelf
#define WPStartup2_somDumpSelf SOMObject_somDumpSelf
#define WPStartup2_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_WPStartup2_h */

#ifndef SOM_M_WPStartup2_h
#define SOM_M_WPStartup2_h

#include <som.h>

/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * Define the class name as an object type
 */
#ifndef M_WPStartup2
#define M_WPStartup2 SOMObject
#endif
#include <wpfolder.h>

/*
 * Start of user-defined types:
 */

/*
 * End of user-defined types.
 */

#define M_WPStartup2_MajorVersion 1
#define M_WPStartup2_MinorVersion 1

/*
 * External name shortening if required
 */
#ifdef SOM_USE_SHORT_EXTERNAL_NAMES
#define M_WPStartup2NewClass c
#pragma linkage(c, system)
#define M_WPStartup2ClassData d
#define M_WPStartup2CClassData x
#endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
/*--------------Migration------------*/
#define M_WPStartup2_classObj M_WPStartup2ClassData.classObject
#define _M_WPStartup2 M_WPStartup2_classObj

/*
 * Declare the class creation procedure
 */
SOMEXTERN SOMClass * SOMLINK M_WPStartup2NewClass(integer4 somtmajorVersion,
		integer4 somtminorVersion);
#pragma linkage(M_WPStartup2NewClass, system)

/*
 * Declare the class data structure
 */
SOMEXTERN struct M_WPStartup2ClassDataStructure {
	SOMClass *classObject;
	somMToken clsQueryModuleHandle;
} SOMDLINK M_WPStartup2ClassData;

/*
 * Declare the C specific class data structure
 */
SOMEXTERN struct M_WPStartup2CClassDataStructure {
	somMethodTabs parentMtab;
	somDToken instanceDataToken;
} SOMDLINK M_WPStartup2CClassData;

/*
 * New and Renew macros for M_WPStartup2
 */
#define M_WPStartup2New() \
   (_somNew(_M_WPStartup2 ? _M_WPStartup2 : M_WPStartup2NewClass(M_WPStartup2_MajorVersion, M_WPStartup2_MinorVersion)))
#define M_WPStartup2Renew(buf) \
   (_somRenew(_M_WPStartup2 ? _M_WPStartup2 : M_WPStartup2NewClass(M_WPStartup2_MajorVersion, M_WPStartup2_MinorVersion), buf))

/*
 * Override method: wpclsInitData
 */
#define M_WPStartup2_wpclsInitData(somSelf) \
	M_WPObject_wpclsInitData(somSelf)

/*
 * Override method: wpclsQueryTitle
 */
#define M_WPStartup2_wpclsQueryTitle(somSelf) \
	M_WPObject_wpclsQueryTitle(somSelf)

/*
 * Override method: wpclsQueryIconData
 */
#define M_WPStartup2_wpclsQueryIconData(somSelf,pIconInfo) \
	M_WPObject_wpclsQueryIconData(somSelf,pIconInfo)

/*
 * Override method: wpclsQueryIconDataN
 */
#define M_WPStartup2_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex) \
	M_WPFolder_wpclsQueryIconDataN(somSelf,pIconInfo,ulIconIndex)

/*
 * New Method: clsQueryModuleHandle
 */
typedef HMODULE   SOMLINK somTP_M_WPStartup2_clsQueryModuleHandle(M_WPStartup2 *somSelf);
#pragma linkage(somTP_M_WPStartup2_clsQueryModuleHandle, system)
typedef somTP_M_WPStartup2_clsQueryModuleHandle *somTD_M_WPStartup2_clsQueryModuleHandle;
#define somMD_M_WPStartup2_clsQueryModuleHandle "::M_WPStartup2::clsQueryModuleHandle"
#define M_WPStartup2_clsQueryModuleHandle(somSelf) \
    (SOM_Resolve(somSelf, M_WPStartup2, clsQueryModuleHandle) \
	(somSelf))
#ifndef SOMGD_clsQueryModuleHandle
    #if (defined(_clsQueryModuleHandle) || defined(__clsQueryModuleHandle))
        #undef _clsQueryModuleHandle
        #undef __clsQueryModuleHandle
        #define SOMGD_clsQueryModuleHandle 1
    #else
        #define _clsQueryModuleHandle M_WPStartup2_clsQueryModuleHandle
    #endif /* _clsQueryModuleHandle */
#endif /* SOMGD_clsQueryModuleHandle */
#ifndef SOM_DONT_USE_INHERITED_MACROS
#define M_WPStartup2_wpclsQueryIconN M_WPFolder_wpclsQueryIconN
#define M_WPStartup2_wpclsQueryOpenFolders M_WPFolder_wpclsQueryOpenFolders
#define M_WPStartup2_wpclsQueryAwakeObject M_WPFileSystem_wpclsQueryAwakeObject
#define M_WPStartup2_wpclsFileSysExists M_WPFileSystem_wpclsFileSysExists
#define M_WPStartup2_wpclsQueryObjectFromPath M_WPFileSystem_wpclsQueryObjectFromPath
#define M_WPStartup2_wpclsQueryInstanceType M_WPFileSystem_wpclsQueryInstanceType
#define M_WPStartup2_wpclsQueryInstanceFilter M_WPFileSystem_wpclsQueryInstanceFilter
#define M_WPStartup2_wpclsQueryInstanceClass M_WPFileSystem_wpclsQueryInstanceClass
#define M_WPStartup2_wpclsCreateDefaultTemplates M_WPObject_wpclsCreateDefaultTemplates
#define M_WPStartup2_wpclsMakeAwake M_WPObject_wpclsMakeAwake
#define M_WPStartup2_wpclsNew M_WPObject_wpclsNew
#define M_WPStartup2_wpclsQueryDefaultHelp M_WPObject_wpclsQueryDefaultHelp
#define M_WPStartup2_wpclsQueryDefaultView M_WPObject_wpclsQueryDefaultView
#define M_WPStartup2_wpclsQueryDetails M_WPObject_wpclsQueryDetails
#define M_WPStartup2_wpclsQueryDetailsInfo M_WPObject_wpclsQueryDetailsInfo
#define M_WPStartup2_wpclsQueryExtendedCriteria M_WPObject_wpclsQueryExtendedCriteria
#define M_WPStartup2_wpclsQueryFolder M_WPObject_wpclsQueryFolder
#define M_WPStartup2_wpclsQueryIcon M_WPObject_wpclsQueryIcon
#define M_WPStartup2_wpclsQuerySearchInfo M_WPObject_wpclsQuerySearchInfo
#define M_WPStartup2_wpclsQueryStyle M_WPObject_wpclsQueryStyle
#define M_WPStartup2_wpclsUnInitData M_WPObject_wpclsUnInitData
#define M_WPStartup2_wpclsFindObjectFirst M_WPObject_wpclsFindObjectFirst
#define M_WPStartup2_wpclsFindObjectNext M_WPObject_wpclsFindObjectNext
#define M_WPStartup2_wpclsFindObjectEnd M_WPObject_wpclsFindObjectEnd
#define M_WPStartup2_wpclsSetError M_WPObject_wpclsSetError
#define M_WPStartup2_wpclsQueryError M_WPObject_wpclsQueryError
#define M_WPStartup2_wpclsQuerySettingsPageSize M_WPObject_wpclsQuerySettingsPageSize
#define M_WPStartup2_wpclsQueryObject M_WPObject_wpclsQueryObject
#define M_WPStartup2_wpclsQueryButtonAppearance M_WPObject_wpclsQueryButtonAppearance
#define M_WPStartup2_wpclsDecUsage M_WPObject_wpclsDecUsage
#define M_WPStartup2_wpclsIncUsage M_WPObject_wpclsIncUsage
#define M_WPStartup2_wpclsInsertMultipleObjects M_WPObject_wpclsInsertMultipleObjects
#define M_WPStartup2_wpclsFindOneObject M_WPObject_wpclsFindOneObject
#define M_WPStartup2_wpclsSetSettingsPageSize M_WPObject_wpclsSetSettingsPageSize
#define M_WPStartup2_wpclsSetIconData M_WPObject_wpclsSetIconData
#define M_WPStartup2_wpclsSetIcon M_WPObject_wpclsSetIcon
#define M_WPStartup2_wpclsObjectFromHandle M_WPObject_wpclsObjectFromHandle
#define M_WPStartup2_wpclsRemoveObjects M_WPObject_wpclsRemoveObjects
#define M_WPStartup2__get_somDataAlignment SOMClass__get_somDataAlignment
#define M_WPStartup2__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
#define M_WPStartup2__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
#define M_WPStartup2_somNew SOMClass_somNew
#define M_WPStartup2_somNewNoInit SOMClass_somNewNoInit
#define M_WPStartup2_somRenew SOMClass_somRenew
#define M_WPStartup2_somRenewNoInit SOMClass_somRenewNoInit
#define M_WPStartup2_somRenewNoZero SOMClass_somRenewNoZero
#define M_WPStartup2_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
#define M_WPStartup2_somAllocate SOMClass_somAllocate
#define M_WPStartup2_somDeallocate SOMClass_somDeallocate
#define M_WPStartup2_somInitClass SOMClass_somInitClass
#define M_WPStartup2_somInitMIClass SOMClass_somInitMIClass
#define M_WPStartup2_somAddStaticMethod SOMClass_somAddStaticMethod
#define M_WPStartup2_somAddDynamicMethod SOMClass_somAddDynamicMethod
#define M_WPStartup2_somOverrideSMethod SOMClass_somOverrideSMethod
#define M_WPStartup2_somClassReady SOMClass_somClassReady
#define M_WPStartup2_somGetApplyStub SOMClass_somGetApplyStub
#define M_WPStartup2_somGetClassData SOMClass_somGetClassData
#define M_WPStartup2_somSetClassData SOMClass_somSetClassData
#define M_WPStartup2_somGetClassMtab SOMClass_somGetClassMtab
#define M_WPStartup2_somGetInstanceOffset SOMClass_somGetInstanceOffset
#define M_WPStartup2_somGetInstancePartSize SOMClass_somGetInstancePartSize
#define M_WPStartup2_somGetInstanceSize SOMClass_somGetInstanceSize
#define M_WPStartup2_somGetInstanceToken SOMClass_somGetInstanceToken
#define M_WPStartup2_somGetMemberToken SOMClass_somGetMemberToken
#define M_WPStartup2_somGetMethodData SOMClass_somGetMethodData
#define M_WPStartup2_somGetRdStub SOMClass_somGetRdStub
#define M_WPStartup2_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
#define M_WPStartup2_somGetMethodIndex SOMClass_somGetMethodIndex
#define M_WPStartup2_somGetMethodToken SOMClass_somGetMethodToken
#define M_WPStartup2_somGetName SOMClass_somGetName
#define M_WPStartup2_somGetNthMethodData SOMClass_somGetNthMethodData
#define M_WPStartup2_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
#define M_WPStartup2_somGetNumMethods SOMClass_somGetNumMethods
#define M_WPStartup2_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
#define M_WPStartup2_somGetParent SOMClass_somGetParent
#define M_WPStartup2_somGetParents SOMClass_somGetParents
#define M_WPStartup2_somGetVersionNumbers SOMClass_somGetVersionNumbers
#define M_WPStartup2_somFindMethod SOMClass_somFindMethod
#define M_WPStartup2_somFindMethodOk SOMClass_somFindMethodOk
#define M_WPStartup2_somFindSMethod SOMClass_somFindSMethod
#define M_WPStartup2_somFindSMethodOk SOMClass_somFindSMethodOk
#define M_WPStartup2_somLookupMethod SOMClass_somLookupMethod
#define M_WPStartup2_somCheckVersion SOMClass_somCheckVersion
#define M_WPStartup2_somDescendedFrom SOMClass_somDescendedFrom
#define M_WPStartup2_somSupportsMethod SOMClass_somSupportsMethod
#define M_WPStartup2_somDefinedMethod SOMClass_somDefinedMethod
#define M_WPStartup2_somOverrideMtab SOMClass_somOverrideMtab
#define M_WPStartup2_somDefaultInit SOMObject_somDefaultInit
#define M_WPStartup2_somDestruct SOMObject_somDestruct
#define M_WPStartup2_somDefaultCopyInit SOMObject_somDefaultCopyInit
#define M_WPStartup2_somDefaultAssign SOMObject_somDefaultAssign
#define M_WPStartup2_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
#define M_WPStartup2_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
#define M_WPStartup2_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
#define M_WPStartup2_somDefaultConstAssign SOMObject_somDefaultConstAssign
#define M_WPStartup2_somDefaultVAssign SOMObject_somDefaultVAssign
#define M_WPStartup2_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
#define M_WPStartup2_somInit SOMObject_somInit
#define M_WPStartup2_somFree SOMObject_somFree
#define M_WPStartup2_somUninit SOMObject_somUninit
#define M_WPStartup2_somGetClass SOMObject_somGetClass
#define M_WPStartup2_somGetClassName SOMObject_somGetClassName
#define M_WPStartup2_somGetSize SOMObject_somGetSize
#define M_WPStartup2_somIsA SOMObject_somIsA
#define M_WPStartup2_somIsInstanceOf SOMObject_somIsInstanceOf
#define M_WPStartup2_somRespondsTo SOMObject_somRespondsTo
#define M_WPStartup2_somDispatch SOMObject_somDispatch
#define M_WPStartup2_somClassDispatch SOMObject_somClassDispatch
#define M_WPStartup2_somCastObj SOMObject_somCastObj
#define M_WPStartup2_somResetObj SOMObject_somResetObj
#define M_WPStartup2_somDispatchV SOMObject_somDispatchV
#define M_WPStartup2_somDispatchL SOMObject_somDispatchL
#define M_WPStartup2_somDispatchA SOMObject_somDispatchA
#define M_WPStartup2_somDispatchD SOMObject_somDispatchD
#define M_WPStartup2_somPrintSelf SOMObject_somPrintSelf
#define M_WPStartup2_somDumpSelf SOMObject_somDumpSelf
#define M_WPStartup2_somDumpSelfInt SOMObject_somDumpSelfInt
#endif /* SOM_DONT_USE_INHERITED_MACROS */

#endif       /* SOM_M_WPStartup2_h */


text: package fake_net // import "code.cloudfoundry.org/diego-ssh/test_helpers/fake_net"


text:
module TxtDB
  module SQL

    class Insert

      def set_parameters(params)
        set_parameters_tests = at_least_four_parameter?(params) && no_more_than_four_parameter?(params)
        if (set_parameters_tests) then
          @database_name = params.shift
          @table_name = params.shift
          @fields = params.shift
          @values = params.shift
        end
        set_parameters_tests
      end

      def execute
        TxtDB::FileSystem::insert(@database_name,@table_name,@fields,@values)
      end

      private

      def at_least_four_parameter?(params)
        params.count > 3
      end

      def no_more_than_four_parameter?(params)
        params.count < 5
      end

    end

  end
end


text:
module Pairwise
  module Formatter
    class Cucumber

      def initialize(out)
        @out = out
        @max = {}
      end

      def display(test_data, input_labels)
        @test_data = label_wild_cards(test_data, input_labels)
        @input_labels = input_labels

        @out.print "|"
        @input_labels.each_with_index do |label, column|
          @out.print padded_string(label, column) + "|"
        end
        @out.puts

        @test_data.each do |data|
          @out.print "|"
          data.each_with_index do |datum, column|
            @out.print padded_string(datum, column) + "|"
          end
          @out.puts
        end
      end

      private
      def label_wild_cards(test_data, labels)
        test_data.map do |data|
          data.enum_for(:each_with_index).map do |datum, column|
            datum == IPO::WILD_CARD ? "any_value_of_#{labels[column]}" : datum
          end
        end
      end

      def padded_string(string, column)
        padding_length = max_line_length(column) - string.to_s.length
        " #{string} " + (" " * padding_length)
      end

      def max_line_length(column)
        @max[column] ||= ([@input_labels[column].to_s.length] + @test_data.map{|data| data[column].to_s.length}).max
      end

    end
  end
end


text:
/**
 * @file    AssetPane.cpp
 * @author  Marvin Smith
 * @date    1/28/2014
 */
#include "AssetPane.hpp"

/**
 * Constructor for AssetPane class
 */
AssetPane::AssetPane( QWidget* parent ) : QWidget( parent ){

    // build main widget
    mainLayout = new QVBoxLayout;
    mainLayout->setAlignment( Qt::AlignLeft | Qt::AlignTop );

    // build main label
    mainLabel = new QLabel("LLNMS Asset Management Page");
    mainLabel->setFont(QFont(mainLabel->font().family(), 18));
    mainLayout->addWidget( mainLabel );

    // set layout
    setLayout( mainLayout );

}


text:
package com.consol.citrus.jmx.config.annotation;

import javax.management.NotificationFilter;

import com.consol.citrus.TestActor;
import com.consol.citrus.config.annotation.AnnotationConfigParser;
import com.consol.citrus.jmx.client.JmxClient;
import com.consol.citrus.jmx.client.JmxClientBuilder;
import com.consol.citrus.jmx.message.JmxMessageConverter;
import com.consol.citrus.message.MessageCorrelator;
import com.consol.citrus.spi.ReferenceResolver;
import org.springframework.util.StringUtils;

/**
 * @author Christoph Deppisch
 * @since 2.5
 */
public class JmxClientConfigParser implements AnnotationConfigParser<JmxClientConfig, JmxClient> {

    @Override
    public JmxClient parse(JmxClientConfig annotation, ReferenceResolver referenceResolver) {
        JmxClientBuilder builder = new JmxClientBuilder();

        builder.serverUrl(annotation.serverUrl());

        if (StringUtils.hasText(annotation.username())) {
            builder.username(annotation.username());
        }

        if (StringUtils.hasText(annotation.password())) {
            builder.password(annotation.password());
        }

        builder.autoReconnect(annotation.autoReconnect());
        builder.reconnectDelay(annotation.reconnectDelay());

        if (StringUtils.hasText(annotation.notificationFilter())) {
            builder.notificationFilter(referenceResolver.resolve(annotation.notificationFilter(), NotificationFilter.class));
        }

        if (StringUtils.hasText(annotation.messageConverter())) {
            builder.messageConverter(referenceResolver.resolve(annotation.messageConverter(), JmxMessageConverter.class));
        }

        if (StringUtils.hasText(annotation.correlator())) {
            builder.correlator(referenceResolver.resolve(annotation.correlator(), MessageCorrelator.class));
        }

        builder.pollingInterval(annotation.pollingInterval());

        builder.timeout(annotation.timeout());

        if (StringUtils.hasText(annotation.actor())) {
            builder.actor(referenceResolver.resolve(annotation.actor(), TestActor.class));
        }

        return builder.initialize().build();
    }
}


text:
import React, { Component } from 'react'
import { Link } from 'react-router-dom'

export default class CatShow extends Component {
  constructor(props){
    super(props)
    this.state = {
      name: props.drawer.name,
      foods: props.foods.filter(function(food){
        return food.category_id === props.id

      })
    }
  }

  render() {
    return (

 {`Food in the ${this.state.name} drawer:`}

                {this.state.foods.map((food) => (

                    <Link className="btn btn-lg btn-warning" to={`/foods/${food.id}`}>{food.name}</Link>

                )
              )}

    )
  }
}


text: What else do you want to find out about? (select as many as apply)


text:
package org.drools.compiler.compiler;

import static org.junit.Assert.assertEquals;

import org.drools.compiler.Cheese;
import org.drools.compiler.Person;
import org.drools.compiler.builder.impl.KnowledgeBuilderImpl;
import org.drools.core.definitions.impl.KnowledgePackageImpl;
import org.drools.core.test.model.DroolsTestCase;
import org.drools.compiler.lang.descr.AndDescr;
import org.drools.compiler.lang.descr.BindingDescr;
import org.drools.compiler.lang.descr.ExprConstraintDescr;
import org.drools.compiler.lang.descr.ExprConstraintDescr.Type;
import org.drools.compiler.lang.descr.PackageDescr;
import org.drools.compiler.lang.descr.PatternDescr;
import org.drools.compiler.lang.descr.QueryDescr;
import org.drools.compiler.lang.descr.RuleDescr;
import org.junit.Test;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.rule.QueryResults;
import org.kie.internal.KnowledgeBase;
import org.kie.internal.KnowledgeBaseFactory;
import org.kie.internal.definition.KnowledgePackage;

import java.util.Arrays;

public class QueryBuilderTest extends DroolsTestCase {

    @Test
    public void testRuleWithQuery() throws Exception {
        final KnowledgeBuilderImpl builder = new KnowledgeBuilderImpl();

        final PackageDescr packageDescr = new PackageDescr( "p1" );

        QueryDescr queryDescr = new QueryDescr( "query1" );
        queryDescr.addParameter( "String",
                                 "$name" );
        queryDescr.addParameter( "int",
                                 "$age" );
        queryDescr.addParameter( "String",
                                 "$likes" );
        packageDescr.addRule( queryDescr );
        AndDescr lhs = new AndDescr();
        queryDescr.setLhs( lhs );
        PatternDescr pattern = new PatternDescr( Person.class.getName() );
        lhs.addDescr( pattern );
        pattern.addConstraint( new BindingDescr( "$name", "name", true ) );
        pattern.addConstraint( new BindingDescr( "$age", "age", true ) );
        pattern.addConstraint( new BindingDescr( "$likes", "likes", true ) );

        RuleDescr ruleDescr = new RuleDescr( "rule-1" );
        packageDescr.addRule( ruleDescr );
        lhs = new AndDescr();
        ruleDescr.setLhs( lhs );

        pattern = new PatternDescr( Cheese.class.getName() );
        lhs.addDescr( pattern );
        pattern.addConstraint( new BindingDescr( "$type",
                                              "type" ) );

        pattern = new PatternDescr( "query1" );
        pattern.setQuery( true );
        lhs.addDescr( pattern );
        ExprConstraintDescr expr = new ExprConstraintDescr("'bobba'");
        expr.setPosition( 0 );
        expr.setType( Type.POSITIONAL );
        pattern.addConstraint(expr);

        expr = new ExprConstraintDescr("$age");
        expr.setPosition( 1 );
        expr.setType( Type.POSITIONAL );
        pattern.addConstraint( expr );

        expr = new ExprConstraintDescr("$type");
        expr.setPosition( 2 );
        expr.setType( Type.POSITIONAL );
        pattern.addConstraint( expr );
        ruleDescr.setConsequence( "System.out.println(\"age: \" + $age);" );

        builder.addPackage( packageDescr );
        assertLength( 0,
                      builder.getErrors().getErrors() );

        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages(Arrays.asList( new KnowledgePackage[] { builder.getPackage() } ));
        final KieSession session = kbase.newStatefulKnowledgeSession();

        session.insert( new Person( "bobba",
                                    "stilton",
                                    90 ) );
        session.insert( new Person( "bobba",
                                    "brie",
                                    80 ) );
        session.insert( new Person( "bobba",
                                    "brie",
                                    75 ) );
        session.insert( new Person( "darth",
                                    "brie",
                                    100 ) );
        session.insert( new Person( "luke",
                                    "brie",
                                    25 ) );
        session.insert( new Cheese( "brie",
                                    25 ) );
        session.fireAllRules();
    }

    @Test
    public void testQuery() throws Exception {
        final KnowledgeBuilderImpl builder = new KnowledgeBuilderImpl();

        final PackageDescr packageDescr = new PackageDescr( "p1" );
        final QueryDescr queryDescr = new QueryDescr( "query1" );
        queryDescr.addParameter( "String",
                                 "$type" );

        packageDescr.addRule( queryDescr );

        final AndDescr lhs = new AndDescr();
        queryDescr.setLhs( lhs );

        final PatternDescr pattern = new PatternDescr( Cheese.class.getName(),
                                                       "stilton" );
        lhs.addDescr( pattern );

        pattern.addConstraint( new ExprConstraintDescr("type == $type") );

        // Another query, no parameters
        QueryDescr queryDescr2 = new QueryDescr( "query2" );
        packageDescr.addRule( queryDescr2 );
        AndDescr lhs2 = new AndDescr();
        queryDescr2.setLhs( lhs2 );
        PatternDescr pattern2 = new PatternDescr( Cheese.class.getName() );
        lhs2.addDescr( pattern2 );

        builder.addPackage( packageDescr );

        assertLength( 0,
                      builder.getErrors().getErrors() );

        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        kbase.addKnowledgePackages(Arrays.asList( new KnowledgePackage[] { builder.getPackage() } ) );

        final KieSession session = kbase.newStatefulKnowledgeSession();

        session.insert( new Cheese( "stilton",
                                    15 ) );

        QueryResults results = session.getQueryResults( "query1",
                                                        "stilton" );
        assertEquals( 1,
                      results.size() );

        Object object = results.iterator().next().get("stilton");
        assertEquals( new Cheese( "stilton",
                                  15 ),
                      object );

        results = session.getQueryResults( "query1",
                                           new Object[]{"cheddar"} );
        assertEquals( 0,
                      results.size() );

        session.insert(new Cheese("dolcelatte",
                                  20));
        results = session.getQueryResults( "query2",
                                           new Object[]{} );
        assertEquals( 2,
                      results.size() );
    }
}


text:
@interface BankCardListConfig ()

@property (nonatomic,weak)BackCardManagerController *vc;

@end

@implementation BankCardListConfig

- (void)setup:(BackCardManagerController *)vc{

    _vc = vc;

    _vc.title = @"我的银行卡";

}

@end


text:
Medical-Photo-Recognize
=======================
This is learning project of image processing discipline


text:
<?php
/************************************************************************/
/* ATutor                                                               */
/************************************************************************/
/* Copyright (c) 2002-2010                                              */
/* Inclusive Design Institute                                           */
/* http://atutor.ca                                                     */
/*                                                                      */
/* This program is free software. You can redistribute it and/or        */
/* modify it under the terms of the GNU General Public License          */
/* as published by the Free Software Foundation.                        */
/************************************************************************/
// $Id:

define('AT_INCLUDE_PATH', '../../../include/');
require(AT_INCLUDE_PATH.'vitals.inc.php');
admin_authenticate(AT_ADMIN_PRIV_MODULES);

$module_folder = '../../../mods/';

if (isset($_GET["mod"])) $mod = $_GET["mod"];
else if (isset($_POST["mod"])) $mod = $_POST["mod"];

if (isset($_GET["new"])) $new = $_GET["new"];
else if (isset($_POST["new"])) $new = $_POST["new"];

if (isset($_POST['submit_no'])) {
	$msg->addFeedback('CANCELLED');
	header('Location: '.AT_BASE_HREF.'mods/_core/modules/install_modules.php');
	exit;
}
else if (is_writable($module_folder) || (is_writable($module_folder) && isset($_POST['submit_yes'])))
{
	header('Location: '.AT_BASE_HREF.'mods/_core/modules/module_install_step_2.php?mod='.$mod.SEP.'new='.$new.SEP.'permission_granted='.$_POST["permission_granted"]);
	exit;
}

if (!is_writable($module_folder))
{
	unset($hidden_vars);
	$hidden_vars['mod'] = $mod;
	$hidden_vars['new'] = $new;
	$hidden_vars['permission_granted'] = 1;

	require(AT_INCLUDE_PATH.'header.inc.php');

	$msg->addConfirm(array('GRANT_WRITE_PERMISSION', realpath($module_folder)), $hidden_vars, _AT("continue"), _AT("cancel"));
	$msg->printConfirm();

	require(AT_INCLUDE_PATH.'footer.inc.php');
}

?>


text:
import { ActionIdCommandMapping } from '../model/resource/ActionIdCommandMapping';

export class ActionIdCommandMappingJsonParser {
    static async desirialize(json: any): Promise<ActionIdCommandMapping[]> {
        if (!json) {
            return [];
        }

        const actionIdCommandMappings = new Array<ActionIdCommandMapping>();
        const jsonObj = JSON.parse(json);
        for (let i = 0; i < jsonObj.length; i++) {
            const row = jsonObj[i];
            const actionIdCommandMapping = new ActionIdCommandMapping(row.intellij, row.vscode);
            actionIdCommandMappings.push(actionIdCommandMapping);
        }

        return actionIdCommandMappings;
    }
}


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Test.Utilities;
using Xunit;

namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Recommendations
{
    public class ModuleKeywordRecommenderTests : KeywordRecommenderTests
    {
        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotAtRoot_Interactive()
        {
            VerifyAbsence(SourceCodeKind.Script,
@"$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotAfterClass_Interactive()
        {
            VerifyAbsence(SourceCodeKind.Script,
@"class C { }
$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotAfterGlobalStatement_Interactive()
        {
            VerifyAbsence(SourceCodeKind.Script,
@"System.Console.WriteLine();
$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotAfterGlobalVariableDeclaration_Interactive()
        {
            VerifyAbsence(SourceCodeKind.Script,
@"int i = 0;
$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInUsingAlias()
        {
            VerifyAbsence(
@"using Foo = $$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInEmptyStatement()
        {
            VerifyAbsence(AddInsideMethod(
@"$$"));
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInAttributeInsideClass()
        {
            VerifyAbsence(
@"class C {
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInAttributeAfterAttributeInsideClass()
        {
            VerifyAbsence(
@"class C {
    [Foo]
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInAttributeAfterMethod()
        {
            VerifyAbsence(
@"class C {
    void Foo() {
    }
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInAttributeAfterProperty()
        {
            VerifyAbsence(
@"class C {
    int Foo {
        get;
    }
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInAttributeAfterField()
        {
            VerifyAbsence(
@"class C {
    int Foo;
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInAttributeAfterEvent()
        {
            VerifyAbsence(
@"class C {
    event Action<int> Foo;
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void InOuterAttribute()
        {
            VerifyKeyword(
@"[$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInOuterAttributeInNamespace()
        {
            VerifyAbsence(
@"namespace Foo {
     [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInParameterAttribute()
        {
            VerifyAbsence(
@"class C {
    void Foo([$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInPropertyAttribute()
        {
            VerifyAbsence(
@"class C {
    int Foo { [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInEventAttribute()
        {
            VerifyAbsence(
@"class C {
    event Action<int> Foo { [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInClassModuleParameters()
        {
            VerifyAbsence(
@"class C<[$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInDelegateModuleParameters()
        {
            VerifyAbsence(
@"delegate void D<[$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInMethodModuleParameters()
        {
            VerifyAbsence(
@"class C {
    void M<[$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInInterface()
        {
            VerifyAbsence(
@"interface I {
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInStruct()
        {
            VerifyAbsence(
@"struct S {
    [$$");
        }

        [WpfFact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
        public void NotInEnum()
        {
            VerifyAbsence(
@"enum E {
    [$$");
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

    <string name="pref_tapprofiles_id">tapprofiles</string>
    <string name="pref_tapprofiles_defvalue"></string>

    <string name="pref_keys_binding_id">keys_binding</string>
    <string name="pref_keys_binding_defvalue"></string>

</resources>


text:
<?php

use App\Events\LibraryChanged;
use App\Libraries\WatchRecord\InotifyWatchRecord;
use App\Models\Album;
use App\Models\Artist;
use App\Models\File;
use App\Models\Song;
use App\Services\Media;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Mockery as m;

class MediaTest extends TestCase
{
    use DatabaseTransactions, WithoutMiddleware;

    public function testSync()
    {
        $this->expectsEvents(LibraryChanged::class);

        $media = new Media();
        $media->sync($this->mediaPath);

        // Standard mp3 files under root path should be recognized
        $this->seeInDatabase('songs', [
            'path' => $this->mediaPath.'/full.mp3',
            // Track # should be recognized
            'track' => 5,
        ]);

        // Ogg files and audio files in subdirectories should be recognized
        $this->seeInDatabase('songs', ['path' => $this->mediaPath.'/subdir/back-in-black.ogg']);

        // GitHub issue #380. folder.png should be copied and used as the cover for files
        // under subdir/
        $song = Song::wherePath($this->mediaPath.'/subdir/back-in-black.ogg')->first();
        $this->assertNotNull($song->album->cover);

        // File search shouldn't be case-sensitive.
        $this->seeInDatabase('songs', ['path' => $this->mediaPath.'/subdir/no-name.MP3']);

        // Non-audio files shouldn't be recognized
        $this->notSeeInDatabase('songs', ['path' => $this->mediaPath.'/rubbish.log']);

        // Broken/corrupted audio files shouldn't be recognized
        $this->notSeeInDatabase('songs', ['path' => $this->mediaPath.'/fake.mp3']);

        // Artists should be created
        $this->seeInDatabase('artists', ['name' => 'Cuckoo']);
        $this->seeInDatabase('artists', ['name' => 'Koel']);

        // Albums should be created
        $this->seeInDatabase('albums', ['name' => 'Koel Testing Vol. 1']);

        // Albums and artists should be correctly linked
        $album = Album::whereName('Koel Testing Vol. 1')->first();
        $this->assertEquals('Koel', $album->artist->name);

        // Compilation albums, artists and songs must be recognized
        $song = Song::whereTitle('This song belongs to a compilation')->first();
        $this->assertNotNull($song->contributing_artist_id);
        $this->assertTrue($song->album->is_compilation);
        $this->assertEquals(Artist::VARIOUS_ID, $song->album->artist_id);

        $currentCover = $album->cover;

        $song = Song::orderBy('id', 'desc')->first();

        // Modified file should be recognized
        touch($song->path, $time = time());
        $media->sync($this->mediaPath);
        $song = Song::find($song->id);
        $this->assertEquals($time, $song->mtime);

        // Albums with a non-default cover should have their covers overwritten
        $this->assertEquals($currentCover, Album::find($album->id)->cover);
    }

    public function testForceSync()
    {
        $this->expectsEvents(LibraryChanged::class);

        $media = new Media();
        $media->sync($this->mediaPath);

        // Make some modification to the records
        $song = Song::orderBy('id', 'desc')->first();
        $originalTitle = $song->title;
        $originalLyrics = $song->lyrics;

        $song->update([
            'title' => "It's John Cena!",
            'lyrics' => 'Booom Wroooom',
        ]);

        // Resync without forcing
        $media->sync($this->mediaPath);

        // Validate that the changes are not lost
        $song = Song::orderBy('id', 'desc')->first();
        $this->assertEquals("It's John Cena!", $song->title);
        $this->assertEquals('Booom Wroooom', $song->lyrics);

        // Resync with force
        $media->sync($this->mediaPath, [], true);

        // All is lost.
        $song = Song::orderBy('id', 'desc')->first();
        $this->assertEquals($originalTitle, $song->title);
        $this->assertEquals($originalLyrics, $song->lyrics);
    }

    public function testSyncSelectiveTags()
    {
        $this->expectsEvents(LibraryChanged::class);

        $media = new Media();
        $media->sync($this->mediaPath);

        // Make some modification to the records
        $song = Song::orderBy('id', 'desc')->first();
        $originalTitle = $song->title;

        $song->update([
            'title' => "It's John Cena!",
            'lyrics' => 'Booom Wroooom',
        ]);

        // Sync only the selective tags
        $media->sync($this->mediaPath, ['title'], true);

        // Validate that the specified tags are changed, other remains the same
        $song = Song::orderBy('id', 'desc')->first();
        $this->assertEquals($originalTitle, $song->title);
        $this->assertEquals('Booom Wroooom', $song->lyrics);
    }

    public function testAlwaysSyncAllTagsIfFileIsNew()
    {
        $media = new Media();
        $media->sync($this->mediaPath);
        $song = Song::orderBy('id')->first();
        $song->delete();

        // Selectively sync only one tag,
        // but we still expect the whole song to be added back with all info
        $media->sync($this->mediaPath, ['track'], true);
        $this->seeInDatabase('songs', [
            'id' => $song->id,
            'lyrics' => $song->lyrics,
            'title' => $song->title,
            'track' => $song->track,
        ]);
    }

    public function testWatchSingleFileAdded()
    {
        $path = $this->mediaPath.'/blank.mp3';

        (new Media())->syncByWatchRecord(new InotifyWatchRecord("CLOSE_WRITE,CLOSE $path"));

        $this->seeInDatabase('songs', ['path' => $path]);
    }

    public function testWatchSingleFileDeleted()
    {
        $this->expectsEvents(LibraryChanged::class);

        $this->createSampleMediaSet();
        $song = Song::orderBy('id', 'desc')->first();

        (new Media())->syncByWatchRecord(new InotifyWatchRecord("DELETE {$song->path}"));

        $this->notSeeInDatabase('songs', ['id' => $song->id]);
    }

    public function testWatchDirectoryDeleted()
    {
        $this->expectsEvents(LibraryChanged::class);

        $media = new Media();
        $media->sync($this->mediaPath);

        $media->syncByWatchRecord(new InotifyWatchRecord("MOVED_FROM,ISDIR {$this->mediaPath}/subdir"));

        $this->notSeeInDatabase('songs', ['path' => $this->mediaPath.'/subdir/sic.mp3']);
        $this->notSeeInDatabase('songs', ['path' => $this->mediaPath.'/subdir/no-name.MP3']);
        $this->notSeeInDatabase('songs', ['path' => $this->mediaPath.'/subdir/back-in-black.mp3']);
    }

    public function testHtmlEntitiesInTags()
    {
        $getID3 = m::mock(getID3::class, [
            'analyze' => [
                'tags' => [
                    'id3v2' => [
                        'title' => ['水谷広実'],
                        'album' => ['小岩井こ Random'],
                        'artist' => ['佐倉綾音 Unknown'],
                    ],
                ],
                'encoding' => 'UTF-8',
                'playtime_seconds' => 100,
            ],
        ]);

        $info = (new File(__DIR__.'/songs/blank.mp3', $getID3))->getInfo();

        $this->assertEquals('佐倉綾音 Unknown', $info['artist']);
        $this->assertEquals('小岩井こ Random', $info['album']);
        $this->assertEquals('水谷広実', $info['title']);
    }

    public function testDotDirectories()
    {
        config(['koel.ignore_dot_files' => false]);
        $media = new Media();
        $media->sync($this->mediaPath);
        $this->seeInDatabase('albums', ['name' => 'Hidden Album']);

        config(['koel.ignore_dot_files' => true]);
        $media->sync($this->mediaPath);
        $this->notSeeInDatabase('albums', ['name' => 'Hidden Album']);
    }
}


text:
import {SmoothScroll} from "./smooth-scroll";
export {SmoothScroll} from "./smooth-scroll";

export function configure(aurelia,cb){
  aurelia.globalResources("./smooth-scroll");
  var config = SmoothScroll.defaultConfig;
  if(cb !== undefined && typeof(cb) === 'function') cb(config);
}


text:
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using NUnit.Framework;
using ZptSharp.Rendering;

namespace ZptSharp.Dom
{
    [TestFixture,Parallelizable]
    public class XmlDocumentTests
    {
        [Test]
        public void AddCommentToBeginningOfDocument_adds_the_comment()
        {
            var xml = "
Hello
";
            var sut = GetSut(xml);

            sut.AddCommentToBeginningOfDocument("This is a comment");

            Assert.That(GetXml(sut.NativeDocument), Is.EqualTo(@"<?xml version=""1.0"" encoding=""utf-8""?>

Hello

"));
        }

        [Test]
        public void ReplaceRootNode_can_replace_the_root_node_in_the_doc()
        {
            var xml = "
Hello
";
            var sut = GetSut(xml);
            var replacement = sut.RootNode.ChildNodes.First();

            sut.ReplaceRootNode(replacement);

            Assert.That(GetXml(sut.NativeDocument), Is.EqualTo(@"<?xml version=""1.0"" encoding=""utf-8""?>

Hello

"));
        }

        XmlDocument GetSut(string xml)
        {
            var native = XDocument.Parse(xml);
            return new XmlDocument(native, new UnknownSourceInfo());
        }

        string GetXml(XDocument native)
        {
            using (var stream = new MemoryStream())
            {
                native.Save(stream);

                stream.Position = 0;
                using (var reader = new StreamReader(stream))
                    return reader.ReadToEnd();
            }
        }
    }
}


text:
import {Key} from "./Key";

/**
 * Gamepad provides basic support for gamepads.
 *
 * Some gamepads require a button press to being detected.
 *
 * Gamepad implementation across browsers is still fragmented, every browser implements it a bit differently, so test it on every target before deploying an application using it.
 *
 * For more information about the Gamepad API state take look at the W3C Gamepad API page https:// www.w3.org/TR/gamepad/.
 *
 * @class Gamepad
 * @constructor
 */
function Gamepad()
{
	/**
	 * Vendor code of the gamepad device.
	 *
	 * @attribute vendor
	 * @type {number}
	 */
	this.vendor = -1;

	/**
	 * Product code of the gamepad device.
	 *
	 * @attribute product
	 * @type {number}
	 */
	this.product = -1;

	/**
	 * Connected state of the gamepad.
	 *
	 * @attribute connected
	 * @type {boolean}
	 */
	this.connected = false;

	this.gamepad = null;

	/**
	 * Gamepad buttons with their associated state.
	 *
	 * Should be different for every gamepad.
	 *
	 * @attribute buttons
	 * @type {Array}
	 */
	this.buttons = [];

	var gamepads = navigator.getGamepads();
	for(var i = 0; i < gamepads.length; i++)
	{
		if(gamepads[i] !== null)
		{
			this.setGamepad(gamepads[i]);
			break;
		}
	}

	if(this.gamepad === null)
	{
		console.error("No gamepad found");
	}
}

/**
 * Set which gamepad should be used by this Gamepad instance.
 *
 * Can be used to override the gamepad attached to this object and enable multiple gamepad support.
 *
 * @param {Object} Browser gamepad object.
 * @method setGamepad
 */
Gamepad.prototype.setGamepad = function(gamepad)
{
	if(gamepad !== undefined && gamepad !== null)
	{
		// Store gamepad and its index
		this.index = gamepad.index;
		this.gamepad = gamepad;

		// Create and initialize buttons
		this.buttons = [];
		for(var i = 0; i < gamepad.buttons.length; i++)
		{
			this.buttons.push(new Key());
		}

		// Try to get the device vendor and product id
		this.setProductVendor(gamepad);
		this.connected = true;
	}
	else
	{
		console.warn("nunuStudio: No gamepad found");
		this.disconnect();
	}
};

/**
 * Disconnect this gamepad object.
 *
 * @method disconnect
 */
Gamepad.prototype.disconnect = function()
{
	this.vendor = -1;
	this.product = -1;
	this.connected = false;

	this.gamepad = null;
	this.buttons = [];
};

/**
 * Get vendor id and product id for the connected gamepad.
 *
 * @method setProductVendor
 * @param {Object} gamepad Gamepad object.
 */
Gamepad.prototype.setProductVendor = function(gamepad)
{
	// Chrome
	try
	{
		var temp = gamepad.id.split(":");

		this.vendor = temp[1].split(" ")[1];
		this.product = temp[2].replace(" ", "").replace(")", "");

		return;
	}
	catch(e){}

	// Firefox
	try
	{
		var temp = gamepad.id.split("-");

		this.vendor = temp[0];
		this.product = temp[1];

		return;
	}
	catch(e){}
};

/**
 * Update the gamepad state.
 *
 * Should be called every frame before checking the buttons values.
 *
 * @method update
 */
Gamepad.prototype.update = function(delta)
{
	this.gamepad = navigator.getGamepads()[this.index];

	if(this.gamepad !== undefined)
	{
		for(var i = 0; i < this.buttons.length; i++)
		{
			this.buttons[i].update(this.gamepad.buttons[i].pressed ? Key.DOWN : Key.UP);
		}
	}
};

/**
 * Get analog button value between 0 and 1.
 *
 * If the button is not analog enabled it will return 0 if button is not pressed or 1 if the button is pressed.
 *
 * @method getAnalogueButton
 * @param {number} button Button to get analogue value from.
 * @return {number} Value between 0 and 1 depending how hard the button is pressed.
 */
Gamepad.prototype.getAnalogueButton = function(button)
{
	return (button > this.buttons.length || button < 0) ? 0 : this.gamepad.buttons[button].value;
};

/**
 * Get axis value between -1 and 1 depending on the direction.
 *
 * @method getAxis
 * @param {number} Axis to get value from.
 * @return {number} Value between -1 and 1 depending on the axis direction
 */
Gamepad.prototype.getAxis = function(axis)
{
	return (axis > this.gamepad.axes.length || axis < 0) ? 0 : this.gamepad.axes[axis];
};

/**
 * Check if a button exists in the connected Gamepad.
 *
 * @method buttonExists
 * @param {number} button Button to check status of
 * @return {boolean} True if button exists in the connected gamepad.
 */
Gamepad.prototype.buttonExists = function(button)
{
	return button >= 0 && button < this.buttons.length;
};

/**
 * Check if gamepad button is currently pressed.
 *
 * @method buttonPressed
 * @param {number} button Button to check status of
 * @return {boolean} True if button is currently pressed
 */
Gamepad.prototype.buttonPressed = function(button)
{
	return this.buttons[button] ? this.buttons[button].pressed : false;
};

/**
 * Check if a gamepad button was just pressed.
 *
 * @method buttonJustPressed
 * @param {number} button Button to check status of
 * @return {boolean} True if button was just pressed
 */
Gamepad.prototype.buttonJustPressed = function(button)
{
	return this.buttons[button] ? this.buttons[button].justPressed : false;
};

/**
 * Check if a gamepad button was just released.
 *
 * @method buttonJustReleased
 * @param {number} button Button to check status of
 * @return {boolean} True if button was just released
 */
Gamepad.prototype.buttonJustReleased = function(button)
{
	return this.buttons[button] ? this.buttons[button].justReleased : false;
};

/**
 * Gamepad LEFT button.
 * @type {number}
 * @attribute LEFT
 */
Gamepad.LEFT = 14;

/**
 * Gamepad RIGHT button.
 * @type {number}
 * @attribute RIGHT
 */
Gamepad.RIGHT = 15;

/**
 * Gamepad DOWN button.
 * @type {number}
 * @attribute DOWN
 */
Gamepad.DOWN = 13;

/**
 * Gamepad UP button.
 * @type {number}
 * @attribute UP
 */
Gamepad.UP = 12;

/**
 * Gamepad SELECT button.
 * @type {number}
 * @attribute SELECT
 */
Gamepad.SELECT = 8;

/**
 * Gamepad START button.
 * @type {number}
 * @attribute START
 */
Gamepad.START = 9;

/**
 * Gamepad HOME button.
 * @type {number}
 * @attribute HOME
 */
Gamepad.HOME = 16;

/**
 * Gamepad LEFT_TRIGGER_A button.
 * @type {number}
 * @attribute LEFT_TRIGGER_A
 */
Gamepad.LEFT_TRIGGER_A = 4;

/**
 * Gamepad LEFT_TRIGGER_B button.
 * @type {number}
 * @attribute LEFT_TRIGGER_B
 */
Gamepad.LEFT_TRIGGER_B = 6;

/**
 * Gamepad RIGHT_TRIGGER_A button.
 * @type {number}
 * @attribute RIGHT_TRIGGER_A
 */
Gamepad.RIGHT_TRIGGER_A = 5;

/**
 * Gamepad RIGHT_TRIGGER_B button.
 * @type {number}
 * @attribute RIGHT_TRIGGER_B
 */
Gamepad.RIGHT_TRIGGER_B = 7;

/**
 * Gamepad L1 button.
 * @type {number}
 * @attribute L1
 */
Gamepad.L1 = 4;

/**
 * Gamepad L2 button.
 * @type {number}
 * @attribute L2
 */
Gamepad.L2 = 6;

/**
 * Gamepad L3 button.
 * @type {number}
 * @attribute L3
 */
Gamepad.L3 = 6;

/**
 * Gamepad R1 button.
 * @type {number}
 * @attribute R1
 */
Gamepad.R1 = 5;

/**
 * Gamepad R2 button.
 * @type {number}
 * @attribute R2
 */
Gamepad.R2 = 7;

/**
 * Gamepad R3 button.
 * @type {number}
 * @attribute R3
 */
Gamepad.R3 = 11;

/**
 * Gamepad A button.
 * @type {number}
 * @attribute A
 */
Gamepad.A = 0;

/**
 * Gamepad B button.
 * @type {number}
 * @attribute B
 */
Gamepad.B = 1;

/**
 * Gamepad C button.
 * @type {number}
 * @attribute C
 */
Gamepad.C = 2;

/**
 * Gamepad D button.
 * @type {number}
 * @attribute D
 */
Gamepad.D = 3;

/**
 * Gamepad X button.
 * @type {number}
 * @attribute X
 */
Gamepad.X = 2;

/**
 * Gamepad Y button.
 * @type {number}
 * @attribute Y
 */
Gamepad.Y = 3;

/**
 * Gamepad LEFT_ANALOGUE_BUT axis.
 * @type {number}
 * @attribute LEFT_ANALOGUE_BUT
 */
Gamepad.LEFT_ANALOGUE_BUT = 10;

/**
 * Gamepad LEFT_ANALOGUE_HOR axis.
 * @type {number}
 * @attribute LEFT_ANALOGUE_HOR
 */
Gamepad.LEFT_ANALOGUE_HOR = 0;

/**
 * Gamepad LEFT_ANALOGUE_VERT axis.
 * @type {number}
 * @attribute LEFT_ANALOGUE_VERT
 */
Gamepad.LEFT_ANALOGUE_VERT = 1;

/**
 * Gamepad RIGHT_ANALOGUE_BUT axis.
 * @type {number}
 * @attribute RIGHT_ANALOGUE_BUT
 */
Gamepad.RIGHT_ANALOGUE_BUT = 11;

/**
 * Gamepad RIGHT_ANALOGUE_HOR axis.
 * @type {number}
 * @attribute RIGHT_ANALOGUE_HOR
 */
Gamepad.RIGHT_ANALOGUE_HOR = 2;

/**
 * Gamepad RIGHT_ANALOGUE_VERT axis.
 * @type {number}
 * @attribute RIGHT_ANALOGUE_VERT
 */
Gamepad.RIGHT_ANALOGUE_VERT = 3;

export {Gamepad};


text:
Sets default column values for a document library
## Syntax
```powershell
Set-PnPDefaultColumnValues -Field <FieldPipeBind>
                           -Value <String[]>
                           -List <ListPipeBind>
                           [-Folder <String>]
                           [-Web <WebPipeBind>]
```

## Detailed Description
Sets default column values for a document library, per folder, or for the root folder if the folder parameter has not been specified. Supports both text and taxonomy fields.

## Parameters
Parameter|Type|Required|Description
---------|----|--------|-----------
|Field|FieldPipeBind|True|The internal name, id or a reference to a field|
|List|ListPipeBind|True|The ID, Name or Url of the list.|
|Value|String[]|True|A list of values. In case of a text field the values will be concatenated, separated by a semi-colon. In case of a taxonomy field multiple values will added. In case of people field multiple values will be added.|
|Folder|String|False|A library relative folder path, if not specified it will set the default column values on the root folder of the library ('/')|
|Web|WebPipeBind|False|The web to apply the command to. Omit this parameter to use the current web.|
## Examples

### Example 1
```powershell
PS:> Set-PnPDefaultColumnValues -List Documents -Field TaxKeyword -Value "Company|Locations|Stockholm"
```
Sets a default value for the enterprise keywords field on a library to a term called "Stockholm", located in the "Locations" term set, which is part of the "Company" term group

### Example 2
```powershell
PS:> Set-PnPDefaultColumnValues -List Documents -Field TaxKeyword -Value "15c4c4e4-4b67-4894-a1d8-de5ff811c791"
```
Sets a default value for the enterprise keywords field on a library to a term with the id "15c4c4e4-4b67-4894-a1d8-de5ff811c791". You need to ensure the term is valid for the field.

### Example 3
```powershell
PS:> Set-PnPDefaultColumnValues -List Documents -Field MyTextField -Value "DefaultValue"
```
Sets a default value for the MyTextField text field on a library to a value of "DefaultValue"

### Example 4
```powershell
PS:> Set-PnPDefaultColumnValues -List Documents -Field MyPeopleField -Value "1;#Foo Bar"
```
Sets a default value for the MyPeopleField people field on a library to a value of "Foo Bar" using the id from the user information list.

### Example 5
```powershell
PS:> $user = New-PnPUser -LoginName foobar@contoso.com
PS:> Set-PnPDefaultColumnValues -List Documents -Field MyPeopleField -Value "$($user.Id);#$($user.LoginName)"
```
Sets a default value for the MyPeopleField people field on a library to a value of "Foo Bar" using the id from the user information list.

### Example 6
```powershell
PS:> $user1 = New-PnPUser -LoginName user1@contoso.com
PS:> $user2 = New-PnPUser -LoginName user2@contoso.com
PS:> Set-PnPDefaultColumnValues -List Documents -Field MyMultiPeopleField -Value "$($user1.Id);#$($user1.LoginName)","$($user2.Id);#$($user2.LoginName)"
```
Sets a default value for the MyMultiPeopleField people field on a library to a value of "User 1" and "User 2" using the id from the user information list.


text:
#include "lib/sensors.h"
#include "dev/rs232.h"
#include "dev/serial-line.h"
#include "lib/simEnvChange.h"
#include <string.h>
#include <stdio.h>

const struct simInterface rs232_interface;

#define SERIAL_BUF_SIZE 1024

// COOJA variables
char simSerialReceivingData[SERIAL_BUF_SIZE];
int simSerialReceivingLength;
char simSerialReceivingFlag;

static int (* input_handler)(unsigned char) = NULL;

/*-----------------------------------------------------------------------------------*/
void rs232_init(void) { }
/*-----------------------------------------------------------------------------------*/
void rs232_set_speed(unsigned char speed) { }
/*-----------------------------------------------------------------------------------*/
void
rs232_set_input(int (*f)(unsigned char))
{
  input_handler = f;
}
/*-----------------------------------------------------------------------------------*/
void rs232_send(char c) {
  printf("%c", c);
}
/*-----------------------------------------------------------------------------------*/
void
rs232_print(char *message)
{
  printf("%s", message);
}
/*-----------------------------------------------------------------------------------*/
void
slip_arch_writeb(unsigned char c)
{
  simlog_char(c);
}
/*-----------------------------------------------------------------------------------*/
static void
doInterfaceActionsBeforeTick(void)
{
  int i;

  if (!simSerialReceivingFlag) {
    return;
  }

  if (simSerialReceivingLength == 0) {
    /* Error, should not be zero */
    simSerialReceivingFlag = 0;
    return;
  }

  /* Notify specified rs232 handler */
  if(input_handler != NULL) {
    for (i=0; i < simSerialReceivingLength; i++) {
      input_handler(simSerialReceivingData[i]);
    }
  } else {
    /* Notify serial process */
    for (i=0; i < simSerialReceivingLength; i++) {
      serial_line_input_byte(simSerialReceivingData[i]);
    }
    serial_line_input_byte(0x0a);
  }

  simSerialReceivingLength = 0;
  simSerialReceivingFlag = 0;
}
/*-----------------------------------------------------------------------------------*/
static void
doInterfaceActionsAfterTick(void)
{
}
/*-----------------------------------------------------------------------------------*/

SIM_INTERFACE(rs232_interface,
	      doInterfaceActionsBeforeTick,
	      doInterfaceActionsAfterTick);


text:
import gc
import errno
import gc
import grp
import itertools
import sys
import os
import os.path
import pprint
import pwd
import signal
import socket
import re
import tempfile
import types
import unittest

from testrunner.decorators import context
from testrunner import testhandler

ConaryTestSuite = testhandler.ConaryTestSuite

from testcase import TestCase, todo
from testrunner.output import SkipTestException, DebugTestRunner

from testrunner.testhandler import Loader
from testutils import sock_utils

# Every module uses findPorts from here
findPorts = sock_utils.findPorts

global _handler
_handler = None
global _conaryDir
_conaryDir = None

# gets a temporary directory that is made only of lowercase letters
# for MySQL's benefit
def getTempDir(prefix, dir=None):
    while True:
        oldPath = tempfile.mkdtemp(prefix=prefix, dir=dir)
        oldDir, oldName = os.path.split(oldPath)
        newName = oldName.lower()
        newPath = os.path.join(oldDir, newName)
        try:
            os.rename(oldPath, newPath)
        except OSError, err:
            if err.args[0] == errno.EEXIST:
                # try again
                os.rmdir(oldPath)
                continue
            raise
        else:
            return newPath

def getTestPath(testsuiteModule = None):
    # By default, use the standard setup
    if testsuiteModule is None:
        testsuiteModule = 'testsuite'
    invokedAs = sys.argv[0]
    if invokedAs.find("/") != -1:
        if invokedAs[0] != "/":
            invokedAs = os.getcwd() + "/" + invokedAs
        path = os.path.dirname(invokedAs)
    else:
        path = os.getcwd()

    testPath = os.path.realpath(path)
    # find the top of the test directory in the full path - this
    # sets the right test path even when testsuite.setup() is called
    # from a testcase in a subdirectory of the testPath
    if sys.modules.has_key(testsuiteModule):
        testPath = os.path.join(testPath,
                        os.path.dirname(sys.modules[testsuiteModule].__file__))
    return testPath

# backwards compatible code
def getHandlerClass(suiteClass_, getCoverageDirsFn, getExcludeDirsFn=None,
                    sortTestsFn=None):
    class GeneratedHandlerClass(TestSuiteHandler):
        suiteClass = suiteClass_
        def sortTests(self, tests):
            if sortTestsFn:
                return sortTestsFn(tests)
            return tests

        def getCoverageDirs(self, environ):
            return getCoverageDirsFn(self, environ)

        def getCoverageExclusions(self, environ):
	    if getExcludeDirsFn:
                return getExcludeDirsFn(self, environ)
	    return []

    return GeneratedHandlerClass

class TestSuiteHandler(testhandler.TestSuiteHandler):

    suiteClass = unittest.TestSuite

    def __init__(self, individual, testPath=None,
            # DEPRECATED:
            topdir=None, conaryDir=None):

        global _handler
        _handler = self
        class CFG:
            pass
        cfg = CFG()
        cfg.isIndividual = individual
        cfg.cleanTestDirs = not individual
        cfg.testPath = testPath
        testhandler.TestSuiteHandler.__init__(self, cfg, None, self.suiteClass)

    def getCoverageExclusions(self, environ):
        return []

    def getCoverageDirs(self, environ):
        return [os.path.dirname(sys.modules['testsuite'].__file__)]

def main(argv=[], individual=True, handlerClass=TestSuiteHandler):
    from conary.lib import util
    sys.excepthook = util.genExcepthook(True, catchSIGUSR1=False)
    handler = handlerClass(individual=individual, topdir=getTestPath(),
                           testPath=getTestPath(), conaryDir=getConaryDir())
    print "This process PID:", os.getpid()
    results = handler.main(argv)
    if results is None:
        sys.exit(0)
    sys.exit(not results.wasSuccessful())


text:
@interface MEMenuViewController ()

@end

@implementation MEMenuViewController

//@synthesize red, green, blue;
//@synthesize myValue1 = myValue2;

- (IBAction)unwindToMenuViewController:(UIStoryboardSegue *)segue { }
//- (IBAction)unwindToMenuViewController:(UIStoryboardSegue *)segue sender:(id)sender {
//    if ([segue.identifier isEqualToString:@"mySegue"]) {
//        ViewController *viewCon = segue.destinationViewController;
//        viewCon.myValue1 = @"test";
//}
- (void)viewDidLoad{
    [super viewDidLoad];

    //self.title = @"color palette";
}

// セル数を指定
//- (NSInteger)tableView:(UITableView *)aTableView
// numberOfRowsInSection:(NSInteger)section {

// 黒・赤・緑・青の4行とする
//    return 5;
//}

// セルを生成するとき
//- (UITableViewCell *)tableView:(UITableView *)tableView
//         cellForRowAtIndexPath:(NSIndexPath *)indexPath {

//    static NSString *CellIdentifier = @"CellIdentifier";
//    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
//    if (cell == nil) {
//        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefaultreuseIdentifier:CellIdentifier] autorelease];
//        cell.accessoryType = UITableViewCellAccessoryNone;
//    }

// 行選択時にハイライト表示しないよう設定(見やすくするため)
//    cell.selectionStyle = UITableViewCellSelectionStyleNone;

//    return cell;
//}

//セルが選択された時 indexpathをもとにViewControllerに表示される点の色を変えるようにする
//- (void)tableView :(UITableView *)aTableView
//didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

// 線の色を「黒」にセット
//if (indexPath.row == 0) {
//    detailViewController.red = 0.0;
//    detailViewController.green = 0.0;
//    detailViewController.blue = 0.0;
//}
// 線の色を「赤」にセット
//else if (indexPath.row == 1) {
//    detailViewController.red = 1.0;
//    detailViewController.green = 0.0;
//    detailViewController.blue = 0.0;
//}
// 線の色を「緑」にセット
//else if (indexPath.row == 2) {
//    detailViewController.red = 0.0;
//    detailViewController.green = 1.0;
//    detailViewController.blue = 0.0;
//}
// 線の色を「青」にセット
//else if (indexPath.row == 3) {
//    detailViewController.red = 0.0;
//    detailViewController.green = 0.0;
//   detailViewController.blue = 1.0;
//}
//
//else if (indexPath.row == 4){
//    detailViewController.red = 1.0;
//    detailViewController.green = 0.0;
//    detailViewController.blue = 1.0;
//}
//}

// システムイベントがタッチイベントをキャンセルしたときに実行されるメソッド
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
    NSLog(@"touches count : %d (touchesCancelled:withEvent:)", [touches count]);
}

@end


text:
package dao;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.TypedQuery;

import models.Article;
import models.ArticleDto;
import models.ArticlesDto;
import models.User;

import com.google.common.collect.Lists;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.persist.Transactional;

public class ArticleDao {

    @Inject
    Provider<EntityManager> entitiyManagerProvider;

    @Transactional
    public ArticlesDto getAllArticles() {

        EntityManager entityManager = entitiyManagerProvider.get();

        TypedQuery<Article> query= entityManager.createQuery("SELECT x FROM Article x", Article.class);
        List<Article> articles = query.getResultList();

        ArticlesDto articlesDto = new ArticlesDto();
        articlesDto.articles = articles;

        return articlesDto;

    }

    @Transactional
    public Article getFirstArticleForFrontPage() {

        EntityManager entityManager = entitiyManagerProvider.get();

        Query q = entityManager.createQuery("SELECT x FROM Article x ORDER BY x.postedAt DESC");
        Article article = (Article) q.setMaxResults(1).getSingleResult();

        return article;

    }

    @Transactional
    public List<Article> getOlderArticlesForFrontPage() {

        EntityManager entityManager = entitiyManagerProvider.get();

        Query q = entityManager.createQuery("SELECT x FROM Article x ORDER BY x.postedAt DESC");
        List<Article> articles = (List<Article>) q.setFirstResult(1).setMaxResults(10).getResultList();

        return articles;

    }

    @Transactional
    public Article getArticle(Long id) {

        EntityManager entityManager = entitiyManagerProvider.get();

        Query q = entityManager.createQuery("SELECT x FROM Article x WHERE x.id = :idParam");
        Article article = (Article) q.setParameter("idParam", id).getSingleResult();

        return article;

    }

    /**
     * Returns false if user cannot be found in database.
     */
    @Transactional
    public boolean postArticle(String username, ArticleDto articleDto) {

        EntityManager entityManager = entitiyManagerProvider.get();

        Query query = entityManager.createQuery("SELECT x FROM User x WHERE username = :usernameParam");
        User user = (User) query.setParameter("usernameParam", username).getSingleResult();

        if (user == null) {
            return false;
        }

        Article article = new Article(user, articleDto.title, articleDto.content);
        entityManager.persist(article);

        return true;

    }

}


text:
{-
Jacob Albers
CMSC 22311 - Functional Systems in Haskell
Instructors: Stuart Kurtz & Jakub Tucholski
2015-05-28
-}

--An additional module for defining functions
--directly related to the Client.
--All functions are needed by Chat.hs, so
--all are included within module.
module Client  where

import Control.Applicative
import Control.Monad (forever)
import Control.Concurrent.STM
import System.IO (hPutStrLn, hGetLine, Handle)

--A message can either be:
--1 >> a post by a user containing their
--message and their username
--2 >> an update from the server on the
--state of the chat, i.e. when a new client
--is added or drops the chat.
data Message = Post Username String
				| Update String
				deriving (Show, Eq, Ord)

type Username = Int

--a client is composed of the following:
--1 >> A username, which is a number
--2 >> A handle to be referred to when
--placing output
--3 >> A channel for broadcasting to
data Client =
	Client
	{ username :: Username
	, handle :: Handle
	, channel :: TChan (Message)
	}

--build Client from component pieces
mkClient :: Username -> Handle -> TChan (Message) -> IO Client
mkClient u h c =
 	Client <$> return u <*> return h <*> (atomically (dupTChan c))

--The issuer function continuously takes strings written by a
--client to their handle and moves it to their channel for
--processing by the receiver function - marking the message with
--the issuer's username.
issuer :: Client -> IO ()
issuer Client { username = u
							, handle = h
							, channel = c
							} = forever $ do
    line <- hGetLine h
    let msg = Post u line
    atomically $ writeTChan c msg

--The receiver continouusly checks the client's channel for new
--messages. When one is encountered, it delivers the message
--to the client's handle.
receiver :: Client -> IO ()
receiver client@Client { channel = c
										 	 } = forever $ do
  msg <- atomically $ readTChan c
  deliverMessage client msg

--deliverMessage composes and delivers the final form of a message
--to a particular client
deliverMessage :: Client -> Message -> IO ()
deliverMessage Client {username = u
										, handle = h
										}
	message = do
    hPutStrLn h $
        case message of
            Post user msg -> if (user /= u)
            	then (show user) ++ ": " ++ msg
            	else ""
            Update msg    ->  msg


text:
from oslo_utils import timeutils
from tempest.api.identity import base
from tempest.lib import decorators

class TokensTest(base.BaseIdentityV2Test):
    """Test tokens in identity v2 API"""

    @decorators.idempotent_id('65ae3b78-91ff-467b-a705-f6678863b8ec')
    def test_create_token(self):
        """Test creating token for user via v2 API"""
        token_client = self.non_admin_token_client

        # get a token for the user
        creds = self.os_primary.credentials
        username = creds.username
        password = creds.password
        tenant_name = creds.tenant_name

        body = token_client.auth(username, password, tenant_name)

        self.assertNotEmpty(body['token']['id'])
        self.assertIsInstance(body['token']['id'], str)

        now = timeutils.utcnow()
        expires_at = timeutils.normalize_time(
            timeutils.parse_isotime(body['token']['expires']))
        self.assertGreater(expires_at, now)

        self.assertEqual(body['token']['tenant']['id'],
                         creds.tenant_id)
        self.assertEqual(body['token']['tenant']['name'],
                         tenant_name)

        self.assertEqual(body['user']['id'], creds.user_id)


text:
package org.apache.cassandra.distributed.test;

import org.apache.cassandra.distributed.impl.RowUtil;
import org.junit.Assert;
import org.junit.Test;

import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.SimpleStatement;
import com.datastax.driver.core.Statement;
import org.apache.cassandra.distributed.api.ICluster;

import static org.apache.cassandra.distributed.api.Feature.GOSSIP;
import static org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL;
import static org.apache.cassandra.distributed.api.Feature.NETWORK;
import static org.apache.cassandra.distributed.shared.AssertUtils.*;

// TODO: this test should be removed after running in-jvm dtests is set up via the shared API repository
public class NativeProtocolTest extends TestBaseImpl
{

    @Test
    public void withClientRequests() throws Throwable
    {
        try (ICluster ignored = init(builder().withNodes(3)
                                              .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL))
                                              .start()))
        {

            try (com.datastax.driver.core.Cluster cluster = com.datastax.driver.core.Cluster.builder().addContactPoint("127.0.0.1").build();
                 Session session = cluster.connect())
            {
                session.execute("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck int, v int, PRIMARY KEY (pk, ck));");
                session.execute("INSERT INTO " + KEYSPACE + ".tbl (pk, ck, v) values (1,1,1);");
                Statement select = new SimpleStatement("select * from " + KEYSPACE + ".tbl;").setConsistencyLevel(ConsistencyLevel.ALL);
                final ResultSet resultSet = session.execute(select);
                assertRows(RowUtil.toObjects(resultSet), row(1, 1, 1));
                Assert.assertEquals(3, cluster.getMetadata().getAllHosts().size());
            }
        }
    }

    @Test
    public void withCounters() throws Throwable
    {
        try (ICluster ignored = init(builder().withNodes(3)
                                              .withConfig(config -> config.with(GOSSIP, NETWORK, NATIVE_PROTOCOL))
                                              .start()))
        {
            final com.datastax.driver.core.Cluster cluster = com.datastax.driver.core.Cluster.builder().addContactPoint("127.0.0.1").build();
            Session session = cluster.connect();
            session.execute("CREATE TABLE " + KEYSPACE + ".tbl (pk int, ck counter, PRIMARY KEY (pk));");
            session.execute("UPDATE " + KEYSPACE + ".tbl set ck = ck + 10 where pk = 1;");
            Statement select = new SimpleStatement("select * from " + KEYSPACE + ".tbl;").setConsistencyLevel(ConsistencyLevel.ALL);
            final ResultSet resultSet = session.execute(select);
            assertRows(RowUtil.toObjects(resultSet), row(1, 10L));
            Assert.assertEquals(3, cluster.getMetadata().getAllHosts().size());
            session.close();
            cluster.close();
        }
    }
}


text:
import {Component, ViewEncapsulation, ViewChild, OnInit, Input} from "@angular/core";
import {LocalDataSource} from "ng2-smart-table";
import {FormGroup, FormBuilder} from "@angular/forms";
import {CrudService} from "../../../services/crud.service";
import {Router} from "@angular/router";
import {ModalDirective} from "ng2-bootstrap";
import {Pumpa} from "./pumpa.data";
import {Vodozahvat} from "../vodozahvat/vodozahvat.data";

@Component({
  selector: 'isem-vodozahvat-pumpa',
  encapsulation: ViewEncapsulation.None,
  templateUrl: 'pumpa.component.html',
  styleUrls: ['../../styles/table.component.scss']
})
export class VodozahvatPumpaComponent implements OnInit  {
  @ViewChild('childModal') childModal: ModalDirective;
  @Input() vodozahvat: Vodozahvat;

  pumpa: Pumpa = new Pumpa();
  brisanjeId: number;
  izbor: boolean = false;

  source: LocalDataSource = new LocalDataSource();

  myForm: FormGroup;

  settings = {
    add: {
      addButtonContent: ''
    },
    edit: {
      editButtonContent: ''
    },
    delete: {
      deleteButtonContent: ''
    },
    mode: 'external',
    actions: {
      columnTitle: ''
    },
    noDataMessage: 'Podaci nisu pronađeni',
    columns: {
      tip: {
        title: 'Tip',
        type: 'string'
      },
      proizvodjac: {
        title: 'Proizvođač',
        type: 'string'
      },
      snaga: {
        title: 'Snaga',
        type: 'string'
      }
    }
  };

  constructor(private crudService: CrudService, private fb: FormBuilder, private router: Router) {
    this.myForm = this.fb.group({
      id: [''],
      tip: [''],
      proizvodjac: [''],
      snaga: [''],
      version: ['']
    });
  }

  ngOnInit() {
    this.getData();
  }

  getData() {
    this.crudService.getData("vodozahvat_pumpa/sve?vodozahvat_id=" + this.vodozahvat.id).subscribe(
      data => {this.source.load(data); console.log(data);},
      error => {console.log(error); this.router.navigate(['/login']);}
    );
  }

  onCreate(): void{
    this.pumpa = new Pumpa();
    this.pumpa.vodozahvat = this.vodozahvat;
    this.izbor = true;
  }

  onEdit(event): void{
    this.pumpa = new Pumpa();
    this.crudService.getSingle("vodozahvat_pumpa/jedan?id="+event.data.id).subscribe(
      data => {this.pumpa = data;
        console.log(data);
        this.izbor = true;
      },
      error => {console.log(error); });

    this.source.setFilter([{ field: 'naziv', search: '' }]);
  }

  onCancel() {
    this.getData();
    this.izbor = false;
  }

  onSubmit() {
    this.crudService.sendData("vodozahvat_pumpa", this.pumpa)
      .subscribe(
        data => {console.log(data); this.getData();},
        error => console.log(error)
      );

    this.izbor = false;
    this.pumpa = new Pumpa();
  }

  onDelete(event){
    this.brisanjeId = event.data.id;
    this.showChildModal();
  }

  onDeleteConfirm() {
    this.crudService.delete("vodozahvat_pumpa", this.brisanjeId)
      .subscribe(
        data => {console.log(data); this.getData();},
        error => console.log(error)
      );

    this.hideChildModal();
  }

  showChildModal(): void {
    this.childModal.show();
  }

  hideChildModal(): void {
    this.childModal.hide();
  }
}


text:
var express = require('express');
var app = express();

// app.get('/', function(req, res){
//   res.send('Server is working');
// });

app.use(express.static(__dirname + '/'));

app.use(errorHandler);

app.listen(3000);
console.log('Listening on port 3000');

function errorHandler(err, req, res, next) {
  res.status(500);
  res.render('error', { error: err });
}