コード例 #1
0
        public void Result(ITables input)
        {
            for (int i = 0; i < coresInHeight; i++)
            {
                List <INeurons> temp = new List <INeurons>();
                for (int j = 0; j < coresInWidth; j++)
                {
                    List <List <INeurons> > coreArgs = new List <List <INeurons> >();

                    int maxl = 0, maxm = 0;
                    for (int l = 0; l < coreHeight; l++)
                    {
                        List <INeurons> temp1 = new List <INeurons>();
                        for (int m = 0; m < coreWidth; m++)
                        {
                            if (input.NeuronsList[l + i * coreHeight][m + j * coreWidth].Result
                                > input.NeuronsList[maxl][maxm].Result)
                            {
                                maxl = l + i * coreHeight;
                                maxm = m + j * coreWidth;
                            }
                        }
                    }

                    NeuronsList[i][j].Result = input.NeuronsList[maxl][maxm].Result;
                    temp.Add(NeuronsList[i][j]);
                }
                maxNeurons.Add(temp);
            }
        }
コード例 #2
0
        public AttachmentLoader(
            ITables tables,
            ITextHelpers textHelpers,
            IResourceCacheService resourceCacheService)
        {
            Ensure.Argument.IsNotNull(tables, nameof(tables));
            Ensure.Argument.IsNotNull(textHelpers, nameof(textHelpers));
            Ensure.Argument.IsNotNull(resourceCacheService, nameof(resourceCacheService));

            this.textHelpers          = textHelpers;
            this.resourceCacheService = resourceCacheService;
            this.attachmentsTable     = tables.TableForType <CacheAttachment>();
        }
コード例 #3
0
        public InternalUserLoader(
            ITables tables,
            ITextHelpers textHelpers,
            IResourceCacheService resourceCacheService)
        {
            Ensure.Argument.IsNotNull(tables, nameof(tables));
            Ensure.Argument.IsNotNull(textHelpers, nameof(textHelpers));
            Ensure.Argument.IsNotNull(resourceCacheService, nameof(resourceCacheService));

            this.textHelpers          = textHelpers;
            this.resourceCacheService = resourceCacheService;
            this.userTable            = tables.TableForVersionedType <CacheUser>();
        }
コード例 #4
0
 private void ExpandTables(ITables tables, TreeNode node)
 {
     if (HasBlankNode(node))
     {
         foreach (ITable table in tables)
         {
             TreeNode n = new TreeNode(table.Name);
             n.Tag = new NodeData(NodeType.TABLE, table);
             n.SelectedImageIndex = n.ImageIndex = 3;
             node.Nodes.Add(n);
             n.Nodes.Add(this.BlankNode);
         }
     }
 }
コード例 #5
0
        public ResourceCacheService(
            ITables tables,
            ICaches caches,
            ITextHelpers textHelpers)
        {
            Ensure.Argument.IsNotNull(tables, nameof(tables));
            Ensure.Argument.IsNotNull(caches, nameof(caches));
            Ensure.Argument.IsNotNull(textHelpers, nameof(textHelpers));

            this.tables      = tables;
            this.caches      = caches;
            this.textHelpers = textHelpers;

            // Create our collections.
            this.resources     = new Dictionary <string, object>();
            this.resourceLocks = new Dictionary <string, AsyncLock>();
        }
コード例 #6
0
        override internal void LoadAll()
        {
            try
            {
                VistaDBDatabase db = (VistaDBDatabase)this.Table.Database;

                if (!db._FKsInLoad)
                {
                    db._FKsInLoad = true;

                    VistaDBForeignKeys fks = null;

                    foreach (Table table in this.Table.Tables)
                    {
                        fks = table.ForeignKeys as VistaDBForeignKeys;
                    }

                    DataTable metaData = db._mh.LoadForeignKeys(this.dbRoot.ConnectionString, this.Table.Database.Name, this.Table.Name);

                    PopulateArray(metaData);

                    ITables tables = this.Table.Tables;
                    for (int i = 0; i < tables.Count; i++)
                    {
                        ITable table = tables[i];
                        fks = table.ForeignKeys as VistaDBForeignKeys;
                        fks.AddTheOtherHalf();
                    }

                    db._FKsInLoad = false;
                }
                else
                {
                    DataTable metaData = db._mh.LoadForeignKeys(this.dbRoot.ConnectionString, this.Table.Database.Name, this.Table.Name);

                    PopulateArray(metaData);
                }
            }
            catch {}
        }
コード例 #7
0
        public InternalPostLoader(
            ITables tables,
            IPostLicenseLoader postLicenseLoader,
            ITextHelpers textHelpers,
            IResourceCacheService resourceCacheService,
            IInternalUserLoader internalUserLoader,
            IAttachmentLoader attachmentLoader)
        {
            Ensure.Argument.IsNotNull(tables, nameof(tables));
            Ensure.Argument.IsNotNull(postLicenseLoader, nameof(postLicenseLoader));
            Ensure.Argument.IsNotNull(textHelpers, nameof(textHelpers));
            Ensure.Argument.IsNotNull(resourceCacheService, nameof(resourceCacheService));
            Ensure.Argument.IsNotNull(internalUserLoader, nameof(internalUserLoader));
            Ensure.Argument.IsNotNull(attachmentLoader, nameof(attachmentLoader));

            this.textHelpers          = textHelpers;
            this.resourceCacheService = resourceCacheService;
            this.internalUserLoader   = internalUserLoader;
            this.attachmentLoader     = attachmentLoader;
            this.postLicenseLoader    = postLicenseLoader;
            this.postTable            = tables.TableForVersionedType <CachePost>();
        }
コード例 #8
0
        public void Result(ITables input)
        {
            for (int i = 0; i < coresInHeight; i++)
            {
                for (int j = 0; j < coresInWidth; j++)
                {
                    double sum = 0;

                    for (int l = 0; l < core.height; l++)
                    {
                        List <double> temp1 = new List <double>();

                        for (int m = 0; m < core.width; m++)
                        {
                            sum += core.weigth[l][m] * input.NeuronsList[l + i][m + j].Result;
                        }

                        NeuronsList[i][j].Sum    = sum;
                        NeuronsList[i][j].Result = sum > 0 ? sum : 0.01 * sum;
                    }
                }
            }
        }
コード例 #9
0
 public TableRepository(ITables element)
 {
     this.element = element;
 }
コード例 #10
0
		private void ExpandTables(ITables tables, TreeNode node)
		{
			if(HasBlankNode(node))
			{
				foreach(ITable table in tables)
				{
					TreeNode n = new TreeNode(table.Name);
					n.Tag = new NodeData(NodeType.TABLE, table);
					n.SelectedImageIndex = n.ImageIndex = 3;
					node.Nodes.Add(n);
					n.Nodes.Add(this.BlankNode);
				}
			}
		}
コード例 #11
0
ファイル: TablesAPIController.cs プロジェクト: canhvu85/iCafe
 public TablesAPIController(ApplicationDbContext context, ITables tablesRepository)
 {
     _context          = context;
     _tablesRepository = tablesRepository;
 }
コード例 #12
0
 public void Result(ITables input)
 {
     throw new NotImplementedException();
 }
コード例 #13
0
 public VenueController(IDataService <Venue> venueService, IUserService userService, ITables tablesServices)
 {
     _venueService = venueService;
     _userService  = userService;
     _tableService = tablesServices;
 }