text:
package com.google.maps.android.data.kml;

import com.google.android.gms.maps.model.LatLng;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

public class KmlPolygonTest {
    private KmlPolygon createRegularPolygon() {
        List<LatLng> outerCoordinates = new ArrayList<>();
        outerCoordinates.add(new LatLng(10, 10));
        outerCoordinates.add(new LatLng(20, 20));
        outerCoordinates.add(new LatLng(30, 30));
        outerCoordinates.add(new LatLng(10, 10));
        List<List<LatLng>> innerCoordinates = new ArrayList<>();
        List<LatLng> innerHole = new ArrayList<>();
        innerHole.add(new LatLng(20, 20));
        innerHole.add(new LatLng(10, 10));
        innerHole.add(new LatLng(20, 20));
        innerCoordinates.add(innerHole);
        return new KmlPolygon(outerCoordinates, innerCoordinates);
    }

    private KmlPolygon createOuterPolygon() {
        ArrayList<LatLng> outerCoordinates = new ArrayList<>();
        outerCoordinates.add(new LatLng(10, 10));
        outerCoordinates.add(new LatLng(20, 20));
        outerCoordinates.add(new LatLng(30, 30));
        outerCoordinates.add(new LatLng(10, 10));
        return new KmlPolygon(outerCoordinates, null);
    }

    @Test
    public void testGetType() {
        KmlPolygon kmlPolygon = createRegularPolygon();
        assertNotNull(kmlPolygon);
        assertNotNull(kmlPolygon.getGeometryType());
        assertEquals("Polygon", kmlPolygon.getGeometryType());
    }

    @Test
    public void testGetOuterBoundaryCoordinates() {
        KmlPolygon kmlPolygon = createRegularPolygon();
        assertNotNull(kmlPolygon);
        assertNotNull(kmlPolygon.getOuterBoundaryCoordinates());
        kmlPolygon = createOuterPolygon();
        assertNotNull(kmlPolygon);
        assertNotNull(kmlPolygon.getOuterBoundaryCoordinates());
    }

    @Test
    public void testGetInnerBoundaryCoordinates() {
        KmlPolygon kmlPolygon = createRegularPolygon();
        assertNotNull(kmlPolygon);
        assertNotNull(kmlPolygon.getInnerBoundaryCoordinates());
        kmlPolygon = createOuterPolygon();
        assertNotNull(kmlPolygon);
        assertNull(kmlPolygon.getInnerBoundaryCoordinates());
    }

    @Test
    public void testGetKmlGeometryObject() {
        KmlPolygon kmlPolygon = createRegularPolygon();
        assertNotNull(kmlPolygon);
        assertNotNull(kmlPolygon.getGeometryObject());
        assertEquals(2, kmlPolygon.getGeometryObject().size());
        kmlPolygon = createOuterPolygon();
        assertNotNull(kmlPolygon);
        assertNotNull(kmlPolygon.getGeometryObject());
        assertEquals(1, kmlPolygon.getGeometryObject().size());
    }
}


text:
package purecsv

import java.io.CharArrayReader

import purecsv.unsafe.OpenCSVSplitter
import org.scalatest.{FunSuite, Matchers}

class RecordSplitterSuite extends FunSuite with Matchers {

  test("OpenCSVSplitter works with no records") {
    val reader = new CharArrayReader("".toCharArray)
    OpenCSVSplitter.getRecords(reader).toSeq should contain theSameElementsInOrderAs(Seq.empty)
  }

  test("OpenCSVSplitter works with two records") {
    val reader = new CharArrayReader("foo,bar\nbar,foo".toCharArray)
    OpenCSVSplitter.getRecords(reader).toSeq should contain theSameElementsInOrderAs(Seq(Seq("foo","bar"),Seq("bar","foo")))
  }

}

redpajama_set_name: RedPajamaGithub


text:
package bolt

import (
	"context"
	"fmt"
	"io"
	"os"
	"path"
	"time"

	bolt "github.com/coreos/bbolt"
	"github.com/influxdata/influxdb/v2/chronograf"
	"github.com/influxdata/influxdb/v2/chronograf/id"
)

// Client is a client for the boltDB data store.
type Client struct {
	Path      string
	db        *bolt.DB
	logger    chronograf.Logger
	isNew     bool
	Now       func() time.Time
	LayoutIDs chronograf.ID

	BuildStore              *BuildStore
	SourcesStore            *SourcesStore
	ServersStore            *ServersStore
	LayoutsStore            *LayoutsStore
	DashboardsStore         *DashboardsStore
	UsersStore              *UsersStore
	OrganizationsStore      *OrganizationsStore
	ConfigStore             *ConfigStore
	MappingsStore           *MappingsStore
	OrganizationConfigStore *OrganizationConfigStore
}

// NewClient initializes all stores
func NewClient() *Client {
	c := &Client{Now: time.Now}
	c.BuildStore = &BuildStore{client: c}
	c.SourcesStore = &SourcesStore{client: c}
	c.ServersStore = &ServersStore{client: c}
	c.LayoutsStore = &LayoutsStore{
		client: c,
		IDs:    &id.UUID{},
	}
	c.DashboardsStore = &DashboardsStore{
		client: c,
		IDs:    &id.UUID{},
	}
	c.UsersStore = &UsersStore{client: c}
	c.OrganizationsStore = &OrganizationsStore{client: c}
	c.ConfigStore = &ConfigStore{client: c}
	c.MappingsStore = &MappingsStore{client: c}
	c.OrganizationConfigStore = &OrganizationConfigStore{client: c}
	return c
}

// WithDB sets the boltdb database for a client. It should not be called
// after a call to Open.
func (c *Client) WithDB(db *bolt.DB) {
	c.db = db
}

// Option to change behavior of Open()
type Option interface {
	Backup() bool
}

// WithBackup returns a Backup
func WithBackup() Option {
	return Backup{}
}

// Backup tells Open to perform a backup prior to initialization
type Backup struct {
}

// Backup returns true
func (b Backup) Backup() bool {
	return true
}

// Open / create boltDB file.
func (c *Client) Open(ctx context.Context, logger chronograf.Logger, build chronograf.BuildInfo, opts ...Option) error {
	if c.db == nil {
		if _, err := os.Stat(c.Path); os.IsNotExist(err) {
			c.isNew = true
		} else if err != nil {
			return err
		}

		// Open database file.
		db, err := bolt.Open(c.Path, 0600, &bolt.Options{Timeout: 1 * time.Second})
		if err != nil {
			return fmt.Errorf("unable to open boltdb; is there a chronograf already running?  %v", err)
		}
		c.db = db
		c.logger = logger

		for _, opt := range opts {
			if opt.Backup() {
				if err = c.backup(ctx, build); err != nil {
					return fmt.Errorf("unable to backup your database prior to migrations:  %v", err)
				}
			}
		}
	}

	if err := c.initialize(ctx); err != nil {
		return fmt.Errorf("unable to boot boltdb:  %v", err)
	}
	if err := c.migrate(ctx, build); err != nil {
		return fmt.Errorf("unable to migrate boltdb:  %v", err)
	}

	return nil
}

// initialize creates Buckets that are missing
func (c *Client) initialize(ctx context.Context) error {
	if err := c.db.Update(func(tx *bolt.Tx) error {
		// Always create SchemaVersions bucket.
		if _, err := tx.CreateBucketIfNotExists(SchemaVersionBucket); err != nil {
			return err
		}
		// Always create Organizations bucket.
		if _, err := tx.CreateBucketIfNotExists(OrganizationsBucket); err != nil {
			return err
		}
		// Always create Sources bucket.
		if _, err := tx.CreateBucketIfNotExists(SourcesBucket); err != nil {
			return err
		}
		// Always create Servers bucket.
		if _, err := tx.CreateBucketIfNotExists(ServersBucket); err != nil {
			return err
		}
		// Always create Layouts bucket.
		if _, err := tx.CreateBucketIfNotExists(LayoutsBucket); err != nil {
			return err
		}
		// Always create Dashboards bucket.
		if _, err := tx.CreateBucketIfNotExists(DashboardsBucket); err != nil {
			return err
		}
		// Always create Users bucket.
		if _, err := tx.CreateBucketIfNotExists(UsersBucket); err != nil {
			return err
		}
		// Always create Config bucket.
		if _, err := tx.CreateBucketIfNotExists(ConfigBucket); err != nil {
			return err
		}
		// Always create Build bucket.
		if _, err := tx.CreateBucketIfNotExists(BuildBucket); err != nil {
			return err
		}
		// Always create Mapping bucket.
		if _, err := tx.CreateBucketIfNotExists(MappingsBucket); err != nil {
			return err
		}
		// Always create OrganizationConfig bucket.
		if _, err := tx.CreateBucketIfNotExists(OrganizationConfigBucket); err != nil {
			return err
		}
		return nil
	}); err != nil {
		return err
	}

	return nil
}

// migrate moves data from an old schema to a new schema in each Store
func (c *Client) migrate(ctx context.Context, build chronograf.BuildInfo) error {
	if c.db != nil {
		// Runtime migrations
		if err := c.OrganizationsStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.SourcesStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.ServersStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.LayoutsStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.DashboardsStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.ConfigStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.BuildStore.Migrate(ctx, build); err != nil {
			return err
		}
		if err := c.MappingsStore.Migrate(ctx); err != nil {
			return err
		}
		if err := c.OrganizationConfigStore.Migrate(ctx); err != nil {
			return err
		}

		MigrateAll(c)
	}
	return nil
}

// Close the connection to the bolt database
func (c *Client) Close() error {
	if c.db != nil {
		return c.db.Close()
	}
	return nil
}

// copy creates a copy of the database in toFile
func (c *Client) copy(ctx context.Context, version string) error {
	backupDir := path.Join(path.Dir(c.Path), "backup")
	if _, err := os.Stat(backupDir); os.IsNotExist(err) {
		if err = os.Mkdir(backupDir, 0700); err != nil {
			return err
		}
	} else if err != nil {
		return err
	}

	fromFile, err := os.Open(c.Path)
	if err != nil {
		return err
	}
	defer fromFile.Close()

	toName := fmt.Sprintf("%s.%s", path.Base(c.Path), version)
	toPath := path.Join(backupDir, toName)
	toFile, err := os.OpenFile(toPath, os.O_RDWR|os.O_CREATE, 0600)
	if err != nil {
		return err
	}
	defer toFile.Close()

	_, err = io.Copy(toFile, fromFile)
	if err != nil {
		return err
	}

	c.logger.Info("Successfully created ", toPath)

	return nil
}

