text:
#ifndef __MML_PLATFROM_H_
#define __MML_PLATFROM_H_

namespace MathML
{
    /* Initial platform/compiler-related stuff to set.
    */
#define MML_PLATFORM_WIN32 1
#define MML_PLATFORM_LINUX 2
#define MML_PLATFORM_APPLE 3

#define MML_COMPILER_MSVC 1
#define MML_COMPILER_GNUC 2
#define MML_COMPILER_BORL 3

#define MML_ENDIAN_LITTLE 1
#define MML_ENDIAN_BIG 2

#define MML_ARCHITECTURE_32 1
#define MML_ARCHITECTURE_64 2

    /* Finds the compiler type and version.
    */
#if defined( _MSC_VER )
#   define MML_COMPILER MML_COMPILER_MSVC
#   define MML_COMP_VER _MSC_VER

#elif defined( __GNUC__ )
#   define MML_COMPILER MML_COMPILER_GNUC
#   define MML_COMP_VER (((__GNUC__)*100) + \
        (__GNUC_MINOR__*10) + \
        __GNUC_PATCHLEVEL__)

#elif defined( __BORLANDC__ )
#   define MML_COMPILER MML_COMPILER_BORL
#   define MML_COMP_VER __BCPLUSPLUS__

#else
#   pragma error "No known compiler. Abort! Abort!"

#endif

    /* See if we can use __forceinline or if we need to use __inline instead */
#if MML_COMPILER == MML_COMPILER_MSVC
#   if MML_COMP_VER >= 1200
#       define FORCEINLINE __forceinline
#   endif
#elif defined(__MINGW32__)
#   if !defined(FORCEINLINE)
#       define FORCEINLINE __inline
#   endif
#else
#   define FORCEINLINE __inline
#endif

    /* Finds the current platform */

#if defined( __WIN32__ ) || defined( _WIN32 )
#   define MML_PLATFORM MML_PLATFORM_WIN32

#elif defined( __APPLE_CC__)
#   define MML_PLATFORM MML_PLATFORM_APPLE

#else
#   define MML_PLATFORM MML_PLATFORM_LINUX
#endif

    /* Find the arch type */
#if defined(__x86_64__) || defined(_M_X64)
#   define MML_ARCH_TYPE MML_ARCHITECTURE_64
#else
#   define MML_ARCH_TYPE MML_ARCHITECTURE_32
#endif

    // For generating compiler warnings - should work on any compiler
    // As a side note, if you start your message with 'Warning: ', the MSVC
    // IDE actually does catch a warning :)
#define MML_QUOTE_INPLACE(x) # x
#define MML_QUOTE(x) MML_QUOTE_INPLACE(x)
#define MML_WARN( x )  message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )

    //----------------------------------------------------------------------------
    // Windows Settings
#if MML_PLATFORM == MML_PLATFORM_WIN32

    // If we're not including this from a client build, specify that the stuff
    // should get exported. Otherwise, import it.
//# if defined( MML_STATIC_LIB )
    // Linux compilers don't have symbol import/export directives.
#    define _MATHML_SOLVER_EXPORT
//#  else
//#    ifdef MATHMLSOLVER_EXPORTS
//#      define _MATHML_SOLVER_EXPORT __declspec(dllexport)
//#    else
//#      define _MATHML_SOLVER_EXPORT __declspec(dllimport)
//#    endif
//# endif
    // Win32 compilers use _DEBUG for specifying debug builds.
#   ifdef _DEBUG
#       define MML_DEBUG_MODE
#   else
#       undef MML_DEBUG_MODE
#   endif

    // Disable unicode support on MingW at the moment, poorly supported in stdlibc++
    // STLPORT fixes this though so allow if found
    // MinGW C++ Toolkit supports unicode and sets the define __MINGW32_TOOLKIT_UNICODE__ in _mingw.h
#if defined( __MINGW32__ ) && !defined(_STLPORT_VERSION) && !defined( __MINGW64__ )
#   include<_mingw.h>
#   if defined(__MINGW32_TOOLBOX_UNICODE__)
#     define MML_UNICODE_SUPPORT 1
#   else
#       define MML_UNICODE_SUPPORT 0
#   endif
#else
# define MML_UNICODE_SUPPORT 1
#endif

#endif
    //----------------------------------------------------------------------------

    //----------------------------------------------------------------------------
    // Linux/Apple Settings
#if MML_PLATFORM == MML_PLATFORM_LINUX || MML_PLATFORM == MML_PLATFORM_APPLE

    // Enable GCC symbol visibility
#   if defined( MML_GCC_VISIBILITY )
#       define _MATHML_SOLVER_EXPORT  __attribute__ ((visibility("default")))
#       define _MMLPrivate __attribute__ ((visibility("hidden")))
#   else
#       define _MATHML_SOLVER_EXPORT
#       define _MMLPrivate
#   endif

    // A quick define to overcome different names for the same function
#   define stricmp strcasecmp

    // Unlike the Win32 compilers, Linux compilers seem to use DEBUG for when
    // specifying a debug build.
    // (??? this is wrong, on Linux debug builds aren't marked in any way unless
    // you mark it yourself any way you like it -- zap ???)
#   ifdef DEBUG
#       define MML_DEBUG_MODE
#   else
#       undef MML_DEBUG_MODE
#   endif

#if MML_PLATFORM == MML_PLATFORM_APPLE
 #define MML_PLATFORM_LIB "MMLPlatform.bundle"
#else
    //MML_PLATFORM_LINUX
#define MML_PLATFORM_LIB "libMMLPlatform.so"
#endif

    // Always enable unicode support for the moment
    // Perhaps disable in old versions of gcc if necessary
#define MML_UNICODE_SUPPORT 1

#endif

    //----------------------------------------------------------------------------

    //----------------------------------------------------------------------------
    // Endian Settings
    // check for BIG_ENDIAN config flag, set MML_ENDIAN correctly
#ifdef MML_CONFIG_BIG_ENDIAN
#    define MML_ENDIAN MML_ENDIAN_BIG
#else
#    define MML_ENDIAN MML_ENDIAN_LITTLE
#endif

    // Integer formats of fixed bit width
    typedef unsigned int uint32;
    typedef unsigned short uint16;
    typedef unsigned char uint8;

}

#endif


text:
.page { page-break-after: always; }
#progressbar, #tubaina { display: none; }

redpajama_set_name: RedPajamaGithub


text:
namespace TraktApiSharp.Tests.Objects.Get.Movies.Json.Reader
{
    using FluentAssertions;
    using Newtonsoft.Json;
    using System.IO;
    using System.Threading.Tasks;
    using Traits;
    using TraktApiSharp.Objects.Get.Movies.Json.Reader;
    using Xunit;

    [Category("Objects.Get.Movies.JsonReader")]
    public partial class MovieAliasObjectJsonReader_Tests
    {
        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Complete()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(JSON_COMPLETE))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);

                traktMovieAlias.Should().NotBeNull();
                traktMovieAlias.Title.Should().Be("Star Wars: The Force Awakens");
                traktMovieAlias.CountryCode.Should().Be("us");
            }
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Incomplete_1()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(JSON_INCOMPLETE_1))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);

                traktMovieAlias.Should().NotBeNull();
                traktMovieAlias.Title.Should().Be("Star Wars: The Force Awakens");
                traktMovieAlias.CountryCode.Should().BeNull();
            }
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Incomplete_2()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(JSON_INCOMPLETE_2))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);

                traktMovieAlias.Should().NotBeNull();
                traktMovieAlias.Title.Should().BeNull();
                traktMovieAlias.CountryCode.Should().Be("us");
            }
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_1()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(JSON_NOT_VALID_1))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);

                traktMovieAlias.Should().NotBeNull();
                traktMovieAlias.Title.Should().BeNull();
                traktMovieAlias.CountryCode.Should().Be("us");
            }
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_2()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(JSON_NOT_VALID_2))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);

                traktMovieAlias.Should().NotBeNull();
                traktMovieAlias.Title.Should().Be("Star Wars: The Force Awakens");
                traktMovieAlias.CountryCode.Should().BeNull();
            }
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Not_Valid_3()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(JSON_NOT_VALID_3))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);

                traktMovieAlias.Should().NotBeNull();
                traktMovieAlias.Title.Should().BeNull();
                traktMovieAlias.CountryCode.Should().BeNull();
            }
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Null()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            var traktMovieAlias = await traktJsonReader.ReadObjectAsync(default(JsonTextReader));
            traktMovieAlias.Should().BeNull();
        }

        [Fact]
        public async Task Test_MovieAliasObjectJsonReader_ReadObject_From_JsonReader_Empty()
        {
            var traktJsonReader = new MovieAliasObjectJsonReader();

            using (var reader = new StringReader(string.Empty))
            using (var jsonReader = new JsonTextReader(reader))
            {
                var traktMovieAlias = await traktJsonReader.ReadObjectAsync(jsonReader);
                traktMovieAlias.Should().BeNull();
            }
        }
    }
}


text:
int my_printf (void *my_object, const char *my_format, ...)
{
    NSLog(@"%s%s", my_object, my_format);
    return 1;
}

NSString * NSStringFromStrings(NSString *str1, NSString *str2, NSInteger i)
{
    return @"test __attribute__((nonnull (1,2)))";
}

void __attribute__((noreturn)) die(const char *format, ...)
{
    exit(0);
}

//c函数重载
__attribute__((overloadable)) void foo(int a){
    printf("%d\n",a);
}
__attribute__((overloadable)) void foo(float a){
    printf("%f\n",a);
}

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    __unused NSString *tt = [NSString stringWithFormat:@"%@", @"tt"];

    __unused NSString *eee = NSStringFromStrings(@" ", @" ", 0);

    [NSString stringWithFormat:@"%@", @"dsada"];

    char *chas = "fffff";
    void *ttt = "tttt";
    my_printf(ttt, chas, @"yyyyyyy");

    NSString *fff = [self test];

    fios();
}

