text:
Simulation and analysis of Kohonen Self-Organizing Map in two dimensions

Matlab - File Exchange:
http://www.mathworks.com/matlabcentral/fileexchange/48888-sakohonen

![](https://raw.githubusercontent.com/augustomatheuss/SAKohonen/master/screenshot1.jpg)

![](https://raw.githubusercontent.com/augustomatheuss/SAKohonen/master/screenshot2.jpg)


text:
/*globals ListItAddons: false*/
ListIt.lvent.once('setup:before', function(L, barr) {
  'use strict';
  L.store = ListItAddons.FirefoxStorage;
  L.models.AuthManager = ListItAddons.AuthManager;
});

redpajama_set_name: RedPajamaGithub


text:
//-----------------------------------------------------------------------
// <copyright file="OpenApiCallback.cs" company="NSwag">
//     Copyright (c) Rico Suter. All rights reserved.
// </copyright>
// <license>https://github.com/NSwag/NSwag/blob/master/LICENSE.md</license>
// <author>Rico Suter, mail@rsuter.com</author>
//-----------------------------------------------------------------------

using Newtonsoft.Json;
using NJsonSchema.References;
using System.Collections;
using System.Collections.Generic;

namespace NSwag
{
    /// <summary>Describes an OpenAPI callback.</summary>
    public class OpenApiCallback : JsonReferenceBase<OpenApiCallback>, IJsonReference, IDictionary<string, SwaggerPathItem>
    {
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

        private IDictionary<string, SwaggerPathItem> _dictionary = new Dictionary<string, SwaggerPathItem>();

        #region IDictionary

        public SwaggerPathItem this[string key]
        {
            get => _dictionary[key];
            set => _dictionary[key] = value;
        }

        public ICollection<string> Keys => _dictionary.Keys;

        public ICollection<SwaggerPathItem> Values => _dictionary.Values;

        public int Count => _dictionary.Count;

        public bool IsReadOnly => false;

        public void Add(string key, SwaggerPathItem value)
        {
            _dictionary.Add(key, value);
        }

        public void Add(KeyValuePair<string, SwaggerPathItem> item)
        {
            _dictionary.Add(item);
        }

        public void Clear()
        {
            _dictionary.Clear();
        }

        public bool Contains(KeyValuePair<string, SwaggerPathItem> item)
        {
            return _dictionary.Contains(item);
        }

        public bool ContainsKey(string key)
        {
            return _dictionary.ContainsKey(key);
        }

        public void CopyTo(KeyValuePair<string, SwaggerPathItem>[] array, int arrayIndex)
        {
            _dictionary.CopyTo(array, arrayIndex);
        }

        public IEnumerator<KeyValuePair<string, SwaggerPathItem>> GetEnumerator()
        {
            return _dictionary.GetEnumerator();
        }

        public bool Remove(string key)
        {
            return _dictionary.Remove(key);
        }

        public bool Remove(KeyValuePair<string, SwaggerPathItem> item)
        {
            return _dictionary.Remove(item);
        }

        public bool TryGetValue(string key, out SwaggerPathItem value)
        {
            return _dictionary.TryGetValue(key, out value);
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return _dictionary.GetEnumerator();
        }

        #endregion

        #region Implementation of IJsonReference

        [JsonIgnore]
        IJsonReference IJsonReference.ActualObject => Reference;

        [JsonIgnore]
        object IJsonReference.PossibleRoot => null;

        #endregion
    }
}


text:
<?php
declare(strict_types=1);

namespace DocumentStorage\Adapter\Storage;

use DocumentStorage\Exception\DocumentNotFound;
use DocumentStorage\Exception\DocumentNotStored;
use DocumentStorage\Storage;

class Filesystem implements Storage
{
    /** @var string */
    private $storageDir;

    /**
     * @throws \InvalidArgumentException If $storageDir is not a directory
     * @throws \InvalidArgumentException If $storageDir is not writable
     */
    public function __construct(string $storageDir)
    {
        if (!is_dir($storageDir)) {
            throw new \InvalidArgumentException(sprintf('[%s] is not a directory', $storageDir));
        }

        if (!is_writable($storageDir)) {
            throw new \InvalidArgumentException(sprintf('[%s] is not writable', $storageDir));
        }

        $this->storageDir = $storageDir;
    }

    public function store(string $pathOrBody, string $targetDocName, string $oldDocName = '') : string
    {
        $docPath = $this->getDocPath($targetDocName);

        $stored = file_exists($pathOrBody)
                 ? copy($pathOrBody, $docPath)
                 : file_put_contents($docPath, $pathOrBody);

        if (false === $stored) {
            throw new DocumentNotStored('There was an error storing the document [%s] to the filesystem.');
        }

        return $docPath;
    }

    public function retrieve(string $docName) : string
    {
        $docPath = $this->getDocPath($docName);

        if (false === file_exists($docPath) || false === $contents = file_get_contents($docPath)) {
            throw new DocumentNotFound(sprintf('Could not retrieve [%s]', $docPath));
        }

        return $contents;
    }

    public function getUrl(string $docName) : string
    {
        return '';
    }

    private function getDocPath(string $docName) : string
    {
        return $this->storageDir.DIRECTORY_SEPARATOR.$docName;
    }
}


text:
function ImprintWindow() {
	//load component dependencies
	var ImprintView = require('ui/common/ImprintView');

	//create component instance
	var self = Ti.UI.createWindow({
		backgroundColor:'#ffffff',
		modal: true,
		orientationModes:[Ti.UI.PORTRAIT,Ti.UI.UPSIDE_PORTRAIT],
		navBarHidden: true
	});

	//construct UI
	var imprintView = new ImprintView();
	self.add(imprintView);

	imprintView.addEventListener("shouldCloseView", function () {
		self.close();
	});

	return self;
}

//make constructor function the public component interface
module.exports = ImprintWindow;