// backup makes a copy of the database to the backup/ directory, if necessary:
// - If this is a fresh install, don't create a backup and store the current version
// - If we are on the same version, don't create a backup
// - If the version has changed, create a backup and store the current version
func (c *Client) backup(ctx context.Context, build chronograf.BuildInfo) error {
	lastBuild, err := c.BuildStore.Get(ctx)
	if err != nil {
		return err
	}
	if lastBuild.Version == build.Version {
		return nil
	}
	if c.isNew {
		return nil
	}

	// The database was pre-existing, and the version has changed
	// and so create a backup

	c.logger.Info("Moving from version ", lastBuild.Version)
	c.logger.Info("Moving to version ", build.Version)

	return c.copy(ctx, lastBuild.Version)
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using FlatRedBall.IO;
using FlatRedBall.Glue.Plugins.EmbeddedPlugins;
using FlatRedBall.Glue.VSHelpers.Projects;
using FlatRedBall.Glue.SaveClasses;
using System.Windows.Forms;
using FlatRedBall.Glue.Plugins.ExportedImplementations;
using FlatRedBall.Glue.Elements;
using FlatRedBall.Glue.Plugins;
using GlueFormsCore.FormHelpers;
using FlatRedBall.Glue.FormHelpers;

namespace FlatRedBall.Glue.IO
{
    enum ErrorReportingStyle
    {
        MessageBox,
        GlueOutput
    }

    // Why does this exist and also the XnbContentAdder
    /// <summary>
    /// Currently project types like MonoGame require
    /// some files to be built as XNBs before they can
    /// be loaded (like audio files).  This plugin is used
    /// // to copy built files to projects that need them.
    /// </summary>
    [Export(typeof(Plugins.PluginBase))]
    class BuiltFileCopier : EmbeddedPlugin
    {
        public override void StartUp()
        {
            this.ReactToBuiltFileChangeHandler += HandleBuiltFileChange;
            this.ReactToNewFileHandler += HandleNewFile;

            this.ReactToTreeViewRightClickHandler += HandleTreeViewRightClick;

            this.ReactToLoadedSyncedProject += HandleLoadedSyncedProject;
        }

        private void HandleLoadedSyncedProject(ProjectBase obj)
        {
            if (NeedsCopiedXnbs(obj))
            {
                foreach (var rfs in ObjectFinder.Self.GetAllReferencedFiles())
                {
                    TryCopyingBuiltFile(GlueCommands.Self.GetAbsoluteFileName(rfs), ErrorReportingStyle.GlueOutput);
                }
            }
        }

        void HandleTreeViewRightClick(ITreeNode rightClickedTreeNode, List<GeneralToolStripMenuItem> menuToModify)
        {
            if (rightClickedTreeNode.Tag != null && rightClickedTreeNode.Tag is ReferencedFileSave)
            {
                ReferencedFileSave rfs = rightClickedTreeNode.Tag as ReferencedFileSave;

                var extension = FileManager.GetExtension(rfs.Name);

                if (extension == "wma" || extension == "mp3")
                {
                    menuToModify.Add("Copy XNBs for file", HandleCopyXnbMenuClick);
                }

            }
        }

        private void HandleCopyXnbMenuClick(object sender, EventArgs e)
        {
            ReferencedFileSave rfs = GlueState.Self.CurrentReferencedFileSave;

            if (rfs != null)
            {
                string outputFile = ProjectManager.ProjectBase.Directory + "bin/x86/debug/Content/" + rfs.Name;
                outputFile = FileManager.RemoveExtension(outputFile) + ".xnb";

                if (!System.IO.File.Exists(outputFile))
                {
                    MessageBox.Show("The XNB doesn't exist.  Did you build the file?");
                }
                else
                {
                    HandleBuiltFileChange(outputFile);
                }
            }

        }

        void HandleNewFile(ReferencedFileSave rfs)
        {
            HandleBuiltFileChange(GlueCommands.Self.GetAbsoluteFileName(rfs));
        }

        bool NeedsCopiedXnbs(ProjectBase project)
        {
            return project is IosMonogameProject ||
                project is Windows8MonoGameProject ||
                project is AndroidProject ||
                project is UwpProject ||
                project is DesktopGlProject;

        }

        void HandleBuiltFileChange(string fileName)
        {
            TryCopyingBuiltFile(fileName, ErrorReportingStyle.MessageBox);
        }

        void TryCopyingBuiltFile(string fileName, ErrorReportingStyle errorReportingStyle)
        {
            // We only care about XNBs and WMAs
            bool shouldCopy = ProjectManager.SyncedProjects.Any(NeedsCopiedXnbs);

            if(shouldCopy)
            {
                string extension = FileManager.GetExtension(fileName);
                shouldCopy = extension == "xnb" || extension == "wma" || extension == "mp3";
            }

            if(GlueState.Self.CurrentGlueProject != null)
            {

                string projectDirectory = GlueState.Self.CurrentCodeProjectFileName.GetDirectoryContainingThis().FullPath;
                string destinationDirectory = FileManager.GetDirectory(fileName);
                destinationDirectory = FileManager.MakeRelative(destinationDirectory, projectDirectory);
                // look for the first instance of "/content/" which is in the root of the bin folder on PC

                if(shouldCopy)
                {
                    // If the changed file is not a file in the bin folder, we don't worry about copying it
                    int indexOfContent = destinationDirectory.ToLowerInvariant().IndexOf("/content/");

                    if (indexOfContent == -1)
                    {
                        shouldCopy = false;
                    }
                }

                if (shouldCopy)
                {

                    try
                    {

                        int indexOfContent = destinationDirectory.ToLowerInvariant().IndexOf("/content/");
                        if (indexOfContent != -1)
                        {
                            // add 1 to take off the leading slash so the resulting path doesn't have a double forward slash
                            destinationDirectory = destinationDirectory.Substring(indexOfContent + 1);
                        }
                        else
                        {
                            PluginManager.ReceiveError("Could not identify root binary folder for path " + fileName);
                        }

                        destinationDirectory = projectDirectory + "CopiedXnbs/" + destinationDirectory;

                        System.IO.Directory.CreateDirectory(destinationDirectory);

                        string destinationFile = destinationDirectory +
                            FileManager.RemovePath(fileName);

                        System.IO.File.Copy(fileName, destinationFile, true);

                        Plugins.PluginManager.ReceiveOutput("Copied built file " + fileName + " to " + destinationFile);

                    }
                    catch (Exception e)
                    {
                        if (errorReportingStyle == ErrorReportingStyle.MessageBox)
                        {
                            System.Windows.Forms.MessageBox.Show("Error copying built file:\n\n" + e.ToString());
                        }
                        else
                        {
                            FlatRedBall.Glue.Plugins.PluginManager.ReceiveOutput(
                                "Error copying built file: " + e.ToString());
                        }
                    }
                }

            }

        }
    }
}


text:
// ---------------------------------------------------------------------------
//
// This file is part of the <kortex> library suite
//
// Copyright (C) 2013 Engin Tola
//
// See licence.txt file for licence information.
//
// author: Engin Tola
// e-mail: engintola@gmail.com
//
// ---------------------------------------------------------------------------
#ifndef KORTEX_FILEIO_H
#define KORTEX_FILEIO_H

#include <vector>
#include <string>
#include <fstream>

using std::vector;
using std::string;
using std::ofstream;
using std::ifstream;
using std::ostream;

#include <kortex/keyed_value.h>
#include <kortex/check.h>
#include <kortex/string.h>

namespace kortex {

    enum FileFormat { FF_NONE=0,
                      FF_PGM, FF_PPM, FF_JPG, FF_PNG,
                      FF_IBIN /*binary image file*/,
                      FF_CALIBRATION, FF_TXT };

    FileFormat get_file_format( const string& str );

    void check_file_stream_error( const ifstream& fin,  const char* msg=NULL );
    void check_file_stream_error( const ofstream& fout, const char* msg=NULL );

    void reset_file_contents(const char* file_name);
    int  create_folder( const string& path );
    bool delete_file  ( const string& path );

    void open_or_fail( const string& file, ifstream &fin,  bool binary );
    void open_or_fail( const string& file, ofstream &fout, bool binary );

    void file_exists_or_fail(const string& file);
    bool file_exists(const string& file);
    bool file_exists(const char* file);
    bool file_create( const string& file );

    bool folder_exists(const char* folder);

    bool remove_folder( const string& dir_path );

    bool is_directory( const string& path );

    // return the files in a folder. if file_extension is specified, only files with that extension is returned. it is case insensitive.
    void get_files(const string& input_folder, vector<string>& ifiles, const char* file_extension=nullptr );

//
//
//
    template<typename T>
    void write_param( ofstream& fout, const char* param_name, const T& param ) {
        if( param_name ) fout << param_name << " ";
        fout << in_str( param ) << "\n";
    }
    template<> inline
    void write_param( ofstream& fout, const char* param_name, const ifloat& param ) {
        if( param_name ) fout << param_name << " ";
        fout << in_str( param.key ) << " " << in_str( param.val ) << "\n";
    }

    template<typename T>
    void write_array( ofstream& fout, const char* param_name, const vector<T>& arr ) {
        write_param( fout, param_name, (int)arr.size() );
        int n_arr = (int)arr.size();
        if( n_arr == 0 ) return;
        for( int i=0; i<n_arr-1; i++ )
            fout << in_str(arr[i]) << " ";
        fout << in_str( arr[n_arr-1] ) << "\n";
        check_file_stream_error( fout );
    }

    template<typename T>
    void write_array( ofstream& fout, const char* param_name, const T* arr, const int& n_arr ) {
        assert_pointer( arr );
        write_param( fout, param_name, (int)n_arr );
        if( n_arr == 0 ) return;
        for( int i=0; i<n_arr-1; i++ )
            fout << in_str(arr[i]) << " ";
        fout << in_str( arr[n_arr-1] ) << "\n";
        check_file_stream_error( fout );
    }

//
//

    template<typename T>
    void read_param( ifstream& fin, const char* param_name, T& param ) {
        char buffer[1024];
        fin.getline( buffer, 1024 );
        check_file_stream_error(fin, param_name);
        string format;
        if( param_name ) {
            format = string(param_name)+" %s";
            if( compare_string_nc( buffer, param_name ) ) {
                logman_fatal_g("param name [%s] does not match what is read [%s]", param_name, buffer );
            }
        } else {
            format = "%s";
        }

        char stmp[1024];
        sscanf( buffer, format.c_str(), &stmp );
        in_value(stmp, param);
    }

    template<> inline
    void read_param( ifstream& fin, const char* param_name, ifloat& param ) {
        char buffer[1024];
        fin.getline( buffer, 1024 );
        check_file_stream_error(fin, param_name);
        string format;
        if( param_name ) {
            format = string(param_name)+" %s %s";
            if( compare_string_nc( buffer, param_name ) ) {
                logman_fatal_g("param name [%s] does not match what is read [%s]", param_name, buffer );
            }
        } else {
            format = "%s %s";
        }
        char itmp[256], vtmp[256];
        sscanf( buffer, format.c_str(), &itmp, &vtmp );
        in_value( itmp, param.key );
        in_value( vtmp, param.val );
    }

    template<typename T>
    void read_array( ifstream& fin, const char* param_name, T* arr, const int& n_arr ) {
        passert_pointer( arr );
        passert_pointer_size( n_arr );
        int asz;
        read_param( fin, param_name, asz );
        passert_statement_g( asz == n_arr, "array sizes do not match [%d - %d]", asz, n_arr );
        if( n_arr == 0 ) return;
        for( int i=0; i<n_arr; i++ )
            fin >> arr[i];
        char buf[8];
        fin.getline(buf,8); // get rid of the newline character at the end.
        check_file_stream_error( fin );
    }

    template<typename T>
    void read_array( ifstream& fin, const char* param_name, vector<T>& arr ) {
        arr.clear();
        int n_arr;
        read_param( fin, param_name, n_arr );
        if( n_arr == 0 ) return;
        arr.resize(n_arr);
        T rv;
        for( int i=0; i<n_arr; i++ ) {
            fin >> rv;
            arr[i] = rv;
        }
        char buf[8];
        fin.getline(buf,8); // get rid of the newline character at the end.
        check_file_stream_error( fin );
    }

//
//  binary
//

    void check_binary_stream_begin_tag(ifstream& fin);
    void check_binary_stream_end_tag  (ifstream& fin);

    void insert_binary_stream_begin_tag(ofstream& fout);
    void insert_binary_stream_end_tag  (ofstream& fout);

//
    template<typename T>
    void write_bparam( ofstream& fout, const T& v ) {
        fout.write( (const char*)&v, sizeof(v) );
        check_file_stream_error(fout);
    }

    template<> inline
    void write_bparam( ofstream& fout, const string& v ) {
        uint16_t nsz = (uint16_t)v.size();
        write_bparam( fout, nsz );
        fout.write( (const char*)v.c_str(), sizeof(char)*nsz );
        check_file_stream_error(fout);
    }

    template<> inline
    void write_bparam( ofstream& fout, const iint& v ) {
        write_bparam( fout, v.key );
        write_bparam( fout, v.val );
    }

    template<typename T>
    void write_barray( ofstream& fout, const T* varr, const size_t& nv ) {
        fout.write( (const char*)varr, sizeof(*varr)*nv );
        check_file_stream_error(fout);
    }

    template<typename T>
    void write_barray( ofstream& fout, const vector<T>& varr ) {
        int nv = (int)varr.size();
        write_bparam( fout, nv );
        for( int i=0; i<nv; i++ )
            write_bparam( fout, varr[i] );
        check_file_stream_error(fout);
    }

//
    template<typename T>
    void read_bparam( ifstream& fin, T& v ) {
        fin.read( (char*)&v, sizeof(v) );
        check_file_stream_error(fin);
    }
    template<> inline
    void read_bparam( ifstream& fin, string& v ) {
        uint16_t nsz = 0;
        read_bparam( fin, nsz );
        char buffer[2048];
        passert_statement( nsz < 2048, "buffer overflow" );
        fin.read( buffer, sizeof(*buffer)*nsz );
        buffer[nsz] = '\0';
        v = buffer;
        check_file_stream_error(fin);
    }
    template<> inline
    void read_bparam( ifstream& fin, iint& v ) {
        read_bparam( fin, v.key );
        read_bparam( fin, v.val );
    }
    template<> inline
    void read_bparam( ifstream& fin, ifloat& v ) {
        read_bparam( fin, v.key );
        read_bparam( fin, v.val );
    }

    template<typename T>
    void read_barray( ifstream& fin, T* varr, const size_t& nv ) {
        passert_pointer( varr );
        passert_pointer_size( nv );
        fin.read( (char*)varr, sizeof(*varr)*nv );
        check_file_stream_error(fin);
    }

    template<typename T>
    void read_barray( ifstream& fin, vector<T>& varr ) {
        int nv = 0;
        read_bparam( fin, nv );
        varr.resize(nv);
        for( int i=0; i<nv; i++ ) {
            T b;
            read_bparam( fin, b ); // otherwise compiler complains for bool
            varr[i] = b;
        }
        check_file_stream_error(fin);
    }

//

    void save_ascii( const string& file, const vector<bool>& array );
    void load_ascii( const string& file,       vector<bool>& array );

    template<typename T>
    void save_ascii( const string& file, const vector<T>& arr ) {
        ofstream fout;
        open_or_fail( file, fout, false );
        write_array( fout, NULL, arr );
        fout.close();
    }
    template<typename T>
    void load_ascii( const string& file, vector<T>& arr ) {
        ifstream fin;
        open_or_fail( file, fin, false );
        read_array( fin, NULL, arr );
        fin.close();
    }

    void read_string(ifstream& fin, string& param, const char* check_against);

}

#endif


text:
package edu.psu.compbio.seqcode.gse.clustering.affinitypropagation;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.Vector;

public class CorrelationSimilarity {

	public static Map<String, List<Double>> fromFile(String infile) {
		Map<String, List<Double>> toreturn = new HashMap<String, List<Double>>();
		String line = "init";
		String[] splitline = new String[1];
		try {
			BufferedReader dataIn = new BufferedReader(new FileReader(infile));
			while (!((line = dataIn.readLine())==null)) {
				splitline = line.split("\t");
				List<Double> tmplist = new ArrayList<Double>();
				for (int i=1; i<splitline.length; i++) {
					tmplist.add(Double.valueOf(splitline[i]));
				}
				toreturn.put(splitline[0], tmplist);
			}
			dataIn.close();
		} catch (Exception e) {
			System.out.println("EXCEPTION");
		}
		System.out.println("Map size: "+toreturn.size());
		return toreturn;
	}

	public static void toFile(Map<String, List<Double>> valuemap, String outfile) {
		List<String> names = new ArrayList<String>(valuemap.keySet());
		double percent = 0;
		long[] counts = new long[5];
		for (int i=0; i<counts.length; i++) {
			counts[i] = 0;
		}
		try {
			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outfile)));
			//PrintWriter out2 = new PrintWriter(new BufferedWriter(new FileWriter(outfile+".reduced")));
			System.out.println("Number of Names: "+names.size());
			for (int i=0; i<names.size(); i++) {
				for (int j=i+1; j<names.size(); j++) {
					if (i==j) continue;
					out.print(names.get(i));
					out.print("  ");
					out.print(names.get(j));
					out.print("  ");
					//out2.print(names.get(i));
					//out2.print("  ");
					//out2.print(names.get(j));
					//out2.print("  ");
					double value = convertCorrelationToSimilarity(computeSimilarity2(valuemap.get(names.get(i)), valuemap.get(names.get(j))));
					out.print(value);
					out.println();
					if (value > -0.1) {
						counts[0]++;
					}
					if (value > -0.2) {
						counts[1]++;
					}
					if (value > -0.3) {
						counts[2]++;
					}
					if (value > -0.4) {
						counts[3]++;
					}
					if (value > -0.5) {
						counts[4]++;
						//out2.print(value);
						//out2.println();
					}
				}
				if (i%(names.size() / 100)==0) {
					System.out.println(percent+"% done");
					percent += 1;
				}
			}
			out.flush();
			out.close();
			//out2.flush();
			//out2.close();
			for (int i=0; i<counts.length; i++) {
				System.out.println(counts[i]);
			}
			System.out.println();
		} catch (IOException e) {
			System.out.println("EXEPTION");
			e.printStackTrace();
		}
	}

	/**
	 * This method of computing correlation doesn't seem to work
	 * @param x
	 * @param y
	 * @return
	 */
	public static double computeSimilarity(List<Double> x, List<Double> y) {
		printlist(x);
		printlist(y);

		double sum_sq_x = 0.0;
		double sum_sq_y = 0.0;
		double sum_coproduct = 0.0;
		double mean_x = x.get(0);
		double mean_y = y.get(0);
		for (int i=1; i<x.size(); i++) {
			double sweep = (((double) i) - 1.0) / ((double) i);
			double delta_x = x.get(i) - mean_x;
			double delta_y = y.get(i) - mean_y;
			sum_sq_x += delta_x * delta_x * sweep;
			sum_sq_y += delta_y * delta_y * sweep;
			sum_coproduct += delta_x * delta_y * sweep;
			mean_x += delta_x / ((double)i);
			mean_y += delta_y / ((double)i);
		}
		double pop_sd_x = Math.sqrt( sum_sq_x / ((double)x.size()) );
		double pop_sd_y = Math.sqrt( sum_sq_y / ((double)x.size()) );
		double cov_x_y = sum_coproduct / ((double)x.size());
		double correlation = cov_x_y / (pop_sd_x * pop_sd_y);
		return correlation;
	}

	/**
	 * This seems to be the better way of computing correlation
	 * @param x
	 * @param y
	 * @return
	 */
	public static double computeSimilarity2(List<Double> x, List<Double> y) {
		int indx, n;
		double x_sum, y_sum, xx_sum, yy_sum, xy_sum;
		double[] dataPoint = new double[2];
		int X=0, Y=1;

		x_sum = y_sum = xx_sum = yy_sum = xy_sum = 0.0;
		indx = n = x.size();
		while (indx-- != 0) {
		    dataPoint[X] = x.get(indx);
		    dataPoint[Y] = y.get(indx);
		    x_sum  += dataPoint[X];
		    y_sum  += dataPoint[Y];
		    xx_sum += dataPoint[X] * dataPoint[X];
		    yy_sum += dataPoint[Y] * dataPoint[Y];
		    xy_sum += dataPoint[X] * dataPoint[Y];
		}

		return ((n * xy_sum - x_sum * y_sum) /
		     (Math.sqrt((n * xx_sum - x_sum * x_sum) *
				(n * yy_sum - y_sum * y_sum))));
	}

	public static void convertFile(String infile, String outfile) {
		String line = "init";
		String[] splitline = new String[1];
		try {
			BufferedReader dataIn = new BufferedReader(new FileReader(infile));
			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outfile)));
			while (!((line = dataIn.readLine())==null)) {
				splitline = line.split("  ");
				out.print(splitline[0]);
				out.print("  ");
				out.print(splitline[1]);
				out.print("  ");
				out.println(convertCorrelationToSimilarity(Double.valueOf(splitline[2])));
			}
			out.flush();
			out.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public static void reduceFile(String infile, String outfile) {
		long oldlines = 0;
		long newlines = 0;
		int perc = 0;
		String line = "init";
		String[] splitline = new String[1];
		try {
			BufferedReader dataIn = new BufferedReader(new FileReader(infile));
			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outfile)));
			while (!((line = dataIn.readLine())==null)) {
				oldlines++;
				splitline = line.split("  ");
				if (Double.valueOf(splitline[2]).doubleValue() > -0.1) {
					out.println(line);
					newlines++;
				}
				if (oldlines%2E7==0) {
					System.out.println(perc+"% done");
					perc++;
				}
			}
			System.out.println(oldlines+" lines in old file");
			System.out.println(newlines+" lines in new file");
			out.flush();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static double convertCorrelationToSimilarity(double c) {
		return -(1.0 - c) / 2.0;
	}

	public static void generatePrefFile2(String infile, String outfile) {
		String line = "init";
		String[] splitline = new String[1];
		double[] values = new double[1];
		double median = 0.0;
		Vector<Double> valuevec = new Vector<Double>(81596385);
		int idx = 0;
		try {
			BufferedReader dataIn = new BufferedReader(new FileReader(infile));
			while (!((line = dataIn.readLine())==null)) {
				splitline = line.split("  ");
				valuevec.add(Double.valueOf(splitline[2]));
			}
			values = toDoubleArray(valuevec);
			Arrays.sort(values);
			if (values.length % 2 == 0) {
				median =  (values[values.length/2-1] + values[values.length/2]) / 2.0;
			} else {
				median =  values[(int)Math.floor(((double)values.length)/2.0)];
			}
			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outfile)));
			for (int i=0; i<45101; i++) {
				out.println(median);
			}
			out.flush();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static void generatePrefFile3(double value, String outfile) {
		try {
			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outfile)));
			for (int i=0; i<45101; i++) {
				out.println(value);
			}
			out.flush();
			out.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public static double[] toDoubleArray(Vector<Double> vec) {
		double[] toreturn = new double[vec.size()];
		for (int i=0; i<toreturn.length; i++) {
			toreturn[i] = vec.get(i);
		}
		return toreturn;
	}

	public static void generatePrefFile(String infile, String outfile) {
		String line = "init";
		String[] splitline = new String[1];
		TreeSet<Double> ts = new TreeSet<Double>();
		double median = 0.0;
		try {
			BufferedReader dataIn = new BufferedReader(new FileReader(infile));
			while (!((line = dataIn.readLine())==null)) {
				splitline = line.split("  ");
				ts.add(Double.valueOf(splitline[2]));
			}
			dataIn.close();
			Iterator<Double> it = ts.iterator();
			int half = (ts.size() / 2) - 1;
			for (int i=0; i < half; i++) {
				it.next();
			}
			if (ts.size()%2==0) {
				median = (it.next() + it.next()) / 2.0;
			} else {
				it.next();
				median = it.next();
			}
			PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(outfile)));
			for (int i=0; i<45101; i++) {
				out.println(median);
			}
			out.flush();
			out.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public static void printlist(List l) {
		for (int i=0; i<l.size(); i++) {
			System.out.print(l.get(i));
			System.out.print(" ");
		}
		System.out.println();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		/*
		toFile(fromFile("/Users/reeder/tmp/lineage430ab_GCRMA_nohead.txt"), "/Users/reeder/tmp/Complete_Similarities.txt");
		*/
		/*
		convertFile("/afs/csail.mit.edu/u/c/ccr/psrg/projects/Corinna_Macklis/Data/lineage430ab_GCRMA_similarities.txt", "/Users/reeder/Corinna_similarities.txt");
		*/
		/*
		generatePrefFile2("/Users/reeder/Macklis_Proj/Complete_sims_reduced2.txt", "/Users/reeder/Macklis_Proj/Complete_prefs_red2.txt");
		*/
		/*
		reduceFile("/Users/reeder/Macklis_Proj/Complete_similarities.txt", "/Users/reeder/Macklis_Proj/Complete_sims_reduced2.txt");
		*/
		generatePrefFile3(-0.05, "/Users/reeder/Macklis_Proj/Complete_prefs_red2.txt");
	}

}