-  (NSString *)test
{
    return nil;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end


text:
package runtime

import (
	"fmt"
	"io"
	"log"
	"path"
	"reflect"
	goruntime "runtime"
	"sort"
	"strings"

	"k8s.io/kubernetes/pkg/api/unversioned"
	"k8s.io/kubernetes/pkg/conversion"
	"k8s.io/kubernetes/pkg/util/sets"
)

type ConversionGenerator interface {
	GenerateConversionsForType(groupVersion unversioned.GroupVersion, reflection reflect.Type) error
	WriteConversionFunctions(w io.Writer) error
	RegisterConversionFunctions(w io.Writer, pkg string) error
	AddImport(pkg string) string
	RepackImports(exclude sets.String)
	WriteImports(w io.Writer) error
	OverwritePackage(pkg, overwrite string)
	AssumePrivateConversions()
}

func NewConversionGenerator(scheme *conversion.Scheme, targetPkg string) ConversionGenerator {
	g := &conversionGenerator{
		scheme: scheme,

		nameFormat:          "Convert_%s_%s_To_%s_%s",
		generatedNamePrefix: "auto",
		targetPkg:           targetPkg,

		publicFuncs:   make(map[typePair]string),
		convertibles:  make(map[reflect.Type]reflect.Type),
		overridden:    make(map[reflect.Type]bool),
		pkgOverwrites: make(map[string]string),
		imports:       make(map[string]string),
		shortImports:  make(map[string]string),
	}
	g.targetPackage(targetPkg)
	g.AddImport("reflect")
	g.AddImport("k8s.io/kubernetes/pkg/conversion")
	return g
}

var complexTypes []reflect.Kind = []reflect.Kind{reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface, reflect.Struct}

type conversionGenerator struct {
	scheme *conversion.Scheme

	nameFormat          string
	generatedNamePrefix string
	targetPkg           string

	publicFuncs  map[typePair]string
	convertibles map[reflect.Type]reflect.Type
	overridden   map[reflect.Type]bool
	// If pkgOverwrites is set for a given package name, that package name
	// will be replaced while writing conversion function. If empty, package
	// name will be omitted.
	pkgOverwrites map[string]string
	// map of package names to shortname
	imports map[string]string
	// map of short names to package names
	shortImports map[string]string

	// A buffer that is used for storing lines that needs to be written.
	linesToPrint []string

	// if true, we assume conversions on the scheme are not available to us in the current package
	assumePrivateConversions bool
}

func (g *conversionGenerator) AssumePrivateConversions() {
	g.assumePrivateConversions = true
}

func (g *conversionGenerator) AddImport(pkg string) string {
	return g.addImportByPath(pkg)
}

func (g *conversionGenerator) GenerateConversionsForType(gv unversioned.GroupVersion, reflection reflect.Type) error {
	kind := reflection.Name()
	// TODO this is equivalent to what it did before, but it needs to be fixed for the proper group
	internalVersion, exists := g.scheme.InternalVersions[gv.Group]
	if !exists {
		return fmt.Errorf("no internal version for %v", gv)
	}

	internalObj, err := g.scheme.NewObject(internalVersion.WithKind(kind))
	if err != nil {
		return fmt.Errorf("cannot create an object of type %v in internal version", kind)
	}
	internalObjType := reflect.TypeOf(internalObj)
	if internalObjType.Kind() != reflect.Ptr {
		return fmt.Errorf("created object should be of type Ptr: %v", internalObjType.Kind())
	}
	inErr := g.generateConversionsBetween(reflection, internalObjType.Elem())
	outErr := g.generateConversionsBetween(internalObjType.Elem(), reflection)
	if inErr != nil || outErr != nil {
		return fmt.Errorf("errors: %v, %v", inErr, outErr)
	}
	return nil
}

// primitiveConversion returns true if the two types can be converted via a cast.
func primitiveConversion(inType, outType reflect.Type) (string, bool) {
	switch inType.Kind() {
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
		reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
		reflect.Float32, reflect.Float64:
		switch outType.Kind() {
		case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
			reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64,
			reflect.Float32, reflect.Float64:
			return outType.Name(), true
		}
	}
	return "", false
}

func (g *conversionGenerator) generateConversionsBetween(inType, outType reflect.Type) error {
	existingConversion := g.scheme.Converter().HasConversionFunc(inType, outType) && g.scheme.Converter().HasConversionFunc(outType, inType)

	// Avoid processing the same type multiple times.
	if value, found := g.convertibles[inType]; found {
		if value != outType {
			return fmt.Errorf("multiple possible convertibles for %v", inType)
		}
		return nil
	}
	if inType == outType {
		switch inType.Kind() {
		case reflect.Ptr:
			return g.generateConversionsBetween(inType.Elem(), inType.Elem())
		case reflect.Struct:
			// pointers to structs invoke new(inType)
			g.addImportByPath(inType.PkgPath())
		}
		g.rememberConversionFunction(inType, inType, false)
		// Don't generate conversion methods for the same type.
		return nil
	}

	if _, ok := primitiveConversion(inType, outType); ok {
		return nil
	}

	if inType.Kind() != outType.Kind() {
		if existingConversion {
			g.rememberConversionFunction(inType, outType, false)
			g.rememberConversionFunction(outType, inType, false)
			return nil
		}
		return fmt.Errorf("cannot convert types of different kinds: %v %v", inType, outType)
	}

	g.addImportByPath(inType.PkgPath())
	g.addImportByPath(outType.PkgPath())

	// We should be able to generate conversions both sides.
	switch inType.Kind() {
	case reflect.Map:
		inErr := g.generateConversionsForMap(inType, outType)
		outErr := g.generateConversionsForMap(outType, inType)
		if !existingConversion && (inErr != nil || outErr != nil) {
			return inErr
		}
		// We don't add it to g.convertibles - maps should be handled correctly
		// inside appropriate conversion functions.
		return nil
	case reflect.Ptr:
		inErr := g.generateConversionsBetween(inType.Elem(), outType.Elem())
		outErr := g.generateConversionsBetween(outType.Elem(), inType.Elem())
		if !existingConversion && (inErr != nil || outErr != nil) {
			return inErr
		}
		// We don't add it to g.convertibles - maps should be handled correctly
		// inside appropriate conversion functions.
		return nil
	case reflect.Slice:
		inErr := g.generateConversionsForSlice(inType, outType)
		outErr := g.generateConversionsForSlice(outType, inType)
		if !existingConversion && (inErr != nil || outErr != nil) {
			return inErr
		}
		// We don't add it to g.convertibles - slices should be handled correctly
		// inside appropriate conversion functions.
		return nil
	case reflect.Interface:
		// TODO(wojtek-t): Currently we don't support converting interfaces.
		return fmt.Errorf("interfaces are not supported")
	case reflect.Struct:
		inErr := g.generateConversionsForStruct(inType, outType)
		outErr := g.generateConversionsForStruct(outType, inType)
		if !existingConversion && (inErr != nil || outErr != nil) {
			return inErr
		}
		g.rememberConversionFunction(inType, outType, true)
		if existingConversion {
			g.overridden[inType] = true
		}
		g.convertibles[inType] = outType
		return nil
	default:
		// All simple types should be handled correctly with default conversion.
		return nil
	}
}

func isComplexType(reflection reflect.Type) bool {
	for _, complexType := range complexTypes {
		if complexType == reflection.Kind() {
			return true
		}
	}
	return false
}

func (g *conversionGenerator) rememberConversionFunction(inType, outType reflect.Type, willGenerate bool) {
	if _, ok := g.publicFuncs[typePair{inType, outType}]; ok {
		return
	}

	if v, ok := g.scheme.Converter().ConversionFuncValue(inType, outType); ok {
		if fn := goruntime.FuncForPC(v.Pointer()); fn != nil {
			name := fn.Name()
			var p, n string
			if last := strings.LastIndex(name, "."); last != -1 {
				p = name[:last]
				n = name[last+1:]
				p = g.imports[p]
				if len(p) > 0 {
					p = p + "."
				}
			} else {
				n = name
			}
			if isPublic(n) {
				g.publicFuncs[typePair{inType, outType}] = p + n
			} else {
				log.Printf("WARNING: Cannot generate conversion %v -> %v, method %q is private", inType, outType, fn.Name())
			}
		} else {
			log.Printf("WARNING: Cannot generate conversion %v -> %v, method is not accessible", inType, outType)
		}
	} else if willGenerate {
		g.publicFuncs[typePair{inType, outType}] = g.conversionFunctionName(inType, outType)
	}
}

func isPublic(name string) bool {
	return strings.ToUpper(name[:1]) == name[:1]
}

func (g *conversionGenerator) generateConversionsForMap(inType, outType reflect.Type) error {
	inKey := inType.Key()
	outKey := outType.Key()
	g.addImportByPath(inKey.PkgPath())
	g.addImportByPath(outKey.PkgPath())
	if err := g.generateConversionsBetween(inKey, outKey); err != nil {
		return err
	}
	inValue := inType.Elem()
	outValue := outType.Elem()
	g.addImportByPath(inValue.PkgPath())
	g.addImportByPath(outValue.PkgPath())
	if err := g.generateConversionsBetween(inValue, outValue); err != nil {
		return err
	}
	return nil
}

func (g *conversionGenerator) generateConversionsForSlice(inType, outType reflect.Type) error {
	inElem := inType.Elem()
	outElem := outType.Elem()
	// slice conversion requires the package for the destination type in order to instantiate the map
	g.addImportByPath(outElem.PkgPath())
	if err := g.generateConversionsBetween(inElem, outElem); err != nil {
		return err
	}
	return nil
}

func (g *conversionGenerator) generateConversionsForStruct(inType, outType reflect.Type) error {
	for i := 0; i < inType.NumField(); i++ {
		inField := inType.Field(i)
		outField, found := outType.FieldByName(inField.Name)
		if !found {
			return fmt.Errorf("couldn't find a corresponding field %v in %v", inField.Name, outType)
		}
		if isComplexType(inField.Type) {
			if err := g.generateConversionsBetween(inField.Type, outField.Type); err != nil {
				return err
			}
		}
	}
	return nil
}

// A buffer of lines that will be written.
type bufferedLine struct {
	line        string
	indentation int
}

type buffer struct {
	lines []bufferedLine
}

func newBuffer() *buffer {
	return &buffer{
		lines: make([]bufferedLine, 0),
	}
}

func (b *buffer) addLine(line string, indent int) {
	b.lines = append(b.lines, bufferedLine{line, indent})
}

func (b *buffer) flushLines(w io.Writer) error {
	for _, line := range b.lines {
		indentation := strings.Repeat("\t", line.indentation)
		fullLine := fmt.Sprintf("%s%s", indentation, line.line)
		if _, err := io.WriteString(w, fullLine); err != nil {
			return err
		}
	}
	return nil
}

type byName []reflect.Type

func (s byName) Len() int {
	return len(s)
}

func (s byName) Less(i, j int) bool {
	fullNameI := s[i].PkgPath() + "/" + s[i].Name()
	fullNameJ := s[j].PkgPath() + "/" + s[j].Name()
	return fullNameI < fullNameJ
}

func (s byName) Swap(i, j int) {
	s[i], s[j] = s[j], s[i]
}

func (g *conversionGenerator) targetPackage(pkg string) {
	g.imports[pkg] = ""
	g.shortImports[""] = pkg
}

func (g *conversionGenerator) RepackImports(exclude sets.String) {
	var packages []string
	for key := range g.imports {
		packages = append(packages, key)
	}
	sort.Strings(packages)
	g.imports = make(map[string]string)
	g.shortImports = make(map[string]string)
	g.targetPackage(g.targetPkg)
	for _, pkg := range packages {
		if !exclude.Has(pkg) {
			g.addImportByPath(pkg)
		}
	}
}

func (g *conversionGenerator) WriteImports(w io.Writer) error {
	var packages []string
	for key := range g.imports {
		packages = append(packages, key)
	}
	sort.Strings(packages)

	buffer := newBuffer()
	indent := 0
	buffer.addLine("import (\n", indent)
	for _, importPkg := range packages {
		if len(importPkg) == 0 {
			continue
		}
		if len(g.imports[importPkg]) == 0 {
			continue
		}
		buffer.addLine(fmt.Sprintf("%s \"%s\"\n", g.imports[importPkg], importPkg), indent+1)
	}
	buffer.addLine(")\n", indent)
	buffer.addLine("\n", indent)
	if err := buffer.flushLines(w); err != nil {
		return err
	}
	return nil
}

func (g *conversionGenerator) WriteConversionFunctions(w io.Writer) error {
	// It's desired to print conversion functions always in the same order
	// (e.g. for better tracking of what has really been added).
	var keys []reflect.Type
	for key := range g.convertibles {
		keys = append(keys, key)
	}
	sort.Sort(byName(keys))

	buffer := newBuffer()
	indent := 0
	for _, inType := range keys {
		outType := g.convertibles[inType]
		// All types in g.convertibles are structs.
		if inType.Kind() != reflect.Struct {
			return fmt.Errorf("non-struct conversions are not-supported")
		}
		if err := g.writeConversionForType(buffer, inType, outType, indent); err != nil {
			return err
		}
	}
	if err := buffer.flushLines(w); err != nil {
		return err
	}
	return nil
}

func (g *conversionGenerator) writeRegisterHeader(b *buffer, pkg string, indent int) {
	b.addLine("func init() {\n", indent)
	b.addLine(fmt.Sprintf("err := %s.AddGeneratedConversionFuncs(\n", pkg), indent+1)
}

func (g *conversionGenerator) writeRegisterFooter(b *buffer, indent int) {
	b.addLine(")\n", indent+1)
	b.addLine("if err != nil {\n", indent+1)
	b.addLine("// If one of the conversion functions is malformed, detect it immediately.\n", indent+2)
	b.addLine("panic(err)\n", indent+2)
	b.addLine("}\n", indent+1)
	b.addLine("}\n", indent)
	b.addLine("\n", indent)
}

func (g *conversionGenerator) RegisterConversionFunctions(w io.Writer, pkg string) error {
	// Write conversion function names alphabetically ordered.
	var names []string
	for inType, outType := range g.convertibles {
		names = append(names, g.generatedFunctionName(inType, outType))
	}
	sort.Strings(names)

	buffer := newBuffer()
	indent := 0
	g.writeRegisterHeader(buffer, pkg, indent)
	for _, name := range names {
		buffer.addLine(fmt.Sprintf("%s,\n", name), indent+2)
	}
	g.writeRegisterFooter(buffer, indent)
	if err := buffer.flushLines(w); err != nil {
		return err
	}
	return nil
}

func (g *conversionGenerator) addImportByPath(pkg string) string {
	if name, ok := g.imports[pkg]; ok {
		return name
	}
	name := path.Base(pkg)
	if _, ok := g.shortImports[name]; !ok {
		g.imports[pkg] = name
		g.shortImports[name] = pkg
		return name
	}
	if dirname := path.Base(path.Dir(pkg)); len(dirname) > 0 {
		name = dirname + name
		if _, ok := g.shortImports[name]; !ok {
			g.imports[pkg] = name
			g.shortImports[name] = pkg
			return name
		}
		if subdirname := path.Base(path.Dir(path.Dir(pkg))); len(subdirname) > 0 {
			name = subdirname + name
			if _, ok := g.shortImports[name]; !ok {
				g.imports[pkg] = name
				g.shortImports[name] = pkg
				return name
			}
		}
	}
	for i := 2; i < 100; i++ {
		generatedName := fmt.Sprintf("%s%d", name, i)
		if _, ok := g.shortImports[generatedName]; !ok {
			g.imports[pkg] = generatedName
			g.shortImports[generatedName] = pkg
			return generatedName
		}
	}
	panic(fmt.Sprintf("unable to find a unique name for the package path %q: %v", pkg, g.shortImports))
}

func (g *conversionGenerator) typeName(inType reflect.Type) string {
	switch inType.Kind() {
	case reflect.Slice:
		return fmt.Sprintf("[]%s", g.typeName(inType.Elem()))
	case reflect.Ptr:
		return fmt.Sprintf("*%s", g.typeName(inType.Elem()))
	case reflect.Map:
		if len(inType.Name()) == 0 {
			return fmt.Sprintf("map[%s]%s", g.typeName(inType.Key()), g.typeName(inType.Elem()))
		}
		fallthrough
	default:
		pkg, name := inType.PkgPath(), inType.Name()
		if len(name) == 0 && inType.Kind() == reflect.Struct {
			return "struct{}"
		}
		if len(pkg) == 0 {
			// Default package.
			return name
		}
		if val, found := g.pkgOverwrites[pkg]; found {
			pkg = val
		}
		if len(pkg) == 0 {
			return name
		}
		short := g.addImportByPath(pkg)
		if len(short) > 0 {
			return fmt.Sprintf("%s.%s", short, name)
		}
		return name
	}
}

func (g *conversionGenerator) writeDefaultingFunc(b *buffer, inType reflect.Type, indent int) error {
	getStmt := "if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {\n"
	b.addLine(getStmt, indent)
	callFormat := "defaulting.(func(*%s))(in)\n"
	callStmt := fmt.Sprintf(callFormat, g.typeName(inType))
	b.addLine(callStmt, indent+1)
	b.addLine("}\n", indent)
	return nil
}

func packageForName(inType reflect.Type) string {
	if inType.PkgPath() == "" {
		return ""
	}
	slices := strings.Split(inType.PkgPath(), "/")
	return slices[len(slices)-1]
}

func (g *conversionGenerator) conversionFunctionName(inType, outType reflect.Type) string {
	funcNameFormat := g.nameFormat
	inPkg := packageForName(inType)
	outPkg := packageForName(outType)
	funcName := fmt.Sprintf(funcNameFormat, inPkg, inType.Name(), outPkg, outType.Name())
	return funcName
}

func (g *conversionGenerator) conversionFunctionCall(inType, outType reflect.Type, scopeName string, args ...string) string {
	if named, ok := g.publicFuncs[typePair{inType, outType}]; ok {
		args[len(args)-1] = scopeName
		return fmt.Sprintf("%s(%s)", named, strings.Join(args, ", "))
	}
	log.Printf("WARNING: Using reflection to convert %v -> %v (no public conversion)", inType, outType)
	return fmt.Sprintf("%s.Convert(%s)", scopeName, strings.Join(args, ", "))
}

func (g *conversionGenerator) generatedFunctionName(inType, outType reflect.Type) string {
	return g.generatedNamePrefix + g.conversionFunctionName(inType, outType)
}

func (g *conversionGenerator) writeHeader(b *buffer, name, inType, outType string, indent int) {
	format := "func %s(in *%s, out *%s, s conversion.Scope) error {\n"
	stmt := fmt.Sprintf(format, name, inType, outType)
	b.addLine(stmt, indent)
}

func (g *conversionGenerator) writeFooter(b *buffer, indent int) {
	b.addLine("return nil\n", indent+1)
	b.addLine("}\n", indent)
}

func (g *conversionGenerator) writeConversionForMap(b *buffer, inField, outField reflect.StructField, indent int) error {
	ifFormat := "if in.%s != nil {\n"
	ifStmt := fmt.Sprintf(ifFormat, inField.Name)
	b.addLine(ifStmt, indent)
	makeFormat := "out.%s = make(%s)\n"
	makeStmt := fmt.Sprintf(makeFormat, outField.Name, g.typeName(outField.Type))
	b.addLine(makeStmt, indent+1)
	forFormat := "for key, val := range in.%s {\n"
	forStmt := fmt.Sprintf(forFormat, inField.Name)
	b.addLine(forStmt, indent+1)

	// Whether we need to explicitly create a new value.
	newValue := false
	if isComplexType(inField.Type.Elem()) || !inField.Type.Elem().ConvertibleTo(outField.Type.Elem()) {
		newValue = true
		newFormat := "newVal := %s{}\n"
		newStmt := fmt.Sprintf(newFormat, g.typeName(outField.Type.Elem()))
		b.addLine(newStmt, indent+2)
		call := g.conversionFunctionCall(inField.Type.Elem(), outField.Type.Elem(), "s", "&val", "&newVal", "0")
		convertStmt := fmt.Sprintf("if err := %s; err != nil {\n", call)
		b.addLine(convertStmt, indent+2)
		b.addLine("return err\n", indent+3)
		b.addLine("}\n", indent+2)
	}
	if inField.Type.Key().ConvertibleTo(outField.Type.Key()) {
		value := "val"
		if newValue {
			value = "newVal"
		}
		assignStmt := ""
		if inField.Type.Key().AssignableTo(outField.Type.Key()) {
			assignStmt = fmt.Sprintf("out.%s[key] = %s\n", outField.Name, value)
		} else {
			assignStmt = fmt.Sprintf("out.%s[%s(key)] = %s\n", outField.Name, g.typeName(outField.Type.Key()), value)
		}
		b.addLine(assignStmt, indent+2)
	} else {
		// TODO(wojtek-t): Support maps with keys that are non-convertible to each other.
		return fmt.Errorf("conversions between unconvertible keys in map are not supported.")
	}
	b.addLine("}\n", indent+1)
	b.addLine("} else {\n", indent)
	nilFormat := "out.%s = nil\n"
	nilStmt := fmt.Sprintf(nilFormat, outField.Name)
	b.addLine(nilStmt, indent+1)
	b.addLine("}\n", indent)
	return nil
}

func (g *conversionGenerator) writeConversionForSlice(b *buffer, inField, outField reflect.StructField, indent int) error {
	ifFormat := "if in.%s != nil {\n"
	ifStmt := fmt.Sprintf(ifFormat, inField.Name)
	b.addLine(ifStmt, indent)
	makeFormat := "out.%s = make(%s, len(in.%s))\n"
	makeStmt := fmt.Sprintf(makeFormat, outField.Name, g.typeName(outField.Type), inField.Name)
	b.addLine(makeStmt, indent+1)
	forFormat := "for i := range in.%s {\n"
	forStmt := fmt.Sprintf(forFormat, inField.Name)
	b.addLine(forStmt, indent+1)

	assigned := false
	switch inField.Type.Elem().Kind() {
	case reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface, reflect.Struct:
		// Don't copy these via assignment/conversion!
	default:
		// This should handle all simple types.
		if inField.Type.Elem().AssignableTo(outField.Type.Elem()) {
			assignFormat := "out.%s[i] = in.%s[i]\n"
			assignStmt := fmt.Sprintf(assignFormat, outField.Name, inField.Name)
			b.addLine(assignStmt, indent+2)
			assigned = true
		} else if inField.Type.Elem().ConvertibleTo(outField.Type.Elem()) {
			assignFormat := "out.%s[i] = %s(in.%s[i])\n"
			assignStmt := fmt.Sprintf(assignFormat, outField.Name, g.typeName(outField.Type.Elem()), inField.Name)
			b.addLine(assignStmt, indent+2)
			assigned = true
		}
	}
	if !assigned {
		call := g.conversionFunctionCall(inField.Type.Elem(), outField.Type.Elem(), "s", "&in."+inField.Name+"[i]", "&out."+outField.Name+"[i]", "0")
		assignStmt := fmt.Sprintf("if err := %s; err != nil {\n", call)
		b.addLine(assignStmt, indent+2)
		b.addLine("return err\n", indent+3)
		b.addLine("}\n", indent+2)
	}
	b.addLine("}\n", indent+1)
	b.addLine("} else {\n", indent)
	nilFormat := "out.%s = nil\n"
	nilStmt := fmt.Sprintf(nilFormat, outField.Name)
	b.addLine(nilStmt, indent+1)
	b.addLine("}\n", indent)
	return nil
}

func (g *conversionGenerator) writeConversionForPtr(b *buffer, inField, outField reflect.StructField, indent int) error {
	switch inField.Type.Elem().Kind() {
	case reflect.Map, reflect.Ptr, reflect.Slice, reflect.Interface, reflect.Struct:
		// Don't copy these via assignment/conversion!
	default:
		// This should handle pointers to all simple types.
		assignable := inField.Type.Elem().AssignableTo(outField.Type.Elem())
		convertible := inField.Type.Elem().ConvertibleTo(outField.Type.Elem())
		if assignable || convertible {
			ifFormat := "if in.%s != nil {\n"
			ifStmt := fmt.Sprintf(ifFormat, inField.Name)
			b.addLine(ifStmt, indent)
			newFormat := "out.%s = new(%s)\n"
			newStmt := fmt.Sprintf(newFormat, outField.Name, g.typeName(outField.Type.Elem()))
			b.addLine(newStmt, indent+1)
		}
		if assignable {
			assignFormat := "*out.%s = *in.%s\n"
			assignStmt := fmt.Sprintf(assignFormat, outField.Name, inField.Name)
			b.addLine(assignStmt, indent+1)
		} else if convertible {
			assignFormat := "*out.%s = %s(*in.%s)\n"
			assignStmt := fmt.Sprintf(assignFormat, outField.Name, g.typeName(outField.Type.Elem()), inField.Name)
			b.addLine(assignStmt, indent+1)
		}
		if assignable || convertible {
			b.addLine("} else {\n", indent)
			nilFormat := "out.%s = nil\n"
			nilStmt := fmt.Sprintf(nilFormat, outField.Name)
			b.addLine(nilStmt, indent+1)
			b.addLine("}\n", indent)
			return nil
		}
	}

	b.addLine(fmt.Sprintf("// unable to generate simple pointer conversion for %v -> %v\n", inField.Type.Elem(), outField.Type.Elem()), indent)
	ifFormat := "if in.%s != nil {\n"
	ifStmt := fmt.Sprintf(ifFormat, inField.Name)
	b.addLine(ifStmt, indent)
	assignStmt := ""
	if _, ok := g.publicFuncs[typePair{inField.Type.Elem(), outField.Type.Elem()}]; ok {
		newFormat := "out.%s = new(%s)\n"
		newStmt := fmt.Sprintf(newFormat, outField.Name, g.typeName(outField.Type.Elem()))
		b.addLine(newStmt, indent+1)
		call := g.conversionFunctionCall(inField.Type.Elem(), outField.Type.Elem(), "s", "in."+inField.Name, "out."+outField.Name, "0")
		assignStmt = fmt.Sprintf("if err := %s; err != nil {\n", call)
	} else {
		call := g.conversionFunctionCall(inField.Type.Elem(), outField.Type.Elem(), "s", "&in."+inField.Name, "&out."+outField.Name, "0")
		assignStmt = fmt.Sprintf("if err := %s; err != nil {\n", call)
	}
	b.addLine(assignStmt, indent+1)
	b.addLine("return err\n", indent+2)
	b.addLine("}\n", indent+1)
	b.addLine("} else {\n", indent)
	nilFormat := "out.%s = nil\n"
	nilStmt := fmt.Sprintf(nilFormat, outField.Name)
	b.addLine(nilStmt, indent+1)
	b.addLine("}\n", indent)
	return nil
}

func (g *conversionGenerator) canTryConversion(b *buffer, inType reflect.Type, inField, outField reflect.StructField, indent int) (bool, error) {
	if inField.Type.Kind() != outField.Type.Kind() {
		if !g.overridden[inType] {
			return false, fmt.Errorf("input %s.%s (%s) does not match output (%s) and conversion is not overridden", inType, inField.Name, inField.Type.Kind(), outField.Type.Kind())
		}
		b.addLine(fmt.Sprintf("// in.%s has no peer in out\n", inField.Name), indent)
		return false, nil
	}
	return true, nil
}

func (g *conversionGenerator) writeConversionForStruct(b *buffer, inType, outType reflect.Type, indent int) error {
	for i := 0; i < inType.NumField(); i++ {
		inField := inType.Field(i)
		outField, found := outType.FieldByName(inField.Name)
		if !found {
			if !g.overridden[inType] {
				return fmt.Errorf("input %s.%s has no peer in output %s and conversion is not overridden", inType, inField.Name, outType)
			}
			b.addLine(fmt.Sprintf("// in.%s has no peer in out\n", inField.Name), indent)
			continue
		}

		existsConversion := g.scheme.Converter().HasConversionFunc(inField.Type, outField.Type)
		_, hasPublicConversion := g.publicFuncs[typePair{inField.Type, outField.Type}]
		// TODO: This allows a private conversion for a slice to take precedence over a public
		// conversion for the field, even though that is technically slower. We should report when
		// we generate an inefficient conversion.
		if existsConversion || hasPublicConversion {
			// Use the conversion method that is already defined.
			call := g.conversionFunctionCall(inField.Type, outField.Type, "s", "&in."+inField.Name, "&out."+outField.Name, "0")
			assignStmt := fmt.Sprintf("if err := %s; err != nil {\n", call)
			b.addLine(assignStmt, indent)
			b.addLine("return err\n", indent+1)
			b.addLine("}\n", indent)
			continue
		}

		switch inField.Type.Kind() {
		case reflect.Map:
			if try, err := g.canTryConversion(b, inType, inField, outField, indent); err != nil {
				return err
			} else if !try {
				continue
			}
			if err := g.writeConversionForMap(b, inField, outField, indent); err != nil {
				return err
			}
			continue
		case reflect.Ptr:
			if try, err := g.canTryConversion(b, inType, inField, outField, indent); err != nil {
				return err
			} else if !try {
				continue
			}
			if err := g.writeConversionForPtr(b, inField, outField, indent); err != nil {
				return err
			}
			continue
		case reflect.Slice:
			if try, err := g.canTryConversion(b, inType, inField, outField, indent); err != nil {
				return err
			} else if !try {
				continue
			}
			if err := g.writeConversionForSlice(b, inField, outField, indent); err != nil {
				return err
			}
			continue
		case reflect.Interface, reflect.Struct:
			// Don't copy these via assignment/conversion!
		default:
			// This should handle all simple types.
			if inField.Type.AssignableTo(outField.Type) {
				assignFormat := "out.%s = in.%s\n"
				assignStmt := fmt.Sprintf(assignFormat, outField.Name, inField.Name)
				b.addLine(assignStmt, indent)
				continue
			}
			if inField.Type.ConvertibleTo(outField.Type) {
				assignFormat := "out.%s = %s(in.%s)\n"
				assignStmt := fmt.Sprintf(assignFormat, outField.Name, g.typeName(outField.Type), inField.Name)
				b.addLine(assignStmt, indent)
				continue
			}
		}

		call := g.conversionFunctionCall(inField.Type, outField.Type, "s", "&in."+inField.Name, "&out."+outField.Name, "0")
		assignStmt := fmt.Sprintf("if err := %s; err != nil {\n", call)
		b.addLine(assignStmt, indent)
		b.addLine("return err\n", indent+1)
		b.addLine("}\n", indent)
	}
	return nil
}

func (g *conversionGenerator) writeConversionForType(b *buffer, inType, outType reflect.Type, indent int) error {
	// Always emit the auto-generated name.
	autoFuncName := g.generatedFunctionName(inType, outType)
	g.writeHeader(b, autoFuncName, g.typeName(inType), g.typeName(outType), indent)
	if err := g.writeDefaultingFunc(b, inType, indent+1); err != nil {
		return err
	}
	switch inType.Kind() {
	case reflect.Struct:
		if err := g.writeConversionForStruct(b, inType, outType, indent+1); err != nil {
			return err
		}
	default:
		return fmt.Errorf("type not supported: %v", inType)
	}
	g.writeFooter(b, indent)
	b.addLine("\n", 0)

	if !g.overridden[inType] {
		// Also emit the "user-facing" name.
		userFuncName := g.conversionFunctionName(inType, outType)
		g.writeHeader(b, userFuncName, g.typeName(inType), g.typeName(outType), indent)
		b.addLine(fmt.Sprintf("return %s(in, out, s)\n", autoFuncName), indent+1)
		b.addLine("}\n\n", 0)
	}

	return nil
}

func (g *conversionGenerator) existsConversionFunction(inType, outType reflect.Type) bool {
	if val, found := g.convertibles[inType]; found && val == outType {
		return true
	}
	if val, found := g.convertibles[outType]; found && val == inType {
		return true
	}
	return false
}

// TODO(wojtek-t): We should somehow change the conversion methods registered under:
// pkg/runtime/scheme.go to implement the naming convention for conversion functions
// and get rid of this hack.
type typePair struct {
	inType  reflect.Type
	outType reflect.Type
}

var defaultConversions []typePair = []typePair{
	{reflect.TypeOf([]RawExtension{}), reflect.TypeOf([]Object{})},
	{reflect.TypeOf([]Object{}), reflect.TypeOf([]RawExtension{})},
	{reflect.TypeOf(RawExtension{}), reflect.TypeOf(EmbeddedObject{})},
	{reflect.TypeOf(EmbeddedObject{}), reflect.TypeOf(RawExtension{})},
}

func (g *conversionGenerator) OverwritePackage(pkg, overwrite string) {
	g.pkgOverwrites[pkg] = overwrite
}


text:
define([
    'underscore',
    'contrail-view'
], function (_, ContrailView) {
    var FormRadioButtonView = ContrailView.extend({
        render: function () {
            var viewConfig = this.attributes.viewConfig,
                radioButtonTemplate = contrail.getTemplate4Id((viewConfig.templateId) ? viewConfig.templateId: cowc.TMPL_RADIO_BUTTON_VIEW),
                elementConfig = viewConfig[cowc.KEY_ELEMENT_CONFIG],
                elId = this.attributes.elementId,
                app = this.attributes.app,
                validation = this.attributes.validation,
                path = viewConfig['path'],
                type = (viewConfig['type'] != null) ? viewConfig['type'] : 'radio',
                lockEditingByDefault = this.attributes.lockEditingByDefault,
                label = viewConfig.label,
                labelValue = (label != null)? label :((elId != null)? cowl.get(elId, app) : cowl.get(path, app)),
                tmplParameters;

            if (!(contrail.checkIfExist(lockEditingByDefault) && lockEditingByDefault)) {
                lockEditingByDefault = false;
            }
            if(this.model != null) {
                this.model.initLockAttr(path, lockEditingByDefault);
            }
            tmplParameters = {
                label: labelValue, id: elId, name: elId,
                dataBindValue: viewConfig['dataBindValue'],
                lockAttr: lockEditingByDefault,
                isChecked: viewConfig['dataBindValue'],
                path: path, validation: validation,
                elementConfig: elementConfig,
                disabled: viewConfig['disabled']
            };
            this.$el.html(radioButtonTemplate(tmplParameters));
            var self= this;
            setTimeout(function() {
                if(viewConfig.templateId == cowc.TMPL_OPTNS_WITH_ICONS_RADIO_BUTTON_VIEW) {
                    var elementId = self.attributes.elementId;
                    $('#'+elementId).find('.option').removeClass('selected');
                    $('#'+elementId).find('input:checked').prev('.option')
                                    .addClass('selected');
                    $('#'+elementId).find('.option').click(function() {
                        $(this).next().prop("checked", true).trigger("click");
                        $('#'+elementId).find('.option').removeClass('selected');
                        $(this).addClass('selected');
                        return false;
                    });
                }
            }, 10);
        }
    });

    return FormRadioButtonView;
});


text:
<?php
/**
*
*/
require_once(APPPATH.'controllers/Check_Logged.php');
class Hospital_Admin_Controller extends Check_Logged
{

	public function __construct()
	{
		parent::__construct();
		$this->load->helper(['url', 'form','html']);
		$this->load->library(['form_validation','table']);
		$this->load->model('Donor_Model');
		$this->load->model('User_Model');
		$this->load->model('Lab_Model');
		$this->load->model('Hospital_Model');
		$this->load->model('Tocken_Details_Model');
	}

	public function dashboard()
	{
		if ($_SESSION['type'] == 'hospital' and $this->logged == true ) {
			$this->load->view('hospital/hospital_dashboard');
		}
		else
			redirect(base_url('hospital-login'));
	}

	public function users($page='acceptedusers')
	{
		if ($this->logged['type'] == 'hospital' ) {
			$data['result'] = $this->Hospital_Admin_Model->view_all();
			$this->load->view($page,$data);
		}
		else
		{
			redirect(base_url('hospital-login'));
		}
	}

	public function login()
	{

		$this->load->view('hospital/hospital_login');
	}

	public function logout()
	{
		$this->session->unset_userdata('logged_in');
		redirect(base_url('hospital-login'));
	}
	/*verify login*/

	public function verify()
	{
		$this->form_validation->set_rules('username', 'username','required');
		$this->form_validation->set_rules('password', 'password','required');

		if ($this->form_validation->run() === FALSE) {
			$this->load->view('hospital/hospital_login');
		}
		else
		{
			$username =  $this->input->post('username');
			$password =  $this->input->post('password');

			$password = md5($password);
            $login_data = $this->Hospital_Model->login($username, $password);
			if ($login_data) {
				$userdata = [
					'username' => $username,
					'type' => 'hospital',
                    'hospital_id' => $login_data[0]->id,
					'logged_in' => true
				];
				$this->session->set_userdata($userdata);
				redirect(base_url('hospital_dashboard'));
			}
			else
			{
			$data['message'] = 'please try again';
			$this->load->view('hospital/hospital_login',$data);
		    }
		}
	}

    /* accepted users*/
	public function index()
	{
		if($this->logged == true and $_SESSION['type'] == 'hospital'){
		$data=$this->Donor_Model->view(['statuscode' => '1', 'hospital_id' => $_SESSION['hospital_id']]);

		if($data != null)
			{
				$template = [
		                'table_open'            => '
',
		                'thead_open'            => '
',
		                'thead_close'           => '
',

		                'heading_row_start'     => '
',
		                'heading_row_end'       => '
',
		                'heading_cell_start'    => '',
		                'heading_cell_end'      => '	',

		                'tbody_open'            => '
',
		                'tbody_close'           => '
',

		                'row_start'             => '
',
		                'row_end'               => '
',
		                'cell_start'            => '',
		                'cell_end'              => '	',

		                'row_alt_start'         => '
',
		                'row_alt_end'           => '
',
		                'cell_alt_start'        => '',
		                'cell_alt_end'          => '	',

		                'table_close'           => '
'
		            ];
		            $this->table->set_template($template);
				$this->table->set_heading('Id','Name','Gender','Date of Birth','Address','Blood Group','token');
				foreach ($data as $key => $value)
					{
						$this->table->add_row($value->id, anchor(base_url('hospital_dashboard/donor/'.$value->id),$value->name), $value->gender,$value->dob,$value->address,$value->bloodgroup,($value->tockenno == null ? anchor(base_url('hospital_dashboard/donor/'.$value->id), 'give token' ) : $value->tockenno));
					}

				$data['result'] = $this->table->generate();
				$this->load->view('hospital/view_registered_users',$data);
			}
		else
			{
				$data['result'] = "No data found";
				$this->load->view('hospital/view_registered_users',$data);
			}
		}
		else
	    {
			redirect(base_url('hospital-login'));

		}
	}

		public function view_accepted_donor($id)
    {
        if ($this->logged == true and $_SESSION['type'] == 'hospital') {

            $result = $this->Donor_Model->view(['id' => $id, 'hospital_id' => $_SESSION['hospital_id']]);
            if ($result != FALSE) {
                $data['result'] = $result;
                $this->load->view('admin/view_hospital_admin', $data);

            }
        } else {
            redirect(base_url('hospital-login'));
        }
	}

	public function view_donor($id)
	{
        if ($this->logged == true and $_SESSION['type'] == 'hospital') {

            $result = $this->Donor_Model->view(['id' => $id, 'hospital_id' => $_SESSION['hospital_id']]);

            if ($result != FALSE) {
                $data['result'] = $result;
                $this->load->view('hospital/view_accepted_users', $data);

            }
        } else {
            redirect(base_url('hospital-login'));
        }

	}

	/* tocken details*/

	public function view_lab_request()
	{
        if ($this->logged == true and $_SESSION['type'] == 'hospital') {
            $where = ['donor.hospital_id' => $_SESSION['hospital_id']];
		    $data=$this->Tocken_Details_Model->view_all($where);

		if($data != null)
		{
			$template = [
	                'table_open'            => '
',
	                'thead_open'            => '
',
	                'thead_close'           => '
',

	                'heading_row_start'     => '
',
	                'heading_row_end'       => '
',
	                'heading_cell_start'    => '',
	                'heading_cell_end'      => '	',

	                'tbody_open'            => '
',
	                'tbody_close'           => '
',

	                'row_start'             => '
',
	                'row_end'               => '
',
	                'cell_start'            => '',
	                'cell_end'              => '	',

	                'row_alt_start'         => '
',
	                'row_alt_end'           => '
',
	                'cell_alt_start'        => '',
	                'cell_alt_end'          => '	',

	                'table_close'           => '
'
	        ];
	        $this->table->set_template($template);
	  //       $where = ['report' => 'generated'];
			// $data = $this->Tocken_Details_Model->view_join($where);
			// if ($data != false)
			// 	{
	                 //var_dump($data);
					$this->table->set_heading('Id' , 'Name' , 'Hospital_id' , 'Testdate' , 'Testtime' , 'Tokenno' , 'Verificationcode');
					foreach ($data as $key => $value)

					{
						$this->table->add_row($value->donor_id, anchor(base_url('hospital_dashboard/lab/make_report/'.$value->donor_id),$value->name), $value->hospital_id, $value->testdate, $value->testtime,$value->tockenno ,$value->verificationcode);
					}

					$data['result'] = $this->table->generate();
					$this->load->view('hospital/view_tocken',$data);

				// }
			}
					else
					{
						$data['result'] = 'No data found';
						$this->load->view('hospital/view_tocken',$data);
					}
		}
		else
	    {
			redirect(base_url('hospital-login'));
		}
	}

	public function view_accepted_users($id)
	{
        if ($this->logged == true and $_SESSION['type'] == 'hospital') {
            $result = $this->Tocken_Details_Model->view(['id' => $id, 'hospital_id' => $_SESSION['hospital_id']]);
            if ($result != FALSE) {
                $data['result'] = $result;
                $this->load->view('hospital/view_lab_request', $data);

            }
        }
        else{
            redirect(base_url('hospital-login'));
        }
	}

		public function add_report()
		{
            if ($this->logged == true and $_SESSION['type'] == 'hospital') {
                $this->load->view('hospital/make_lab_report');
            } else {
                redirect(base_url('hospital-login'));
            }
		}

		public function add_tocken()
		{
			//validation

	     $this->form_validation->set_rules('testdate', 'testdate', 'required');
		 $this->form_validation->set_rules('testtime', 'testtime', 'required');
		 $this->form_validation->set_rules('tockenno', 'tockenno', 'required');
		 $this->form_validation->set_rules('verificationcode', 'verificationcode', 'required');

        if($this->form_validation->run() === FALSE)
			{
				$data['result'] = $this->Tocken_Details_Model->view_all();
				$this->load->view('hospital/view_accepted_users',$data);
			}
		else
		{
			$testdate = $this->input->post('testdate');
			$testtime = $this->input->post('testtime');
			$tockenno= $this->input->post('tockenno');
			$verificationcode = $this->input->post('verificationcode');
            $donor_id=$this->input->post('donor_id');
            $hospital_id=$this->input->post('hospital_id');

			$data = [
						'testdate' => $testdate,
						'testtime' => $testtime,
						'tockenno'=> $tockenno,
						'verificationcode'=> $verificationcode,
						'donor_id'=>$donor_id,
						'hospital_id'=>$hospital_id,
						'report' => 'false'
			        ];
			$datas = [
			        	'tockenno'=> $tockenno,

			         ];
			         $where = ['id' => $donor_id];
				$this->Donor_Model->updation($where, $datas);

			   if($this->Tocken_Details_Model->add($data))
			{
				$data['message'] = '';
				$this->load->view('admin/view_tocken',$data);
			}

			else
			{
				$data['error'] = '';
				$this->load->view('admin/view_tocken',$data);
			}
	    }
			//add details to tocken_details table

			// update donor table set tocken = true
	              //$data= ['tockenno' => 'TRUE'];

	   		      //$where = ['id' => $id];
				//if($this->Tocken_Details_Model->update($where , $data) )
				//{
                     //echo ('$result[0]');
				//}

		}

    public function view_report()
    {
        if ($this->logged == true and $_SESSION['type'] == 'hospital') {
            $where = ['donor.hospital_id' => $_SESSION['hospital_id']];
            $data = $this->Lab_Model->view_join($where);
            if ($data != false) {
                $template = [
                    'table_open'            => '
',
                    'thead_open'            => '
',
                    'thead_close'           => '
',

                    'heading_row_start'     => '
',
                    'heading_row_end'       => '
',
                    'heading_cell_start'    => '',
                    'heading_cell_end'      => '	',

                    'tbody_open'            => '
',
                    'tbody_close'           => '
',

                    'row_start'             => '
',
                    'row_end'               => '
',
                    'cell_start'            => '',
                    'cell_end'              => '	',

                    'row_alt_start'         => '
',
                    'row_alt_end'           => '
',
                    'cell_alt_start'        => '',
                    'cell_alt_end'          => '	',

                    'table_close'           => '
'
                ];
                $this->table->set_template($template);
                $this->table->set_heading('Name','Gender','mobile','email', 'medical report', 'verified by');
                foreach ($data as $key => $value)
                {
                    $this->table->add_row($value->name, $value->gender, $value->mobile,$value->email, $value->medicalreport, $value->verifiedby);
                }

                $data['report'] = $this->table->generate();
            } else {
                $data['message'] = 'no report found';
            }
            $this->load->view('hospital/view_report', $data);
        }
        else
            redirect(base_url('hospital-login'));
    }

}


text:
////////////////////////////////////////////////////////////////////////////////
//
//  TYPHOON FRAMEWORK
//  Copyright 2013, Typhoon Framework Contributors
//  All Rights Reserved.
//
//  NOTICE: The authors permit you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////

#import <Foundation/Foundation.h>
#import "TyphoonDefinitionPostProcessor.h"

@protocol TyphoonResource;

/**
* @ingroup Configuration
*/
@interface TyphoonConfigPostProcessor : NSObject<TyphoonDefinitionPostProcessor>

+ (instancetype)processor;

/**
* Returns a post processor for the bundle resource with the given name.
*/
+ (instancetype)forResourceNamed:(NSString *)resourceName;

/**
* Returns a post processor for the resource at the specified path.
*/
+ (instancetype)forResourceAtPath:(NSString *)path;

/**
*  You can manage TyphoonConfigPostProcessor registry by mapping configuration classes for file extensions
*  Configuration class instance must conforms TyphoonConfiguration protocol
*  */
+ (void)registerConfigurationClass:(Class)configClass forExtension:(NSString *)typeExtension;

/** list of all supported path extensions (configuration types) */
+ (NSArray *)availableExtensions;

/** Append resource found in main bundle by name */
- (void)useResourceWithName:(NSString *)name;

/** Append resource loaded from file at path */
- (void)useResourceAtPath:(NSString *)path;

/** Append TyphoonResource with specified extension (@see availableExtensions method) */
- (void)useResource:(id<TyphoonResource>)resource withExtension:(NSString *)typeExtension;

@end

id TyphoonConfig(NSString *configKey);


text:
<?php
Library::import('recess.lang.codegen.CodeGenClassFile');
Library::import('recess.lang.codegen.CodeGenImport');
Library::import('recess.lang.codegen.CodeGenClass');
Library::import('recess.lang.codegen.CodeGenDocComment');
Library::import('recess.lang.codegen.CodeGenClassMember', true);
Library::import('recess.lang.codegen.CodeGenMethod');
Library::import('recess.lang.codegen.CodeGenProperty');

class CodeGen {
	const PUB = 'public';
	const PROT = 'protected';
	const PRIV = 'private';

	const STAT = 'static';

	const NL = "\n";
	const TAB = "\t";
}

?>


text:
.left-menu {width: 150px;margin:80px auto 0; float:right;background-color:#fff;position:absolute;}
table { border-collapse: collapse; border-spacing: 0; }
fieldset, img { border: 0; }
address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal; }
ol, ul { list-style: none; }
caption, th { text-align: left; }
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }
q:before, q:after { content: ''; }
abbr, acronym { border: 0; font-variant: normal; }
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
input:focus, textarea:focus, select:focus { outline: none; }
select, input { vertical-align: middle; }
legend { color: #000; }
.clean:before, .clean:after, .clearfix:before, .clearfix:after { content: ""; display: table; }
.clean:after, .clearfix:after { clear: both; }
.clean, .clearfix { zoom: 1; }
.clear { clear: both; }
.fl { float: left; }
.fr { float: right; }
.break { word-wrap: break-word; width: inherit; }
.linkhidden { text-indent: -9999em; overflow: hidden; }
.hidden { display: none; }
a{ text-decoration:none;}
.subNavBox{width:150px;border:solid 1px #e5e3da;}
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#999;line-height:28px;padding-left:10px;/* background:url(../jiantou1.jpg) no-repeat; */background-position:95% 50%}
/* .subNav:hover{color:#277fc2;} */
.currentDd{color:#277fc2}
/* .currentDt{background-image:url(../jiantou.jpg);} */
.navContent{display: none;border-bottom:solid 1px #e5e3da;}
.navContent li a{display:block;heighr:28px;text-align:center;font-size:14px;line-height:28px;color:#333}
.navContent li a:hover{color:#fff;background-color:#64c8df}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.58 -->
<refentry xml:id='function.pg-get-result' xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>pg_get_result</refname>
  <refpurpose>
   Get asynchronous query result
  </refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>resource</type><methodname>pg_get_result</methodname>
   <methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
  </methodsynopsis>
  <para>
   <function>pg_get_result</function> gets the result resource from
   an asynchronous query executed by
   <function>pg_send_query</function>, <function>pg_send_query_params</function> or
   <function>pg_send_execute</function>.
  </para>
  <para><function>pg_send_query</function> and the
   other asynchronous query functions
   can send multiple queries to a PostgreSQL server and
   <function>pg_get_result</function> is used to get each query's results,
   one by one.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>connection</parameter></term>
     <listitem>
      <para>
       PostgreSQL database connection resource.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   The result <type>resource</type>, or &false; if no more results are available.
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title><function>pg_get_result</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
  $dbconn = pg_connect("dbname=publisher") or die("Could not connect");

  if (!pg_connection_busy($dbconn)) {
      pg_send_query($dbconn, "select * from authors; select count(*) from authors;");
  }

  $res1 = pg_get_result($dbconn);
  echo "First call to pg_get_result(): $res1\n";
  $rows1 = pg_num_rows($res1);
  echo "$res1 has $rows1 records\n\n";

  $res2 = pg_get_result($dbconn);
  echo "Second call to pg_get_result(): $res2\n";
  $rows2 = pg_num_rows($res2);
  echo "$res2 has $rows2 records\n";
?>
]]>
    </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
First call to pg_get_result(): Resource id #3
Resource id #3 has 3 records

Second call to pg_get_result(): Resource id #4
Resource id #4 has 1 records
]]>
    </screen>
   </example>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>pg_send_query</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
package jsettlers.main.swing.menu.openpanel;

import jsettlers.graphics.localization.Labels;
import jsettlers.logic.map.loading.MapLoader;
import jsettlers.logic.map.loading.original.OriginalMapLoader;
import jsettlers.logic.map.loading.newmap.FreshMapLoader;

/**
 * Map filter for OpenPanel
 *
 * @author Andreas Butti
 */
public enum EMapFilter {

	/**
	 * No filtering
	 */
	ALL {
		@Override
		public boolean filter(MapLoader loader) {
			return true;
		}
	},

	/**
	 * JSettler Maps
	 */
	JSETTLER {
		@Override
		public boolean filter(MapLoader loader) {
			return loader instanceof FreshMapLoader;
		}
	},

	/**
	 * Mapps imported from Original settler
	 */
	SETTLER_IMPORTED {
		@Override
		public boolean filter(MapLoader loader) {
			return loader instanceof OriginalMapLoader;
		}
	};

	/**
	 * Translated name
	 */
	private final String name;

	/**
	 * Constructor
	 */
	private EMapFilter() {
		this.name = Labels.getString("mapfilter." + name());
	}

	/**
	 * Filter a single map entry
	 *
	 * @param loader
	 *            Map to filter
	 * @return true if it should be displayed
	 */
	public abstract boolean filter(MapLoader loader);

	/**
	 * @return Translated name
	 */
	public String getName() {
		return name;
	}
}


text:
current_dir = File.dirname(__FILE__)
log_level                :info
log_location             STDOUT
node_name                "jeyashreedeepika"
client_key               "#{current_dir}/jeyashreedeepika.pem"
chef_server_url          "https://api.chef.io/organizations/test-organization1"
cookbook_path            ["#{current_dir}/../cookbooks"]

cookbook_copyright "TCS"
cookbook_license "none"
cookbook_email "jeyashreedeepika.s@tcs.com"


text:
logger.info("Loading 0 objects to table finan_journalentry...")
# fields: voucher_ptr, printed_by, item_account, item_remark, last_item_date

loader.flush_deferred_objects()


text:
/* eslint no-underscore-dangle: 0 */

self.window = global;

// Remove native fetch as react-native use whatwg-fetch polyfill
self.fetch = undefined;

const MessageQueue = function MessageQueue() {};
MessageQueue.spy = () => {};
MessageQueue.prototype.__spy = null;

const requiredModules = {
  NativeModules: {},
  Platform: {},
  setupDevtools: undefined,
  AsyncStorage: {},
  MessageQueue,
};
// Simulate React Native's window.require polyfill
window.require = moduleName => {
  if (typeof moduleName !== 'number') {
    // From https://github.com/facebook/react-native/blob/5403946f098cc72c3d33ea5cee263fb3dd03891d/packager/src/Resolver/polyfills/require.js#L97
    console.warn(
      `Requiring module '${moduleName}' by name is only supported for ` +
        'debugging purposes and will BREAK IN PRODUCTION!'
    );
  }
  return requiredModules[moduleName];
};
window.__DEV__ = true;
window.__fbBatchedBridge = new MessageQueue();


text:
var fs = require('fs');
var tls = require('tls');

var server1Key = fs.readFileSync(__dirname + '/server1-key.pem');
var server1Cert = fs.readFileSync(__dirname + '/server1-cert.pem');
var clientKey = fs.readFileSync(__dirname + '/client-key.pem');
var clientCert = fs.readFileSync(__dirname + '/client-cert.pem');
var ca1Cert = fs.readFileSync(__dirname + '/ca1-cert.pem');
var ca3Cert = fs.readFileSync(__dirname + '/ca3-cert.pem');

var server = tls.createServer({
  key: server1Key,
  cert: server1Cert,
  ca: [ca3Cert],
  requestCert: true,
  rejectUnauthorized: true,
}, function(s) {
  console.log('connected on server');
  s.on('data', function(chunk) {
    console.log('S:' + chunk);
    s.write(chunk);
  });
  s.setEncoding('utf8');
}).listen(3000, function() {
  var c = tls.connect({
    host: 'localhost',
    port: 3000,
    key: clientKey,
    cert: clientCert,
    ca: [ca1Cert],
    rejectUnauthorized: true
  }, function() {
    console.log('connected on client');
    c.on('data', function(chunk) {
      console.log('C:' + chunk);
    });
    c.setEncoding('utf8');
    c.write('Hello');
  });
  c.on('error', function(err) {
    console.log(err);
  });
});


text:
ScriptCs.Fixie
==============

Script Pack to use the [Fixie test runner](http://fixie.github.io/) from ScriptCs

## Installation

In the same folder as the .csx file you're writing, run

	scriptcs -install scriptcs.fixie

## Usage

```
var fixie = Require<FixieRunner>();
fixie.RunAllTests();
```

Fixie is a convention-based test framework that, by default, runs all public methods in any class ending with the word 'Tests'

Note! Neither Fixie nor this Script Pack includes an assertion library. You will need to install your favorite and import it separately.

### Example

	scriptcs -install Shouldly

```
using Shouldly;

public class SomeTests
{
	public void Add()
	{
		1.ShouldBe(1);
	}
}

var fixie = Require<FixieRunner>();
fixie.RunAllTests();
```


text:
<dom-module id="tetris-piece">
  <template>

      <template is="dom-repeat" items="[[piece.block]]" filter="[[hideEmptyRows]]">

          <template is="dom-repeat" items="[[item]]">

          </template>

      </template>

  </template>
</dom-module>


text:
const fs = require('fs')
const path = require('path')

const Svgo = require('svgo')
const svgo = new Svgo({
  multipass: true,
  floatPrecision: 2
})

const icons = {}
const svgDir = path.resolve(__dirname, '../assets/icons/')
const extPattern = /\.svg$/

fs.readdirSync(svgDir).forEach(file => {
  if (!extPattern.test(file)) {
    return
  }
  svgo.optimize(fs.readFileSync(path.resolve(svgDir, file), 'utf8'), ({ error, data }) => {
    if (error) {
      return console.error(file, error)
    }

    const svg = data
    const sizeMatch = svg.match(/ viewBox="0 0 (\d+) (\d+)"/)
    const dMatch = svg.match(/ d="([^"]+)"/)
    if (!sizeMatch || !dMatch) {
      console.log(svg)
      console.error(file, 'not match')
      return
    }
    icons[file.replace(extPattern, '')] = {
      width: parseInt(sizeMatch[1], 10),
      height: parseInt(sizeMatch[2], 10),
      paths: [{
        d: dMatch[1]
      }]
    }
  })
})

fs.writeFileSync(path.resolve(__dirname, '../assets/icons.json'), JSON.stringify(icons, null, '  '))


text:
/* ###
 * IP: GHIDRA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package docking.theme.gui;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.*;
import java.util.*;
import java.util.stream.Collectors;

import javax.swing.*;

import docking.*;
import docking.action.ActionContextProvider;
import docking.action.DockingAction;
import docking.action.builder.ActionBuilder;
import docking.widgets.OptionDialog;
import docking.widgets.combobox.GhidraComboBox;
import generic.theme.*;
import ghidra.util.*;

/**
 * Primary dialog for editing Themes.
 */
public class ThemeDialog extends DialogComponentProvider {
	private static ThemeDialog INSTANCE;

	private JButton saveButton;
	private JButton restoreButton;
	private GhidraComboBox<String> combo;
	private ItemListener comboListener = this::themeComboChanged;
	private ThemeListener listener = new DialogThemeListener();
	private JTabbedPane tabbedPane;

	private ThemeColorTable colorTable;
	private ThemeFontTable fontTable;
	private ThemeIconTable iconTable;

	private ThemeManager themeManager;

	public ThemeDialog(ThemeManager themeManager) {
		super("Theme Dialog", false);
		this.themeManager = themeManager;
		addWorkPanel(createMainPanel());

		addDismissButton();
		addButton(createSaveButton());
		addButton(createRestoreButton());

		setPreferredSize(1100, 500);
		setRememberSize(false);
		updateButtons();
		createActions();
		Gui.addThemeListener(listener);
		setHelpLocation(new HelpLocation("Theming", "Edit_Theme"));
	}

	private void createActions() {
		DockingAction reloadDefaultsAction = new ActionBuilder("Reload Ghidra Defaults", getTitle())
				.toolBarIcon(new GIcon("icon.refresh"))
				.helpLocation(new HelpLocation("Theming", "Reload_Ghidra_Defaults"))
				.onAction(e -> reloadDefaultsCallback())
				.build();
		addAction(reloadDefaultsAction);

		DockingAction resetValueAction = new ActionBuilder("Restore Value", getTitle())
				.popupMenuPath("Restore Value")
				.withContext(ThemeTableContext.class)
				.enabledWhen(c -> c.isChanged())
				.popupWhen(c -> true)
				.helpLocation(new HelpLocation("Theming", "Restore_Value"))
				.onAction(c -> c.getThemeValue().installValue(themeManager))
				.build();
		addAction(resetValueAction);
	}

	@Override
	protected void dismissCallback() {
		if (handleChanges()) {
			INSTANCE = null;
			close();
		}
	}

	private boolean handleChanges() {
		if (themeManager.hasThemeChanges()) {
			int result = OptionDialog.showYesNoCancelDialog(null, "Close Theme Dialog",
				"You have changed the theme.\n Do you want save your changes?");
			if (result == OptionDialog.CANCEL_OPTION) {
				return false;
			}
			if (result == OptionDialog.YES_OPTION) {
				return ThemeUtils.saveThemeChanges(themeManager);
			}
			themeManager.restoreThemeValues();
		}
		return true;
	}

	protected void saveCallback() {
		ThemeUtils.saveThemeChanges(themeManager);
	}

	private void restoreCallback() {
		if (themeManager.hasThemeChanges()) {
			int result = OptionDialog.showYesNoDialog(null, "Restore Theme Values",
				"Are you sure you want to discard all your changes?");
			if (result == OptionDialog.NO_OPTION) {
				return;
			}
		}
		themeManager.restoreThemeValues();
	}

	private void reloadDefaultsCallback() {
		if (themeManager.hasThemeChanges()) {
			int result = OptionDialog.showYesNoDialog(null, "Reload Ghidra Default Values",
				"This will discard all your theme changes. Continue?");
			if (result == OptionDialog.NO_OPTION) {
				return;
			}
		}
		themeManager.reloadApplicationDefaults();
	}

	private void reset() {
		colorTable.reloadAll();
		fontTable.reloadAll();
		iconTable.reloadAll();
		updateButtons();
		updateCombo();
	}

	private void themeComboChanged(ItemEvent e) {

		if (e.getStateChange() != ItemEvent.SELECTED) {
			return;
		}

		if (!ThemeUtils.askToSaveThemeChanges(themeManager)) {
			Swing.runLater(() -> updateCombo());
			return;
		}
		String themeName = (String) e.getItem();

		Swing.runLater(() -> {
			GTheme theme = themeManager.getTheme(themeName);
			themeManager.setTheme(theme);
			if (theme.getLookAndFeelType() == LafType.GTK) {
				setStatusText(
					"Warning - Themes using the GTK LookAndFeel do not support changing java component colors, fonts or icons.",
					MessageType.ERROR);
			}
			else {
				setStatusText("");
			}
			colorTable.reloadAll();
			fontTable.reloadAll();
			iconTable.reloadAll();
		});
	}

	private void updateButtons() {
		boolean hasChanges = themeManager.hasThemeChanges();
		saveButton.setEnabled(hasChanges);
		restoreButton.setEnabled(hasChanges);
	}

	private JComponent createMainPanel() {
		JPanel panel = new JPanel();

		panel.setLayout(new BorderLayout());
		panel.add(buildControlPanel(), BorderLayout.NORTH);
		panel.add(buildTabedTables());
		return panel;
	}

	private Component buildControlPanel() {
		JPanel panel = new JPanel(new BorderLayout());
		panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
		panel.add(buildThemeCombo(), BorderLayout.WEST);
		panel.setName("gthemePanel");
		return panel;
	}

	private void updateCombo() {
		Set<GTheme> supportedThemes = themeManager.getSupportedThemes();
		List<String> themeNames =
			supportedThemes.stream().map(t -> t.getName()).collect(Collectors.toList());
		Collections.sort(themeNames);
		combo.removeItemListener(comboListener);
		combo.setModel(new DefaultComboBoxModel<String>(new Vector<String>(themeNames)));
		combo.setSelectedItem(themeManager.getActiveTheme().getName());
		combo.addItemListener(comboListener);
	}

	private Component buildThemeCombo() {
		JPanel panel = new JPanel();
		Set<GTheme> supportedThemes = themeManager.getSupportedThemes();
		List<String> themeNames =
			supportedThemes.stream().map(t -> t.getName()).collect(Collectors.toList());
		Collections.sort(themeNames);

		combo = new GhidraComboBox<>(themeNames);
		combo.setSelectedItem(themeManager.getActiveTheme().getName());
		combo.addItemListener(comboListener);

		panel.add(new JLabel("Theme: "), BorderLayout.WEST);
		panel.add(combo);
		panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
		return panel;
	}

	private Component buildTabedTables() {
		tabbedPane = new JTabbedPane();
		colorTable = new ThemeColorTable(themeManager);
		fontTable = new ThemeFontTable(themeManager);
		iconTable = new ThemeIconTable(themeManager);
		tabbedPane.add("Colors", colorTable);
		tabbedPane.add("Fonts", fontTable);
		tabbedPane.add("Icons", iconTable);
		return tabbedPane;
	}

	private JButton createRestoreButton() {
		restoreButton = new JButton("Restore");
		restoreButton.setMnemonic('R');
		restoreButton.setName("Restore");
		restoreButton.addActionListener(e -> restoreCallback());
		restoreButton.setToolTipText("Restores all values to current theme");
		return restoreButton;
	}

	private JButton createSaveButton() {
		saveButton = new JButton("Save");
		saveButton.setMnemonic('S');
		saveButton.setName("Save");
		saveButton.addActionListener(e -> saveCallback());
		saveButton.setToolTipText("Saves changed values to a new Theme");
		return saveButton;
	}

	/**
	 * Edits the current theme
	 * @param themeManager the application ThemeManager
	 */
	public static void editTheme(ThemeManager themeManager) {
		if (INSTANCE != null) {
			INSTANCE.toFront();
			return;
		}
		INSTANCE = new ThemeDialog(themeManager);
		DockingWindowManager.showDialog(INSTANCE);

	}

	@Override
	public void close() {
		Gui.removeThemeListener(listener);
		super.close();
	}

	@Override
	public ActionContext getActionContext(MouseEvent event) {
		ActionContextProvider contextProvider =
			(ActionContextProvider) tabbedPane.getSelectedComponent();
		return contextProvider.getActionContext(event);
	}

	class DialogThemeListener implements ThemeListener {
		@Override
		public void themeChanged(ThemeEvent event) {
			if (event.haveAllValuesChanged()) {
				reset();
				return;
			}
			if (event.hasAnyColorChanged()) {
				colorTable.reloadCurrent();
			}
			if (event.hasAnyFontChanged()) {
				fontTable.reloadCurrent();
			}
			if (event.hasAnyIconChanged()) {
				iconTable.reloadCurrent();
			}
			updateButtons();
		}
	}
}


text:
"use strict";

const Config = require("./config");

class Resource {

    constructor(id, position, type, amount)
    {
        this.id = id;
        this.position = position;
        this.type = type;
        this.amount = amount;
        this.area = Config.RESOURCE_AREA;
        this.farmRange = Config.RESOURCE_FARM_AREA;
    }

    static resourceTypes() {
        return {
            Triangle : "Triangle",
            Square   : "Square",
            Pentagon : "Pentagon"
        };
    }

    static getResourceType(i) {
        switch (i) {
            case 0:
                return Resource.resourceTypes().Triangle;
                break;
            case 1:
                return Resource.resourceTypes().Square;
                break;
            case 2:
                return Resource.resourceTypes().Pentagon;
                break;

            default:
                return Resource.resourceTypes().Triangle;
        }
    }
}

module.exports = Resource;


text:
file(REMOVE_RECURSE
  "CMakeFiles/test.dir/re2/testing/backtrack.cc.obj"
  "CMakeFiles/test.dir/re2/testing/dump.cc.obj"
  "CMakeFiles/test.dir/re2/testing/exhaustive_tester.cc.obj"
  "CMakeFiles/test.dir/re2/testing/null_walker.cc.obj"
  "CMakeFiles/test.dir/re2/testing/regexp_generator.cc.obj"
  "CMakeFiles/test.dir/re2/testing/string_generator.cc.obj"
  "CMakeFiles/test.dir/re2/testing/tester.cc.obj"
  "CMakeFiles/test.dir/util/pcre.cc.obj"
  "CMakeFiles/test.dir/util/random.cc.obj"
  "CMakeFiles/test.dir/util/threadwin.cc.obj"
  "CMakeFiles/test.dir/util/test.cc.obj"
  "test.pdb"
  "test.lib"
)

# Per-language clean rules from dependency scanning.
foreach(lang CXX)
  include(CMakeFiles/test.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()


text:
title:  "LLDB 디버거 명령어"
description: Dancing in the Debugger — A Waltz with LLDB
---

[Dancing in the Debugger — A Waltz with LLDB]

[Dancing in the Debugger — A Waltz with LLDB]: https://www.objc.io/issues/19-debugging/lldb-debugging/


text:
from game_object import GameObject

class Trait(GameObject):
    def __init__(self, name, description):
        self.name = name
        self.description = description

    def __str__(self):
        return '{}: {}'.format(self.name, self.description)


text:
import initPipelineDetails from '~/pipelines/pipeline_details_bundle';
import initPipelines from '../init_pipelines';

document.addEventListener('DOMContentLoaded', () => {
  initPipelines();
  initPipelineDetails();
});


text:
using System.Collections.Generic;

using Newtonsoft.Json;

namespace MailChimp.Net.Models
{
    /// <summary>
    /// The click member.
    /// </summary>
    public class ClickMember
    {
        /// <summary>
        /// Gets or sets the campaign id.
        /// </summary>
        [JsonProperty("campaign_id")]
        public string CampaignId { get; set; }

        /// <summary>
        /// Gets or sets the clicks.
        /// </summary>
        [JsonProperty("clicks")]
        public int Clicks { get; set; }

        /// <summary>
        /// Gets or sets the email address.
        /// </summary>
        [JsonProperty("email_address")]
        public string EmailAddress { get; set; }

        /// <summary>
        /// Gets or sets the email id.
        /// </summary>
        [JsonProperty("email_id")]
        public string EmailId { get; set; }

        /// <summary>
        /// Gets or sets the links.
        /// </summary>
        [JsonProperty("_links")]
        public IEnumerable<Link> Links { get; set; }

        /// <summary>
        /// Gets or sets the list id.
        /// </summary>
        [JsonProperty("list_id")]
        public string ListId { get; set; }

        /// <summary>
        /// Gets or sets the url id.
        /// </summary>
        [JsonProperty("url_id")]
        public string UrlId { get; set; }
    }
}


text:
'use strict';

import {createEventTarget} from 'dom-event-testing-library';

let React;
let ReactFeatureFlags;
let ReactDOM;
let Scheduler;

describe('mixing responders with the heritage event system', () => {
  let container;

  beforeEach(() => {
    ReactFeatureFlags = require('shared/ReactFeatureFlags');
    ReactFeatureFlags.enableDeprecatedFlareAPI = true;
    React = require('react');
    ReactDOM = require('react-dom');
    Scheduler = require('scheduler');
    container = document.createElement('div');
    document.body.appendChild(container);
  });

  afterEach(() => {
    document.body.removeChild(container);
    container = null;
  });

  // @gate experimental
  it('should properly only flush sync once when the event systems are mixed', () => {
    const useTap = require('react-interactions/events/tap').useTap;
    const ref = React.createRef();
    let renderCounts = 0;

    function MyComponent() {
      const [, updateCounter] = React.useState(0);
      renderCounts++;

      function handleTap() {
        updateCounter(count => count + 1);
      }

      const listener = useTap({
        onTapEnd: handleTap,
      });

      return (

          <button
            ref={ref}
            DEPRECATED_flareListeners={listener}
            onClick={() => {
              updateCounter(count => count + 1);
            }}>
            Press me
          </button>

      );
    }

    const newContainer = document.createElement('div');
    const root = ReactDOM.createRoot(newContainer);
    document.body.appendChild(newContainer);
    root.render(<MyComponent />);
    Scheduler.unstable_flushAll();

    const target = createEventTarget(ref.current);
    target.pointerdown({timeStamp: 100});
    target.pointerup({timeStamp: 100});
    target.click({timeStamp: 100});

    if (__DEV__) {
      expect(renderCounts).toBe(2);
    } else {
      expect(renderCounts).toBe(1);
    }
    Scheduler.unstable_flushAll();
    if (__DEV__) {
      expect(renderCounts).toBe(4);
    } else {
      expect(renderCounts).toBe(2);
    }

    target.pointerdown({timeStamp: 100});
    target.pointerup({timeStamp: 100});
    // Ensure the timeStamp logic works
    target.click({timeStamp: 101});

    if (__DEV__) {
      expect(renderCounts).toBe(6);
    } else {
      expect(renderCounts).toBe(3);
    }

    Scheduler.unstable_flushAll();
    document.body.removeChild(newContainer);
  });

  // @gate experimental
  it(
    'should only flush before outermost discrete event handler when mixing ' +
      'event systems',
    async () => {
      const {useState} = React;
      const useTap = require('react-interactions/events/tap').useTap;

      const button = React.createRef();

      function MyComponent() {
        const [pressesCount, updatePressesCount] = useState(0);
        const [clicksCount, updateClicksCount] = useState(0);

        function handleTap() {
          // This dispatches a synchronous, discrete event in the legacy event
          // system. However, because it's nested inside the new event system,
          // its updates should not flush until the end of the outer handler.
          const target = createEventTarget(button.current);
          target.click();
          // Text context should not have changed
          Scheduler.unstable_yieldValue(newContainer.textContent);
          updatePressesCount(pressesCount + 1);
        }

        const tap = useTap({
          onTapEnd: handleTap,
        });

        return (

            <button
              DEPRECATED_flareListeners={tap}
              ref={button}
              onClick={() => updateClicksCount(clicksCount + 1)}>
              Presses: {pressesCount}, Clicks: {clicksCount}
            </button>

        );
      }

      const newContainer = document.createElement('div');
      document.body.appendChild(newContainer);
      const root = ReactDOM.createRoot(newContainer);

      root.render(<MyComponent />);
      expect(Scheduler).toFlushWithoutYielding();
      expect(newContainer.textContent).toEqual('Presses: 0, Clicks: 0');

      const target = createEventTarget(button.current);
      target.pointerdown({timeStamp: 100});
      target.pointerup({timeStamp: 100});

      expect(Scheduler).toHaveYielded(['Presses: 0, Clicks: 0']);
      expect(Scheduler).toFlushWithoutYielding();
      expect(newContainer.textContent).toEqual('Presses: 1, Clicks: 1');
    },
  );

  describe('mixing the Input and Press repsonders', () => {
    // @gate experimental
    it('is async for non-input events', () => {
      const useTap = require('react-interactions/events/tap').useTap;
      const useInput = require('react-interactions/events/input').useInput;
      const root = ReactDOM.createRoot(container);
      let input;

      function Component({innerRef, onChange, controlledValue, listeners}) {
        const inputListener = useInput({onChange});
        return (
          <input
            type="text"
            ref={innerRef}
            value={controlledValue}
            DEPRECATED_flareListeners={[inputListener, listeners]}
          />
        );
      }

      function PressWrapper({innerRef, onTap, onChange, controlledValue}) {
        const tap = useTap({
          onTapEnd: onTap,
        });
        return (
          <Component
            onChange={onChange}
            innerRef={el => (input = el)}
            controlledValue={controlledValue}
            listeners={tap}
          />
        );
      }

      class ControlledInput extends React.Component {
        state = {value: 'initial'};
        onChange = event => this.setState({value: event.target.value});
        reset = () => {
          this.setState({value: ''});
        };
        render() {
          Scheduler.unstable_yieldValue(`render: ${this.state.value}`);
          const controlledValue =
            this.state.value === 'changed' ? 'changed [!]' : this.state.value;
          return (
            <PressWrapper
              onTap={this.reset}
              onChange={this.onChange}
              innerRef={el => (input = el)}
              controlledValue={controlledValue}
            />
          );
        }
      }

      // Initial mount. Test that this is async.
      root.render(<ControlledInput />);
      // Should not have flushed yet.
      expect(Scheduler).toHaveYielded([]);
      expect(input).toBe(undefined);
      // Flush callbacks.
      expect(Scheduler).toFlushAndYield(['render: initial']);
      expect(input.value).toBe('initial');

      // Trigger a click event
      input.dispatchEvent(
        new MouseEvent('mousedown', {
          bubbles: true,
          cancelable: true,
          buttons: 1,
        }),
      );
      input.dispatchEvent(
        new MouseEvent('mouseup', {
          bubbles: true,
          cancelable: true,
          buttons: 0,
        }),
      );
      // Nothing should have changed
      expect(Scheduler).toHaveYielded([]);
      expect(input.value).toBe('initial');

      // Flush callbacks.
      // Now the click update has flushed.
      expect(Scheduler).toFlushAndYield(['render: ']);
      expect(input.value).toBe('');
    });
  });
});


text:
set -ex

cd $(dirname $0)/../../..
git_root=$(pwd)
cd -

# Ensure existence of ccache directory
mkdir -p /tmp/ccache

# Ensure existence of the home directory for XDG caches (e.g. what pip uses for
# its cache location now that --download-cache is deprecated).
mkdir -p /tmp/xdg-cache-home

# Create a local branch so the child Docker script won't complain
git branch -f jenkins-docker

# Inputs
# DOCKERFILE_DIR - Directory in which Dockerfile file is located.
# DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root)

# Use image name based on Dockerfile location checksum
DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ )

# Make sure docker image has been built. Should be instantaneous if so.
docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR

# Choose random name for docker container
CONTAINER_NAME="run_tests_$(uuidgen)"

# Git root as seen by the docker instance
docker_instance_git_root=/var/local/jenkins/grpc

# Run tests inside docker
docker run \
  -e "RUN_TESTS_COMMAND=$RUN_TESTS_COMMAND" \
  -e "config=$config" \
  -e "arch=$arch" \
  -e CCACHE_DIR=/tmp/ccache \
  -e XDG_CACHE_HOME=/tmp/xdg-cache-home \
  -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \
  -e HOST_GIT_ROOT=$git_root \
  -e LOCAL_GIT_ROOT=$docker_instance_git_root \
  -e "BUILD_ID=$BUILD_ID" \
  -i $TTY_FLAG \
  -v "$git_root:$docker_instance_git_root" \
  -v /tmp/ccache:/tmp/ccache \
  -v /tmp/npm-cache:/tmp/npm-cache \
  -v /tmp/xdg-cache-home:/tmp/xdg-cache-home \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v $(which docker):/bin/docker \
  -w /var/local/git/grpc \
  --name=$CONTAINER_NAME \
  $DOCKER_IMAGE_NAME \
  bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_FAILED="true"

docker cp "$CONTAINER_NAME:/var/local/git/grpc/reports.zip" $git_root || true
unzip -o $git_root/reports.zip -d $git_root || true
rm -f reports.zip

# remove the container, possibly killing it first
docker rm -f $CONTAINER_NAME || true

if [ "$DOCKER_FAILED" != "" ] && [ "$XML_REPORT" == "" ]
then
  exit 1
fi


text:
'use strict'
const http = require('http');
const url = require('url');
const mqtt = require('mqtt');
const config = require('./config')
const staticalserver = require('./statical-server');
const apihandler = require('./api-handler');
const mqtthandler = require('./mqtt-handler');

if (process.argv[2]) {
  if (process.argv[2] == '-h') {
    console.log('locker - help');
    console.log('modo de uso:');
    console.log('  node server [hostname/ip] [port]');
    return;
  }
  if (process.argv[2] == '-config') {
    console.log('locker.id.............: ' + config.locker.id);
    console.log('locker.name...........: ' + config.locker.name);
    console.log('web.hostname..........: ' + config.web.hostname);
    console.log('web.port..............: ' + config.web.port);
    console.log('api.version...........: ' + config.api.version);
    console.log('mqtt.server...........: ' + config.mqtt.server);
    console.log('mqtt.port.............: ' + config.mqtt.port);
    console.log('mqtt.username.........: ' + config.mqtt.username);
    console.log('mqtt.password.........: ' + config.mqtt.password);
    console.log('mqtt.queue.order......: ' + config.mqtt.queue.order);
    delete process.argv[2];
    delete process.argv[3];
  }
}

//http server
const hostname = process.argv[2] || config.web.hostname;
const port = process.argv[3] || config.web.port;
const server = http.createServer((req, res) => {
  if (req.url.startsWith('/'+config.api.version+'/')) {
    var api = new apihandler();
    api.process(req, res);
  } else {
    var web = new staticalserver();
    web.process(req, res);
  }
}).listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

//mqtt
const client = mqtt.connect(
  config.mqtt.server + ':' + config.mqtt.port, {
    "username": config.mqtt.username,
    "password": config.mqtt.password
  })
  .on('connect', function () {
    console.log('Mqtt connected');
    client.subscribe(config.locker.id);
    client.subscribe(config.mqtt.queue.order);
    client.subscribe(config.mqtt.queue.server);
    client.publish(config.locker.id, JSON.stringify({
      "lockerId": config.locker.id,
      "process": "api-server",
      "datetime": new Date(),
      "command": "on"
    }));
  }).on('message', function (topic, message) {
    console.log('Mqtt message recivied');
    var handler = new mqtthandler();
    handler.process(topic, message);
  });

//heartbeat
setInterval(() => {
  console.log('Interval to publish heartbeat');
  client.publish(config.locker.id, JSON.stringify({
    "lockerId": config.locker.id,
    "process": "api-server",
    "datetime": new Date(),
    "command": "heartbeat"
  }), function(err) {
    if(err) {
      console.log('heartbeat-publish-error: ' + err);
    }
  })
},
60000); // 1 min


text:
IMPLEMENT_SERVERCLASS_ST(CAssassinSmoke, DT_AssassinSmoke)
END_SEND_TABLE()

LINK_ENTITY_TO_CLASS(env_assassinsmoke, CAssassinSmoke);

CAssassinSmoke* CAssassinSmoke::CreateAssassinSmoke(const Vector &pos)
{
	CBaseEntity *pEnt = CreateEntityByName(ASSASSINSMOKE_ENTITYNAME);
	if(pEnt)
	{
		CAssassinSmoke *pEffect = dynamic_cast<CAssassinSmoke*>(pEnt);
		if (pEffect && pEffect->edict())
		{
			pEffect->SetLocalOrigin( pos );
			pEffect->Activate();
			return pEffect;
		}
		else
		{
			UTIL_Remove(pEnt);
		}
	}

	return NULL;
}


text:
using System.Collections.Generic;
using DatenMeister.Core.EMOF.Implementation;
using DatenMeister.Core.EMOF.Interface.Common;
using DatenMeister.Core.EMOF.Interface.Reflection;
using DatenMeister.Core.Provider.InMemory;

namespace DatenMeister.Core.Extensions.Functions.Aggregation
{
    /// <summary>
    /// Performs a grouping by metaclass
    /// </summary>
    public class GroupByMetaclass : TemporaryReflectiveCollection
    {
        /// <summary>
        /// Stores the extent being used to provide the information
        /// </summary>
        private readonly MofUriExtent _extent = new(new InMemoryProvider(), "dm:///temp", null);

        private readonly IReflectiveCollection _reflectiveCollection;

        public GroupByMetaclass(
            IReflectiveCollection reflectiveCollection)
        {
            _reflectiveCollection = reflectiveCollection;

            PerformGrouping();
        }

        /// <summary>
        /// Performs the grouping
        /// </summary>
        private void PerformGrouping()
        {
            var factory = new MofFactory(_extent);

            var dictionary = new Dictionary<IElement, List<object>>();
            var rest = new List<object>();

            // Perform the grouping
            foreach (var value in _reflectiveCollection)
            {
                if (value == null)
                {
                    continue;
                }

                var element = value as IElement;
                var metaClass = element?.getMetaClass();
                if (metaClass == null)
                {
                    rest.Add(value);
                }
                else
                {
                    if (dictionary.TryGetValue(metaClass, out var list))
                    {
                        list.Add(value!);
                    }
                    else
                    {
                        list = new List<object> { value! };
                        dictionary[metaClass] = list;
                    }
                }
            }

            // Now convert to MOF
            foreach (var pair in dictionary)
            {
                var mofElement = factory.create(null);
                mofElement.set("metaclass", pair.Key);
                mofElement.set("elements", pair.Value);

                add(mofElement);
            }

            if (rest.Count > 0)
            {
                var mofElement = factory.create(null);
                mofElement.set("metaclass", null);
                mofElement.set("elements", rest);

                add(mofElement);
            }
        }
    }
}


text:
using System;

namespace Apache.NMS.ZMQ
{
	/// <summary>
	/// Summary description for Queue.
	/// </summary>
	public class Queue : Destination, IQueue
	{
		public Queue(Session session, string name)
			: base(session, name)
		{
		}

		override public DestinationType DestinationType
		{
			get { return DestinationType.Queue; }
		}

		#region IQueue Members

		public string QueueName
		{
			get { return Name; }
		}

		#endregion

		/// <summary>
		/// </summary>
		/// <returns>string representation of this instance</returns>
		public override string ToString()
		{
			return "queue://" + this.destinationName;
		}
	}
}