text:
layout       : blocks/working-session
title        : Women in Cyber
type         : workshop
layout       : blocks/working-session
track        : CISO
technology   :
related-to   :
status       : missing Outcomes, working materials
when-day     : Fri
when-time    : AM-1
location     : Room-2
organizers   :
participants : Neil Barlow,Ade Yoseman Putra,Francois Raynaud,Lisa Raynaud,Petty Meisari, Tiffany Long
---

Organisations including OWASP, need women to lead projects, and these organisations have room for more female leaders.

Women currently represent only 11 percent of the cyber security workforce worldwide. This statistic is cause for alarm because it's a key factor in the massive talent shortage that is impacting this crucially important field. It is estimated that, as of now, there are 1 million unfilled cyber security jobs, and that number is growing fast.

This situation poses serious security risks to governments, businesses, and individuals, which is why there have been increasing efforts in recent years to encourage more people to enter the security field.

Without women pursuing careers in cyber security, the industry is missing out on almost half of the population's talent pool during a period in history when cybercrime represents a very menacing threat.

## Why

The low number of women in cyber security, and ways that we might encourage more women into the field, have received a lot of attention recently. This led me to ponder why it is important that more women become cyber security professionals.

## What

I believe that women and others from a broad range of backgrounds can help to re-formulate some of the fundamental principles of cyber security, to answer in a meaningful way questions such as 'What is it that information security enables organisations and people to do?' 'What are the values we hold dear that information security supports?', or 'What freedoms can we create through cyber security?'

## Outcomes

...Add text...

## Who

The target audience for this Working Session is:

 - IT security professionals
 - Devops professionals
 - Developers
 - Managers
 - Social scientists
 - Creative designers
 - Psychologists
 - Philosophers
 - Organisational and learning specialists
 - Educators

 ---

## Working materials

Here are the current 'work in progress' materials for this session (please add as much information as possible before the sessions)

### Content

...add content...


text:
% Lecture for ph2a Caltech 2017: Vibrations and Waves
\documentclass[pdf, handout, hideothersubsections]{beamer}
\usepackage{beamerthemeshadow}
\mode<presentation>
  {
    \usefonttheme{structuresmallcapsserif}
    \usetheme{CambridgeUS}
    \usecolortheme{seahorse}
    %\useinnertheme{circles}
%    \useoutertheme{tree}
  }

\usepackage{svg}
\usepackage{xmpmulti}
\usepackage{mathtools}
%\usepackage{enumitem}
\usepackage{hyperref}
\hypersetup{
    pdffitwindow=true,     % window fit to page when opened
    colorlinks=true,       % false: boxed links; true: colored links
    linkcolor=orange,      % color of internal links
    citecolor=green,       % color of links to bibliography
    filecolor=magenta,     % color of file links
    urlcolor=blue,         % color of external links
    pdfstartview={Fit}
}

% Fonts/encoding
\renewcommand{\UrlFont}{\tiny}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage[sc,medium,raggedright]{titlesec}
\usepackage{newtxmath}
%\usepackage{libertine}
\usepackage[osf]{ebgaramond}

\graphicspath{{Figures/}}

\begin{document}
\title{Waving Strings}
\author{Caltech: ph2a}
\date{17 - Oct - 2017}

\frame{\titlepage}

\frame{\frametitle{Table of Contents}\tableofcontents}

\setbeamerfont{footnote}{size=\tiny}

\section{Summary}
\begin{frame}
\frametitle{Last Time:}
\begin{itemize}
\item Coupled oscillators have multiple free vibration frequencies/modes.
\item These free oscillation frequencies are called eigenfrequencies.
\item The oscillation functions are the eigenfunctions.
\item Linear algebra can be used to solve for these functions.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Overview}
\begin{enumerate}
  \pause
\item Matrix methods can be used to analyzed eigenmodes of linear systems.
  \pause
\item The case of $N$ springs and $N$ masses can be analyzed as a
  straightforward extension of the methods used for $N = 2, 3$.
  \pause
\item Strings are an extension of this method to $N \rightarrow \infty$.
  \pause
\item The Bode plot for systems with finite $N$, and then
  infinite $N$, illustrates the phenomena of \emph{dispersion} and the
  \emph{cut-off} frequency.
\pause
\item The rest of this course is the study of waves. This week we make
  the gradual transition between vibrations of discrete elements to
  waves: vibrations in continuous systems.
\end{enumerate}
\end{frame}

\section{String with Fixed Ends}
\begin{frame}
\frametitle{String with Fixed Ends: Setup}
\begin{columns}
  \begin{column}{0.4\textwidth}
    \includegraphics[width=0.85\textwidth]{StringFixedEnds.jpg}
    \pause
    \includegraphics[width=0.85\textwidth]{StringForceDiagram.pdf}

each segment has a mass, $m = \mu \Delta x$.
\pause
  \end{column}
  \begin{column}{0.6\textwidth}
    \begin{enumerate}
      \item Small Vibrations ($y << L$)
        \pause
      \item Endpoints are fixed. No displacement $y(0) = y(L) = 0$,
          and no velocity: $\dot{y}(0) = \dot{y}(L) = 0$
        \pause
      \item Constant Tension ($T = \mathrm{const}$). Vibrations are
        small and the changes in string length are $\propto (y/L)^2$
        (negligible). \underline{Magnitude} is constant, but
        \emph{direction} of tension is \textbf{not}.
    \end{enumerate}

  \end{column}
\end{columns}
\end{frame}

\begin{frame}
\frametitle{Analogy with Masses/Springs}
\begin{columns}
  \begin{column}{0.5\textwidth}
    \centering
    \includegraphics[width=0.75\textwidth]{StringForceDiagram.pdf}
\pause
    \begin{align*}
      \action<+->{m \ddot{y}_p &= T_+ - T_- \\}
          \action<+->{&\simeq T \theta_+ - T \theta_- \\}
    \action<+->{&\simeq T \Bigg[\frac{y_{p+1}-y_{p}}{\Delta x} -
      \frac{y_{p}-y_{p-1}}{\Delta x}\Bigg] \\}
\action<+->{\ddot{y}_p &= \frac{T}{\mu (\Delta x)^2} (y_{p+1} -2 y_p + y_{p-1})}
    \end{align*}

  \end{column}

\begin{column}{0.5\textwidth}
    \centering
    \includegraphics[width=\textwidth]{3mass4spring.pdf}
    \pause
    \begin{align*}
      m \ddot{x}_p &= F_+ - F_- \\
                   &= k (x_{p + 1} - x_{p}) - k (x_{p} - x_{p-1}) \\
      \\
      \\
      \\
      \\
      \\
        \ddot{x}_p &= \omega_0^2 (x_{p+1} - 2 x_p + x_{p-1})
    \end{align*}

  \end{column}
\end{columns}
\end{frame}

\begin{frame}
\frametitle{Details of the forces / tensions:}
\begin{columns}

  \begin{column}{0.4\textwidth}
    \centering
    \includegraphics[width=0.85\textwidth]{StringForceDiagram.pdf}

  \end{column}

  \begin{column}{0.6\textwidth}
    \begin{enumerate}
    \item We want to find $y(x,t)$. So far we have:
      \pause
    \item $\ddot{y}_p = \frac{T}{\mu} \frac{\Delta \theta}{\Delta x}$
      \pause
    \item $\frac{\Delta \theta}{\Delta x} = \frac{\theta(x + \Delta x) -
        \theta{x}}{\Delta x}$
      \pause
    \item Small vibrations, so $\theta << 1 \implies$
      \pause
    \item $tan(\theta) \simeq \theta \implies$
      \pause
    \item $\theta \simeq \frac{\partial y}{\partial x}$
      \pause
      \item $\frac{\Delta \theta}{\Delta x} = \frac{\partial^2 y}{\partial x^2}$

    \end{enumerate}
  \end{column}
\pause
\end{columns}
So, now we have a relation between time and space:
\pause
\begin{block}{The Wave Equation}
\centering
$ \frac{\partial^2 y}{\partial t^2} = \frac{T}{\mu} \frac{\partial^2 y}{\partial x^2}$
\end{block}

\end{frame}

\section{Wave Equation: Solutions}
\begin{frame}
\frametitle{Wave Equation: Solutions}
\textbf{Technique: Separation of Variables}
\begin{enumerate}
\pause
\item write $y(x,t) = f(x) g(t)$; assumes functions \emph{are} separable
\pause
\item insert into the P.D.E.
\pause
\item P.D.E. $\implies$ ODE for x, ODE for t
\pause
\item impose boundary conditions (e.g. fixed ends, or driven end)
\pause
\item General Solution is sum of these restricted solutions
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Wave Equation: Solutions}
\begin{enumerate}
\item $y(x,t) = f(x) g(t)$
\pause
\item
\begin{align*}
\action<+->{\frac{\partial^2 y}{\partial t^2} &= \frac{T}{\mu} \frac{\partial^2
                                    y}{\partial x^2} \\}
\action<+->{f(x) \frac{\partial^2 g}{\partial t^2} &= v^2 g(t) \frac{\partial^2
                                         f}{\partial x^2} \\}
\action<+->{\frac{1}{g(t)} \frac{\partial^2 g}{\partial t^2} &=
  v^2 \frac{1}{f(x)} \frac{\partial^2 f}{\partial x^2}}
\end{align*}

\pause
\item Since LHS is a function of time \emph{only} and the RHS is a
  function of space \emph{only}, both sides must be equal to a
  constant (call it $\mathcal{C}$). The PDE has been converted into a set of two ODEs.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{The ODE Solutions}
\begin{alignat}{2}
\frac{d^2 g}{dt^2} &= \omega^2 g  &\quad g(t) &= C_1 cos(\omega t) \\
\frac{d^2 f}{dx^2} &= -\frac{\omega^2}{v^2} f &\quad f(x) &= A cos(k x) + B
sin(k x)
\end{alignat}
\pause
where the velocity of the wave, $v \equiv \sqrt{\frac{T}{\mu}}$,
$\frac{\omega}{2 \pi}$ is the frequency, and $k \equiv \omega / v$ is
called the 'wave number'. For the wavelength of the wave, we use the
symbol $\lambda \equiv \frac{2 \pi}{k}$.
\end{frame}

\section{Normal Modes}
\begin{frame}
\frametitle{Normal Modes of a String}
\pause
Let's apply some boundary conditions ! \\
\pause
\begin{enumerate}
\item $f(x) = 0$ for $x \in \{0, L\} \implies$ \\
\pause
\item $sin(k L) = 0$ for any and all t,\\
\pause
\item so $k_n L = n \pi$ or $k_n = n \frac{\pi}{L}$ \\
\pause
\item and $y(x, t) = A_n cos(\omega_n t) sin(k_n x)$ \\
\end{enumerate}

\end{frame}

\begin{frame}
\frametitle{Normal Modes of a String}
\begin{columns}
\begin{column}{0.5\textwidth}

\begin{itemize}
\item Wavelength:  $\lambda_n = \frac{2 L}{n}$

\item Frequency:  $f_n = \frac{v}{\lambda_n}$

\item Velocity:  $v = \sqrt{\frac{T}{\mu}}$

\item $f_n = \frac{n}{2 L} \sqrt{\frac{T}{\mu}}$
\end{itemize}

\end{column}

\begin{column}{0.5\textwidth}

\centering
\includegraphics[width=0.5\textwidth]{stationary-waves-7-638.jpg}

\end{column}
\end{columns}
\end{frame}

\section{Summary}
\begin{frame}
\frametitle{Summary}
\begin{enumerate}

\item Matrix methods can be used to analyzed eigenmodes of linear systems.

\item The case of $N$ springs and $N$ masses can be analyzed as a
  straightforward extension of the methods used for $N = 2, 3$.

\item Strings are an extension of this method to $N \rightarrow \infty$.

\item The Bode plot for systems with finite $N$, and then
infinite $N$, illustrates the phenomena of \emph{dispersion} and the
\emph{cut-off} frequency.

\item HWK: QP-1, Ch. 5: 6, 10, 11 are coupled oscillator
  problems. 5-16 is for N coupled oscillators; similar to the string problems.

\end{enumerate}
\end{frame}

\end{document}


text:
using Spring.Core.CDH.Autowire;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;

namespace Spring.Core.CDH
{
    internal static class AutowireExtends
    {
        public static bool IsAttributeDefined<T>(this MemberInfo element)
        {
            return Attribute.IsDefined(element, typeof(T), true);
        }

        public static bool IsAutowirePropertyDefined(this Type type, string name)
        {
            return type.GetProperty(name)?.IsAttributeDefined<AutowireAttribute>() ?? false;
        }

        public static AutowireAttribute GetAutowireAttribute(this MemberInfo element)
        {
            return element.GetCustomAttribute<AutowireAttribute>();
        }

        public static ChangePropertyRefAttribute[] GetChangePropertyAttributes(this MemberInfo element)
        {
            return element.GetCustomAttributes<ChangePropertyRefAttribute>().ToArray();
        }

        public static IEnumerable<PropertyAttribute> GetPropertyAttributes(this MemberInfo element)
        {
            return element.GetCustomAttributes<PropertyAttribute>();
        }

        public static int FindIndex<T>(this IEnumerable<T> items, Func<T, bool> predicate)
        {
            if (items == null) throw new ArgumentNullException("items");
            if (predicate == null) throw new ArgumentNullException("predicate");

            int retVal = 0;
            foreach (var item in items)
            {
                if (predicate(item)) return retVal;
                retVal++;
            }
            return -1;
        }

        public static bool IsInheritOfAdoDaoSupport(this Type type)
        {
            while (type != null)
            {
                if (type.FullName == "Spring.Data.Generic.AdoDaoSupport"
                    || type.FullName == "Spring.Data.Core.AdoDaoSupport")
                {
                    return true;
                }
                else
                {
                    type = type.BaseType;
                }
            }
            return false;
        }

        public static Type GetCreateInstanceType(this Type propertyType, AutowireAttribute autowireAttr)
        {
            if (autowireAttr.Type != null)
            {
                return autowireAttr.Type;
            }
            else
            {
                if (propertyType.IsInterface)
                {
                    if (propertyType.Name.StartsWith("i", StringComparison.OrdinalIgnoreCase))
                    {
                        string presumedFullName = $"{propertyType.FullName.Substring(0, propertyType.FullName.LastIndexOf(propertyType.Name))}{propertyType.Name.Substring(1)}, {propertyType.Assembly.FullName}";
                        Type presumedType = Type.GetType(presumedFullName);
                        return presumedType;
                    }
                    else
                    {
                        return null;
                    }
                }
                else
                {
                    return propertyType;
                }
            }
        }

        public static string GetShortAssemblyName(this Type type)
        {
            return string.Concat(type.FullName, ", ", type.Assembly.GetName().Name);
        }

        public static string GetObjectId(this ObjectInfo info)
        {
            if (!string.IsNullOrEmpty(info.PropertyDefinedAutowireAttribute.ContextName))
            {
                return info.PropertyDefinedAutowireAttribute.ContextName;
            }
            else
            {
                if (!info.FromProperty)
                {
                    return info.Type;
                }
                else
                {
                    return string.Concat("[", info.Type, "]",
                        GetMD5String(string.Join(string.Empty, info.PropertyDefinedChangePropertyAttributes.Union(info.ConfirmedPropertyAttributes).Select(t => t.ToString()))));
                }
            }
        }

        private static string GetMD5String(string str)
        {
            byte[] resultArr;
            using (var md5 = new MD5CryptoServiceProvider())
            {
                resultArr = md5.ComputeHash(Encoding.Default.GetBytes(str));
            }
            return string.Join(string.Empty, resultArr.Select(t => t.ToString("X2")));
        }

        public static string ToMD5String(this string str)
        {
            return GetMD5String(str);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;

namespace SuperSocket.Management.Client.ViewModel
{
    public  abstract class InstanceViewModelBase : ViewModelBase
    {
        public InstanceViewModelBase(ServerViewModel server)
        {
            Server = server;
        }

        public ServerViewModel Server { get; private set; }
    }
}


text:
@interface LLBaseViewController ()

@property (nonatomic , assign) UITableViewStyle style;

@property (nonatomic , strong) UILabel *toastLabel;

@end

@implementation LLBaseViewController

- (instancetype)initWithStyle:(UITableViewStyle)style {
    if (self = [super init]) {
        _style = style;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initNavigationItems];
    [self setUpTableView];
    if (LLCONFIG_CUSTOM_COLOR) {
        self.view.backgroundColor = LLCONFIG_BACKGROUND_COLOR;
        [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : LLCONFIG_TEXT_COLOR}];
        self.navigationController.navigationBar.tintColor = LLCONFIG_TEXT_COLOR;
        self.tableView.backgroundColor = LLCONFIG_BACKGROUND_COLOR;
        [self.tableView setSeparatorColor:LLCONFIG_TEXT_COLOR];
    }
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if (self.navigationController.viewControllers.count > 1) {
        self.tabBarController.tabBar.hidden = YES;
    } else {
        self.tabBarController.tabBar.hidden = NO;
    }
}

#pragma mark - Public
- (void)toastMessage:(NSString *)message {
    if (self.toastLabel) {
        [self.toastLabel removeFromSuperview];
        self.toastLabel = nil;
    }

    __block UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, LL_SCREEN_WIDTH - 40, 100)];
    label.text = message;
    label.textAlignment = NSTextAlignmentCenter;
    label.numberOfLines = 0;
    label.lineBreakMode = NSLineBreakByCharWrapping;
    [label sizeToFit];
    label.frame = CGRectMake(0, 0, label.frame.size.width + 20, label.frame.size.height + 10);
    label.layer.cornerRadius = label.font.lineHeight / 2.0;
    label.layer.masksToBounds = YES;
    label.center = CGPointMake(LL_SCREEN_WIDTH / 2.0, LL_SCREEN_HEIGHT / 2.0);
    label.alpha = 0;
    label.backgroundColor = [UIColor blackColor];
    label.textColor = [UIColor whiteColor];
    [self.view addSubview:label];
    self.toastLabel = label;
    [UIView animateWithDuration:0.25 animations:^{
        label.alpha = 1;
    } completion:^(BOOL finished) {
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [UIView animateWithDuration:0.1 animations:^{
                label.alpha = 0;
            } completion:^(BOOL finished) {
                [label removeFromSuperview];
            }];
        });
    }];
}

- (void)showAlertControllerWithMessage:(NSString *)message handler:(void (^)(NSInteger action))handler {
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Note" message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        if (handler) {
            handler(0);
        }
    }];
    UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
        if (handler) {
            handler(1);
        }
    }];
    [alert addAction:cancel];
    [alert addAction:confirm];
    [self presentViewController:alert animated:YES completion:nil];
}

#pragma mark - Rewrite
- (void)leftItemClick {
    [[LLDebugTool sharedTool].window showWindow];
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)backAction {
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - Primary
- (void)initNavigationItems {
    if (self.navigationController.viewControllers.count <= 1) {
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
        btn.showsTouchWhenHighlighted = NO;
        btn.adjustsImageWhenHighlighted = NO;
        btn.frame = CGRectMake(0, 0, 40, 40);
        UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:btn];
        self.navigationItem.leftBarButtonItem = item;
        UIImageRenderingMode mode = LLCONFIG_CUSTOM_COLOR ? UIImageRenderingModeAlwaysTemplate : UIImageRenderingModeAlwaysOriginal;
        [btn setImage:[[UIImage imageNamed:kCloseImageName] imageWithRenderingMode:mode] forState:UIControlStateNormal];
        [btn addTarget:self action:@selector(leftItemClick) forControlEvents:UIControlEventTouchUpInside];
    }

    self.navigationItem.hidesBackButton = NO;
    self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:@selector(backAction)];
}

- (void)setUpTableView {
    self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:_style];
    [self.view addSubview:self.tableView];
    self.tableView.bounces = NO;
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    self.tableView.estimatedSectionFooterHeight = 0;
    self.tableView.estimatedSectionHeaderHeight = 0;
    self.tableView.estimatedRowHeight = 50;
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, LL_SCREEN_WIDTH, CGFLOAT_MIN)];
    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, LL_SCREEN_WIDTH, CGFLOAT_MIN)];
}

#pragma mark - UITableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    return nil;
}

@end


text:
package query

import (
	"github.com/blevesearch/bleve/index"
	"github.com/blevesearch/bleve/mapping"
	"github.com/blevesearch/bleve/search"
	"github.com/blevesearch/bleve/search/searcher"
)

type PrefixQuery struct {
	Prefix   string `json:"prefix"`
	FieldVal string `json:"field,omitempty"`
	BoostVal *Boost `json:"boost,omitempty"`
}

// NewPrefixQuery creates a new Query which finds
// documents containing terms that start with the
// specified prefix.
func NewPrefixQuery(prefix string) *PrefixQuery {
	return &PrefixQuery{
		Prefix: prefix,
	}
}

func (q *PrefixQuery) SetBoost(b float64) {
	boost := Boost(b)
	q.BoostVal = &boost
}

func (q *PrefixQuery) Boost() float64 {
	return q.BoostVal.Value()
}

func (q *PrefixQuery) SetField(f string) {
	q.FieldVal = f
}

func (q *PrefixQuery) Field() string {
	return q.FieldVal
}

func (q *PrefixQuery) Searcher(i index.IndexReader, m mapping.IndexMapping, options search.SearcherOptions) (search.Searcher, error) {
	field := q.FieldVal
	if q.FieldVal == "" {
		field = m.DefaultSearchField()
	}
	return searcher.NewTermPrefixSearcher(i, q.Prefix, field, q.BoostVal.Value(), options)
}


text:
<?php

namespace Extension;

class ConstantsInterfaceTest extends \PHPUnit_Framework_TestCase
{
    public function testConstants()
    {
        assert(\Test\TestInterface::C1 === null);
        assert(\Test\TestInterface::C2 === false);
        assert(\Test\TestInterface::C3 === true);
        assert(\Test\TestInterface::C4 === 10);
        assert(\Test\TestInterface::C5 === 10.25);
        assert(\Test\TestInterface::C6 === "test");
    }

    public function testClassOfInterface()
    {
        $t = new \Test\ConstantsInterface();

        assert(is_object($t));
        assert($t->testReadInterfaceConstant1() === null);
        assert($t->testReadInterfaceConstant2() === false);
        assert($t->testReadInterfaceConstant3() === true);
        assert($t->testReadInterfaceConstant4() === 10);
        assert($t->testReadInterfaceConstant5() === 10.25);
        assert($t->testReadInterfaceConstant6() === "test");
    }

    public function testStaticConstantsInheritanceFromInterface()
    {
        assert(\Test\ConstantsInterface::C1 === null);
        assert(\Test\ConstantsInterface::C2 === false);
        assert(\Test\ConstantsInterface::C3 === true);
        assert(\Test\ConstantsInterface::C4 === 10);
        assert(\Test\ConstantsInterface::C5 === 10.25);
        assert(\Test\ConstantsInterface::C6 === "test");
    }

    public function testInstanceConstantsInheritanceFromInterface()
    {
        $t = new \Test\ConstantsInterface();

        assert(is_object($t));
        assert($t->testReadInheritanceFromInterfaceConstant1() === null);
        assert($t->testReadInheritanceFromInterfaceConstant2() === false);
        assert($t->testReadInheritanceFromInterfaceConstant3() === true);
        assert($t->testReadInheritanceFromInterfaceConstant4() === 10);
        assert($t->testReadInheritanceFromInterfaceConstant5() === 10.25);
        assert($t->testReadInheritanceFromInterfaceConstant6() === "test");
    }
}


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CollectionResponse.cs" company="KlusterKite">
//   All rights reserved
// </copyright>
// <summary>
//   The standard response to the <see cref="CollectionRequest" /> message
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace KlusterKite.Data.CRUD.ActionMessages
{
    using System.Collections.Generic;

    /// <summary>
    /// The standard response to the <see cref="CollectionRequest"/> message
    /// </summary>
    /// <typeparam name="TObject">The type of entity</typeparam>
    public class CollectionResponse<TObject>
    {
        /// <summary>
        /// Gets or sets the number of entities, that satisfies the query
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// Gets or sets the items for the query
        /// </summary>
        public List<TObject> Items { get; set; }
    }
}


text:
package aliases

import (
	"sync"

	"koding/klient/machine"
	"koding/klient/storage"
)

// storageKey is a database key used to store aliases.
const storageKey = "aliases"

// Cached is an Aliases object with additional storage layer.
type Cached struct {
	mu sync.Mutex
	st storage.ValueInterface

	aliases *Aliases
}

// NewCached creates a new Cached object backed by provided storage.
func NewCached(st storage.ValueInterface) (*Cached, error) {
	c := &Cached{
		st:      st,
		aliases: New(),
	}

	if err := c.st.GetValue(storageKey, &c.aliases.m); err != nil && err != storage.ErrKeyNotFound {
		return nil, err
	}

	// Drop inconsistent data.
	for id, alias := range c.aliases.m {
		if alias == "" {
			delete(c.aliases.m, id)
		}
	}

	return c, nil
}

// Add binds custom alias to provided machine and updates the cache.
func (c *Cached) Add(id machine.ID, alias string) error {
	c.mu.Lock()
	defer c.mu.Unlock()

	if err := c.aliases.Add(id, alias); err != nil {
		return err
	}

	return c.st.SetValue(storageKey, c.aliases.all())
}

// Create generates a new alias for provided machine ID and updates the cache.
// If alias already exists, it will not be regenerated nor cached.
func (c *Cached) Create(id machine.ID) (string, error) {
	c.mu.Lock()
	defer c.mu.Unlock()

	alias, err := c.aliases.Create(id)
	if err != nil {
		return "", err
	}

	if err = c.st.SetValue(storageKey, c.aliases.all()); err != nil {
		return "", err
	}

	return alias, nil
}

// Drop removes alias which is binded to provided machine ID and updates
// the cache.
func (c *Cached) Drop(id machine.ID) error {
	c.mu.Lock()
	defer c.mu.Unlock()

	if err := c.aliases.Drop(id); err != nil {
		return err
	}

	return c.st.SetValue(storageKey, c.aliases.all())
}

// MachineID checks if there is a machine ID that is binded to provided alias.
// If yes, the machine ID is returned. ErrAliasNotFound is be returned if there
// is no machine ID with provided alias.
func (c *Cached) MachineID(alias string) (machine.ID, error) {
	return c.aliases.MachineID(alias)
}

// Registered returns all machines that are stored in this object.
func (c *Cached) Registered() machine.IDSlice {
	return c.aliases.Registered()
}


text:
<?xml version="1.0" ?><component loc="39:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/BusyWaitMicroC.nc" nicename="BusyWaitMicroC" qname="BusyWaitMicroC">
      <documentation loc="33:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/BusyWaitMicroC.nc">
        <short>
 </short>
        <long>
 @author Cory Sharp <cssharp@eecs.berkeley.edu>
 @see  Please refer to TEP 102 for more information about this component and its
          intended use.
</long>
      </documentation>
      <configuration/>
      <wiring>
        <wire loc="49:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/BusyWaitMicroC.nc">
          <from><interface-ref name="BusyWait" ref="0x2b6106bfe440" scoped=""/></from>
          <to><interface-ref name="BusyWait" ref="0x2b6106bf9060" scoped=""/></to>
        </wire>
        <wire loc="50:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/BusyWaitMicroC.nc">
          <from><interface-ref name="Counter" ref="0x2b6106c46560" scoped=""/></from>
          <to><interface-ref name="Msp430CounterMicro" ref="0x2b6106c42ad0" scoped=""/></to>
        </wire>
      </wiring>
    <specification><interface loc="41:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/BusyWaitMicroC.nc" name="BusyWait" provided="1" ref="0x2b6106bfe440">
      <component-ref nicename="BusyWaitMicroC" qname="BusyWaitMicroC"/>
      <type-interface alignment="I:2" size="I:2"><interface-ref name="BusyWait" ref="0x2b6106bfe440" scoped=""/></type-interface>
      <instance>
        <interfacedef-ref nicename="BusyWait" qname="BusyWait"/>
        <arguments>
          <type-tag alignment="I:2" size="I:2"><struct-ref ref="0x2b6105f4f5c0"/>
            <typename><typedef-ref name="TMicro" ref="0x2b6105f4f930"/></typename>
          </type-tag>
          <type-int alignment="I:2" cname="unsigned int" size="I:2" unsigned="">
            <typename><typedef-ref name="uint16_t" ref="0x2b6104f08520"/></typename>
          </type-int>
        </arguments>
      </instance>
      <interface-functions>
        <function-ref name="wait" ref="0x2b6106bfd3d0" scoped=""/>
      </interface-functions>
    </interface></specification><referenced><interface loc="43:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/Msp430CounterMicroC.nc" name="Msp430CounterMicro" provided="1" ref="0x2b6106c42ad0">
      <component-ref nicename="Msp430CounterMicroC" qname="Msp430CounterMicroC"/>
      <type-interface alignment="I:2" size="I:2"><interface-ref name="Msp430CounterMicro" ref="0x2b6106c42ad0" scoped=""/></type-interface>
      <instance>
        <interfacedef-ref nicename="Counter" qname="Counter"/>
        <arguments>
          <type-tag alignment="I:2" size="I:2"><struct-ref ref="0x2b6105f4f5c0"/>
            <typename><typedef-ref name="TMicro" ref="0x2b6105f4f930"/></typename>
          </type-tag>
          <type-int alignment="I:2" cname="unsigned int" size="I:2" unsigned="">
            <typename><typedef-ref name="uint16_t" ref="0x2b6104f08520"/></typename>
          </type-int>
        </arguments>
      </instance>
      <interface-functions>
        <function-ref name="get" ref="0x2b6106c3f970" scoped=""/>
        <function-ref name="clearOverflow" ref="0x2b6106c3d340" scoped=""/>
        <function-ref name="isOverflowPending" ref="0x2b6106c3fe30" scoped=""/>
        <function-ref name="overflow" ref="0x2b6106c3d800" scoped=""/>
      </interface-functions>
    </interface><interface loc="54:/opt/tinyos-release-tinyos-2_1_2//tos/lib/timer/BusyWaitCounterC.nc" name="Counter" provided="0" ref="0x2b6106c46560">
      <component-ref nicename="BusyWaitMicroC.BusyWaitCounterC" qname="BusyWaitMicroC.BusyWaitCounterC"/>
      <type-interface alignment="I:2" size="I:2"><interface-ref name="Counter" ref="0x2b6106c46560" scoped=""/></type-interface>
      <instance>
        <interfacedef-ref nicename="Counter" qname="Counter"/>
        <arguments>
          <type-tag alignment="I:2" size="I:2"><struct-ref ref="0x2b6105f4f5c0"/>
            <typename><typedef-ref name="TMicro" ref="0x2b6105f4f930"/></typename>
          </type-tag>
          <type-int alignment="I:2" cname="unsigned int" size="I:2" unsigned="">
            <typename><typedef-ref name="uint16_t" ref="0x2b6104f08520"/></typename>
          </type-int>
        </arguments>
      </instance>
      <interface-functions>
        <function-ref name="get" ref="0x2b6106c443d0" scoped=""/>
        <function-ref name="clearOverflow" ref="0x2b6106c44d50" scoped=""/>
        <function-ref name="isOverflowPending" ref="0x2b6106c44890" scoped=""/>
        <function-ref name="overflow" ref="0x2b6106c43260" scoped=""/>
      </interface-functions>
    </interface><interface loc="53:/opt/tinyos-release-tinyos-2_1_2//tos/lib/timer/BusyWaitCounterC.nc" name="BusyWait" provided="1" ref="0x2b6106bf9060">
      <component-ref nicename="BusyWaitMicroC.BusyWaitCounterC" qname="BusyWaitMicroC.BusyWaitCounterC"/>
      <type-interface alignment="I:2" size="I:2"><interface-ref name="BusyWait" ref="0x2b6106bf9060" scoped=""/></type-interface>
      <instance>
        <interfacedef-ref nicename="BusyWait" qname="BusyWait"/>
        <arguments>
          <type-tag alignment="I:2" size="I:2"><struct-ref ref="0x2b6105f4f5c0"/>
            <typename><typedef-ref name="TMicro" ref="0x2b6105f4f930"/></typename>
          </type-tag>
          <type-int alignment="I:2" cname="unsigned int" size="I:2" unsigned="">
            <typename><typedef-ref name="uint16_t" ref="0x2b6104f08520"/></typename>
          </type-int>
        </arguments>
      </instance>
      <interface-functions>
        <function-ref name="wait" ref="0x2b6106bf9e70" scoped=""/>
      </interface-functions>
    </interface><component loc="41:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/Msp430CounterMicroC.nc" nicename="Msp430CounterMicroC" qname="Msp430CounterMicroC">
      <documentation loc="33:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/Msp430CounterMicroC.nc">
        <short>
 Msp430Counter32khC provides the standard 32khz counter for the MSP430.</short>
        <long>
 Msp430Counter32khC provides the standard 32khz counter for the MSP430.

 @author Cory Sharp <cssharp@eecs.berkeley.edu>
 @see  Please refer to TEP 102 for more information about this component and its
          intended use.
</long>
      </documentation>
      <configuration/>
      <wiring>
        <wire loc="51:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/Msp430CounterMicroC.nc">
          <from><interface-ref name="Msp430CounterMicro" ref="0x2b6106c42ad0" scoped=""/></from>
          <to><interface-ref name="Counter" ref="0x2b6106c3b340" scoped=""/></to>
        </wire>
        <wire loc="52:/opt/tinyos-release-tinyos-2_1_2//tos/chips/msp430/timer/Msp430CounterMicroC.nc">
          <from><interface-ref name="Msp430Timer" ref="0x2b6106c38450" scoped=""/></from>
          <to><interface-ref name="TimerA" ref="0x2b6105dd07b0" scoped=""/></to>
        </wire>
      </wiring>
    </component><component loc="51(BusyWaitMicroC.BusyWaitCounterC):/opt/tinyos-release-tinyos-2_1_2//tos/lib/timer/BusyWaitCounterC.nc" nicename="BusyWaitMicroC.BusyWaitCounterC" qname="BusyWaitMicroC.BusyWaitCounterC">
      <documentation loc="36:/opt/tinyos-release-tinyos-2_1_2//tos/lib/timer/BusyWaitCounterC.nc">
        <short>
 BusyWaitCounterC uses a Counter to implement the BusyWait interface
 (block until a specified amount of time elapses).</short>
        <long>
 BusyWaitCounterC uses a Counter to implement the BusyWait interface
 (block until a specified amount of time elapses). See TEP102 for more
 details.

 <p>See TEP102 for more details.

 @param precision_tag A type indicating the precision of the BusyWait
   interface.
 @param size_type An integer type representing time values for the
   BusyWait interface.

 @author Cory Sharp <cssharp@eecs.berkeley.edu>
</long>
      </documentation>
      <instance number="0">
        <component-ref nicename="BusyWaitCounterC" qname="BusyWaitCounterC"/>
        <arguments>
          <type-tag alignment="I:2" size="I:2"><struct-ref ref="0x2b6105f4f5c0"/>
            <typename><typedef-ref name="TMicro" ref="0x2b6105f4f930"/></typename>
          </type-tag>
          <type-int alignment="I:2" cname="unsigned int" size="I:2" unsigned="">
            <typename><typedef-ref name="uint16_t" ref="0x2b6104f08520"/></typename>
          </type-int>
        </arguments>
      </instance>
      <module/>
    </component></referenced></component>


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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.
-->

<project name="test" default="all">
  <target name="all"/>

  <target name="forked">
    <java fork="true" output="forkedout" failonerror="true"
          className="org.apache.tools.ant.taskdefs.dir1.B">

      <classpath>
        <pathelement path="../../../../build/testcases"/>
        <pathelement location="${java.home}/lib/classes.zip" />
      </classpath>
    </java>
  </target>

  <target name="unforked">
    <java className="org.apache.tools.ant.taskdefs.dir1.B">
      <classpath>
        <pathelement path="../../../../build/testcases"/>
        <pathelement location="${java.home}/lib/classes.zip" />
      </classpath>
    </java>
  </target>
</project>


text:
package com.maven8919.chesschallenge.fen.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Table(uniqueConstraints = @UniqueConstraint(columnNames = { "position", "playerToMove", "castlingPossibilities",
		"enPassantTargetSquare" }))
@Entity
public class Fen {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private long id;

	private String position;
	private String playerToMove;
	private String castlingPossibilities;
	private String enPassantTargetSquare;
	private int halfMove;
	private int fullMove;

	public Fen() {

	}

	public Fen(String position, String playerToMove, String castlingPossibilities, String enPassantTargetSquare) {
		super();
		this.position = position;
		this.playerToMove = playerToMove;
		this.castlingPossibilities = castlingPossibilities;
		this.enPassantTargetSquare = enPassantTargetSquare;
		this.halfMove = 0;
		this.fullMove = 0;
	}

	public long getId() {
		return id;
	}

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

	public String getPlayerToMove() {
		return playerToMove;
	}

	public void setPlayerToMove(String playerToMove) {
		this.playerToMove = playerToMove;
	}

	public String getCastlingPossibilities() {
		return castlingPossibilities;
	}

	public void setCastlingPossibilities(String castlingPossibilities) {
		this.castlingPossibilities = castlingPossibilities;
	}

	public String getEnPassantTargetSquare() {
		return enPassantTargetSquare;
	}

	public void setEnPassantTargetSquare(String enPassantTargetSquare) {
		this.enPassantTargetSquare = enPassantTargetSquare;
	}

	public int getHalfMove() {
		return halfMove;
	}

	public void setHalfMove(int halfMove) {
		this.halfMove = halfMove;
	}

	public int getFullMove() {
		return fullMove;
	}

	public void setFullMove(int fullMove) {
		this.fullMove = fullMove;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getNthRankPosition(int targetRank) {
		return position.split("/")[targetRank - 1];
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((castlingPossibilities == null) ? 0 : castlingPossibilities.hashCode());
		result = prime * result + ((enPassantTargetSquare == null) ? 0 : enPassantTargetSquare.hashCode());
		result = prime * result + ((playerToMove == null) ? 0 : playerToMove.hashCode());
		result = prime * result + ((position == null) ? 0 : position.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Fen other = (Fen) obj;
		if (castlingPossibilities == null) {
			if (other.castlingPossibilities != null)
				return false;
		} else if (!castlingPossibilities.equals(other.castlingPossibilities))
			return false;
		if (enPassantTargetSquare == null) {
			if (other.enPassantTargetSquare != null)
				return false;
		} else if (!enPassantTargetSquare.equals(other.enPassantTargetSquare))
			return false;
		if (playerToMove == null) {
			if (other.playerToMove != null)
				return false;
		} else if (!playerToMove.equals(other.playerToMove))
			return false;
		if (position == null) {
			if (other.position != null)
				return false;
		} else if (!position.equals(other.position))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Fen [position=" + position + ", playerToMove=" + playerToMove + ", castlingPossibilities="
				+ castlingPossibilities + ", enPassantTargetSquare=" + enPassantTargetSquare + "]";
	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<GitBill xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name> SB 126</Name>
  <Title> "An Act relating to the payment of sick leave by certain employers; and providing for an effective date."
	</Title>
  <ShortTitle> PAID SICK LEAVE                          </ShortTitle>
  <StatusDate> 01/22/14</StatusDate>
  <StatusCopy><![CDATA[ (S) L&C                  ]]></StatusCopy>
  <Sponsors> SENATOR(S) WIELECHOWSKI, Ellis</Sponsors>
  <Activity>
    <Description>(S)READ THE FIRST TIME - REFERRALS</Description>
    <Date>2014-01-22T00:00:00</Date>
    <Journal>01/22/14</Journal>
  </Activity>
  <Activity>
    <Description>(S)L&C, FIN</Description>
    <Date>2014-01-22T00:00:00</Date>
    <Journal>01/22/14</Journal>
  </Activity>
  <Activity>
    <Description>(S)REFERRED TO LABOR & COMMERCE</Description>
    <Date>2014-01-22T00:00:00</Date>
    <Journal>01/22/14</Journal>
  </Activity>
  <History>
    <Offered>01/22/2014</Offered>
    <OfferDate>2014-01-22T00:00:00</OfferDate>
    <PassedHouse xsi:nil="true" />
    <PassSenate xsi:nil="true" />
    <Version>SB0126A</Version>
    <Title>SB 126</Title>
  </History>
  <Revisions>
    <Version>SB0126A</Version>
    <Offer>01/22/2014</Offer>
    <Date>2014-01-22T00:00:00</Date>
    <BlobId>774bf854a56b59b4b0c227d318f7e0c985c80720</BlobId>
  </Revisions>
  <CDataElement><![CDATA[
00                             SENATE BILL NO. 126
01 "An Act relating to the payment of sick leave by certain employers; and providing for
02 an effective date."
03 BE IT ENACTED BY THE LEGISLATURE OF THE STATE OF ALASKA:
04    * Section 1. AS 23.10.105 is amended to read:
05            Sec. 23.10.105. Posting summary required. An employer subject to
06       AS 23.10.050 - 23.10.150 or 23.10.166 shall keep a summary or abstract of the
07       applicable [THESE] sections, approved by the commissioner, posted in a conspicuous
08       location at the place where a person subject to them is employed. An employer shall
09       be furnished copies of a summary by the state on request without charge.
10    * Sec. 2. AS 23.10.110(a) is amended to read:
11            (a)  An employer subject to AS 23.10.010 - 23.10.150 who violates a
12       provision of AS 23.10.060 or 23.10.065, or an employer subject to AS 23.10.166
13       who violates a provision of that section, is liable to an employee affected in the
14       amount of unpaid minimum wages, [OR] unpaid overtime compensation, or unpaid
01       sick leave, as the case may be, and, except as provided in (d) of this section, in an
02       additional equal amount as liquidated damages.
03    * Sec. 3. AS 23.10.110(b) is amended to read:
04            (b)  An action to recover from the employer the wages and damages for which
05       the employer is liable may be maintained in a competent court by an employee
06       personally and for other employees similarly situated, or an employee may
07       individually designate in writing an agent or representative to maintain an action for
08       the employee. The consent shall be filed in the court in which the action is brought. At
09       the request of a person paid less than the amount to which the person is entitled under
10       AS 23.10.050 - 23.10.150 or 23.10.166, the commissioner may take an assignment in
11       trust for the employee of the full amount to which the employee is entitled under this
12       section and may bring any legal action necessary to collect the claim.
13    * Sec. 4. AS 23.10 is amended by adding a new section to article 3 to read:
14            Sec. 23.10.166. Minimum paid sick leave. (a) An employer shall provide to
15       an employee who resides in the state and whose terms and conditions of employment
16       are not subject to bargaining between the employer and a collective bargaining agent
17       at least one hour of paid sick leave for every 40 hours the employee works. An
18       employee who accrues paid sick leave may begin using it on a date agreed to by the
19       employer or a date 90 days after the employee begins working for the employer,
20       whichever occurs first. An employee may carry over unused paid sick leave from year
21       to year.
22            (b)  An employer is not subject to this section if the employer offers to each of
23       its employees who reside in the state paid leave that
24                 (1)  accrues at a rate that is equal to or greater than one hour for every
25       40 hours worked;
26                 (2)  may be carried over from year to year; and
27                 (3)  may be used as provided by this section.
28            (c)  For the purpose of this section, a full-time employee who is exempt from
29       the overtime requirements of 29 U.S.C. 213(a)(1) shall be considered to have worked
30       40 hours for each full work week the employee completes.
31            (d)  Subject to the limitations of this section, an employer shall permit an
01       employee to use paid sick leave for
02                 (1)  the prevention, diagnosis, or treatment of the employee or a
03       member of the employee's immediate family for a mental or physical illness, injury, or
04       health condition;
05                 (2)  time the employee spends away from work because the employee
06       is the victim of a crime of sexual assault, domestic violence, or stalking for which a
07       person has been arrested or formally charged.
08            (e)  An employer who violates this section is subject to AS 23.10.110. An
09       employer violates this section if the employer
10                 (1)  hinders or delays the commissioner or an authorized representative
11       of the commissioner in the performance of a duty related to the enforcement of this
12       section;
13                 (2)  refuses to admit the commissioner or an authorized representative
14       of the commissioner to any place of employment as may be required for the
15       enforcement of this section;
16                 (3)  refuses to make a record accessible, or to furnish a sworn statement
17       of the record, or to give information required for the enforcement of this section, upon
18       demand, to the commissioner or an authorized representative of the commissioner;
19                 (4)  fails to post a summary or abstract of this section as required by
20       AS 23.10.105; or
21                 (5)  discharges or in any other manner discriminates against an
22       employee because the employee has filed a complaint, instituted or caused to be
23       instituted any proceeding under or related to this section, or testified or is about to
24       testify in a proceeding under or related to this section.
25            (f)  In this section,
26                 (1)  "domestic partner" means a person who is cohabiting with another
27       person in a relationship that is like a marriage but is not a legal marriage;
28                 (2)  "employee's immediate family" means
29                      (A)  a spouse or domestic partner of the employee; or
30                      (B)  a parent, child, including a stepchild and an adopted child,
31            and sibling of the employee if the parent, child, or sibling resides with the
01            employee;
02                 (3)  "employer" means a person, other than a federal, state, or
03       municipal government, who employs any combination of 15 or more full-time, part-
04       time, and temporary employees who are compensated under an express or implied
05       contract of hire that is verbal or written;
06                 (4)  "paid sick leave" means time that is compensated at the same
07       hourly rate and with the same benefits that the employee would earn while working.
08    * Sec. 5. The uncodified law of the State of Alaska is amended by adding a new section to
09 read:
10       APPLICABILITY. AS 23.10.166, enacted by sec. 4 of this Act, applies to
11            (1)  work performed after September 30, 2014; and
12            (2)  contracts formed after September 30, 2014.
13    * Sec. 6. This Act takes effect October 1, 2014.
]]></CDataElement>
</GitBill>


text:
Manifoldjs platform add on for Office Add in

This package can be used with Manifoldjs v 0.5.0 or higher to generate office add in apps from the W3C web appp manifest.

to add platform to Manifoldjs

```
> npm install manifoldjs -g
```

then

```
> manifoldjs platform add office https://github.com/manifoldjs/manifoldjs-office.git
```

then build your app,
```
>manifoldjs http://www.yoursite.com
```


text:
ci-fire-starter
===============

##INTRODUCTION

CI Fire Starter is simply a basic framework for starting a new project that doesn't have a complex API to learn or extra
functionality you probably don't need. It is not a CMS nor is it an application builder. It is a skeleton application
that has the basics already included and is ready for you, as a developer, to actually do what you do best... develop.
Here is what's included:

* CodeIgniter 2.2.0
* Modular Extensions by wiredesignz (includes form validation callback fix)
* Single base controller with Public, Private, Admin and API classes
* JSi18n Library to support internationalization in your JS files
* The latest version of jQuery
* Bootstrap 3
* Basic templating with automatic module view overrides
* Includes auto-loaded core config file
* Includes auto-loaded core language file
* Includes auto-loaded core helper file
    + Human-readable JSON string output for API functions
    + Array to CSV exporting
* Basic admin tool with authentication, dashboard, user management and contact email list

That should be the absolute basic things you need to get started on most projects. While there are many great CMS apps
(see below), sometimes you don't need a full CMS, or you need something much simpler than what's available, or you need
a completely customizable solution. That's why I created CI Fire Starter. I was tired of always having to do the same
things over and over again. So I took some best practices, included all the addons and functions I most commonly use,
and this was the end result, which I now use to start all my projects.

Please note I do NOT take credit for many of the methods used here... attribution is given where it is deserved. See
actual code for attribution comments.

I hope you find it useful. Feel free to fork it on Github and help make it better.

NOTE: This documentation assumes you are already familiar with PHP and CodeIgniter. If you need to learn more about
CodeIgniter, visit the user guide at http://ellislab.com/codeigniter/user-guide/. To learn more about PHP, visit
http://php.net/.

![Welcome Screen](http://s2.postimg.org/io7hm3qqh/Screen_Shot_2013_10_08_at_2_20_04_PM.png?raw=true)

##MODULAR

CI Fire Starter is set up to be modular, thanks to wiredesign's Modular Extensions
(https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc). The modules are located in
/application/modules.

CI Fire Starter comes with 4 modules:
* api - a place to build API functions
* contact - a simple contact page with CAPTCHA
* users - a basic authentication module for registering and logging in and out
* welcome - the default landing page

In addition to the modules, there are some core functions:
* admin

##BASE CLASSES

Phil Sturgeon wrote a very helpful blog post years ago called "CodeIgniter Base Classes: Keeping it DRY"
(http://philsturgeon.co.uk/blog/2010/02/CodeIgniter-Base-Classes-Keeping-it-DRY). The methods he described have been
applied to CI Fire Starter. There is a file in /application/core called MY_Controller.php which includes the Public,
Private, Admin and API base classes. This allows you to use shared functionality.

####MY_Controller

This extends the MX (Modular Extensions) controller and defines header data that will get passed to views as well as has
a setting to enable or disable the CI Profiler.

####Understanding Header Data

* site_title    : the title of the website which gets inserted into the document head
* keywords      : meta keywords inserted into the document head
* description   : meta description inserted into the document head
* css_files     : an array of css files to insert into the document head
* js_files      : an array of javascript libraries to insert into the document body
* js_files_i18n : an array of javascript files with internationalization to insert into the document body (see more about these below)

Header data can be appended and/or overwritten from any controller function.

####Public_Controller

This extends MY_Controller and drives all your public pages (home page, etc). Any controller that extends
Public_Controller will be open for the whole world to see.

####Private_Controller

This extends MY_Controller and drives all your private pages (user profile, etc). Any controller that extends
Private_Controller will require authentication. Specific page requests are stored in session and will redirect upon
successful authentication.

####Admin_Controller

This extends MY_Controller and drives all your administration pages. Any controller that extends Admin_Controller will
require authentication from a user with administration privileges. Specific page requests are stored in session and will
redirect upon successful authentication.

####API_Controller

This extends MY_Controller and drives all your API functions. Any controller that extends API_Controller will be open
for the whole world to see (see below for details).

##CORE FILES

####Core Config

In application/config there is a file core.php. This file allows you to set site-wide variables. It is set up with site
name, site version, default templates, pagination settings, enable/disable the profiler and error delimiters.

####Core Language

In application/language/english is a file core_lang.php. This file allows you to set language variables that could be
used throughout the entire site (such as the words Home or Logout).

####Core Helper

In application/helper is a file core_helper.php. This includes the following useful functions:
* display_json($array) - used to output an array as JSON in a human-readable format - used by the API
* json_indent($array) - this is the function that actually creates the human-readable JSON string
* array_to_csv($array, $filename) - exports an array into a CSV file (see admin user list)

##LIBRARIES

####Jsi18n

In application/libraries is a file Jsi18n.php. This clever library allows you to internationalize your JavaScript files
through CI language files and was inspired by Alexandros D on coderwall.com (https://coderwall.com/p/j88iog).

Load this library in the autoload.php file or manually in your controller:

    $this->load->library('jsi18n');

In your language file:

    $lang['alert_message'] = "This is my alert message!";

In your JS files, place your language key inside double braces:

    function myFunction() {
        alert("{{alert_message}}");
    }

Render the Javascript file in your template file:

    <script type="text/javascript"><?php echo $this->jsi18n->translate("/themes/admin/js/my_javascript_i18n.js"); ?></script>

OR in your header data array:

    $this->header_data = array_merge_recursive($this->header_data, array(
        'js_files_i18n' => array(
            $this->jsi18n->translate("/themes/admin/js/my_javascript_i18n.js")
        )
    ));

####MY_Form_validation

In application/libraries is a file My_Form_validation.php. This small library fixes the issue with validation callback
functions not working when using Modular Extensions. This library is automatically loaded, so the only difference is you
have to include $this in your validation:

    if ($this->form_validation->run() == FALSE)

becomes

    if ($this->form_validation->run($this) == FALSE)

You can see this being used in the auth module login controller. For more about this fix, check out Mahbubur Rahman's
blog (http://www.mahbubblog.com/php/form-validation-callbacks-in-hmvc-in-codeigniter/).

##USER MANAGEMENT

CI Fire Starter comes with a simple user management tool in the administration tool. It does use a database table called
'users'. This tool demonstrates a lot of basic but important functionality:

* Sortable list columns
* Search filters
* Pagination with user-changeable items/page
* Exporting lists to CSV
* Form validation
* Harnessing the power of Bootstrap to accelerate development

![User Administration](http://s12.postimg.org/5oc54gnnx/Screen_Shot_2013_10_08_at_2_21_23_PM.png?raw=true)

Please note: user 1 is the main administrator - DO NOT MANUALLY DELETE. You can not delete this user from within the
admin tool.

##THEMES

No, I did not include a templating library, such as Smarty, nor did I utilize CI's built in parser. If you really wanted
to include one, you could check out Phil Sturgeon's CI-Dwoo extension (https://github.com/philsturgeon/codeigniter-dwoo).
With that said, I did include the ability to override module views with theme views. See the two different
welcome_message.php files: a) application/modules/welcome/views/welcome_message.php and
b) themes/default/views/welcome_message.php. B will override A as long as it exists. This is handy if you need to make
a temporary change to a view and don't want to lose the original view. The overrides are handled from within
application/core/MY_Loader.php.

####Override Default Themes

In addition to overriding module views from within your theme, you can also override a theme from any controller:

    $this->set_theme('[THEME FOLDER]');

##APIS

With the API class, you can quite easily create API functions for external applications. There is no security on these,
so if you need a more robust solution, such as authentication and API keys, check out Phil Sturgeon's CI Rest Server
(https://github.com/philsturgeon/codeigniter-restserver).

![Sample JSON String](http://s18.postimg.org/w8wflbka1/Screen_Shot_2013_10_08_at_2_38_35_PM.png?raw=true)

##SYSTEM REQUIREMENTS

* PHP version 5.1.6 or newer
* A database: MySQL (4.1+), MySQLi, MS SQL, Postgres, Oracle, SQLite, and ODBC
* PHP GD extension for CAPTCHA to work
* PHP Mcrypt extension if you want to use the Encryption class

##INSTALLATION

This is really simple:

* Create a new database and import the included sql file
    + default administrator username/password is admin/admin
* Modify the application/config/config.php
    + line 183: set your log threshold - I usually set it to 1 for production environments
    + line 227: set your encryption key
* Modify the application/config/core.php
    + set your site name
* Modify application/config/database.php and connect to your database
* Upload all files to your server
* Make sure the /captcha/ folder has write permission
* Visit your new URL
    + The default welcome page includes links to the admin tool and the private user profile page
* Make sure you log in to admin and change the administrator password!

##CONCLUSION

Well, that's it in a nutshell. As I said earlier, CI Fire Starter does not attempt to be a full-blown CMS. You'd have
to build that functionality on your own. If you want a great CMS built on CodeIgniter, or need a more robust starting point, check out one of these
awesome apps:

* HeroFramework: http://www.heroframework.com/
* Halogy: http://www.halogy.com/
* PyroCMS: https://www.pyrocms.com/ (though last I heard, Phil Sturgeon was converting it from CodeIgniter to Laravel)
* Expression Engine: http://ellislab.com/expressionengine (from the creators of CodeIgniter)
* GoCart: http://gocartdv.com/ (shopping cart)
* Open-Blog: http://www.open-blog.org/ (this is my other project - currently working on a complete rewrite, and it's
  been slow going)
* Bonfire: http://cibonfire.com/ (this is more of an application builder than a full CMS)
* FuelCMS: http://getfuelcms.com/
* CMS Canvas: http://www.cmscanvas.com/

##WHAT'S NEW

####Version 2.1.0
07/25/2014

* Upgraded from CI 2.1.4 to CI 2.2.0

####Version 2.0.0
05/06/2014

Too many to list them all, but here are some of the major changes:

* Added database-driven settings administration
* Included TinyMCE WYSIWYG editor
* Included Bootstrap DatePicker and modified to work with Bootstrap 3.x
* Removed separate auth module and merged into user module
* Added user self-registration and forgot password functionality to the user module
* Removed separate login template
* Added database-driven menus with sub-menu capabilities and built-in Bootstrap formatting
* Added a CAPTCHA-protected contact page with an admin tool to view messages
* Enabled CSRF protection on all forms
* Enabled database session handling
* Tons of code cleanup and miscellaneous improvements

####Version 1.0.1
10/10/2013

* Removed admin template includes
* Made login more secure using salt
* Modified users table to handle the login change
    + password field is now char(128)
    + added salt field char(128)
* Added this what-new.txt file
* Added road-map.txt

####Version 1.0.0
10/08/2013

* Initial version

##ROADMAP

* Build a media manager module


text:
<?php
namespace Chamilo\Core\Repository\ContentObject\Blog\Package;

use Chamilo\Core\Repository\Common\Action\ContentObjectRemover;

class Remover extends ContentObjectRemover
{
}