Tag Info

New answers tagged

0

In general, I wouldn't store the data for your solution based on the way that you want to display it. That leads to very specific solutions that will make things difficult when your needs change. I would break things down in terms of entities in your solution and then create a set of LINQ Queries that would generate your display data when it is time to ...


2

There is no need for any esoteric examples because hash tables are used everyday. Right now you browser probably uses dozens of them. Maps (also called dictionaries or associative arrays sometimes) and sets in most of programming languages are usually implemented as hash tables by default. Those are such common data structures that you probably do not need ...


2

I'll give a real life example of hastables. I once saw a database in a CD. The CD contained a database with roughly 20 million records. The CD also contained an application. In that app you would enter a code, and the details of the record would appear on screen in a fraction of a second. And I'm talking of a time where CD drives were slower than today. No ...


-1

My guess learning about hashes is not the same of learning about random number generators (rng) but its very similar field in a way of knowing what differ a real random number from a pseudo-random and the quality about randomness. You probably know about xor-ing an image to hide any kind of data that you could extract from it, so, thats my guess. You need ...


0

I don't think this is too tough. What am I missing? using System; using System.Collections.Generic; public class ScheduledPerson { public string Name {get; set;} public Dictionary<string, Object> Fields { get { return _fields; } set { _fields = value; } } private Dictionary<string, Object> _fields = new ...


2

Minimum occupancies of greater than 50% don't work, because when you need to split a node because the node is too full, it would be impossible to cut a node such that the two resulting nodes were greater than 50% full. (You could do 60/40 or something like that but the smaller node would always fail the data structure's invariant of each node being greater ...


2

A minimum occupancy of 1 isn't possible with a B+ tree as each node has to have one entry from the parent node. Occupancies of less than 50% means that the tree can be made more efficient by redistributing entries between nodes and if two nodes have less than 50% occupancy, they get merged into one node. Or as Billy ONeal points out, the tree grows by ...


2

First I am going to put a disclaimer: I really hope this is a school assignment project because storing account numbers and maintaining funds balance in a desktop application with a text file is unbelievably insecure and prone to error. I vehemently recommend more of a client/server/database design with security built between all layers. With that being ...


2

One Option is to give every of your provinces, tiles and armies a reference to its parent tile/province/nation. You then have to consider this reference on each update of course as you now have some redundancy in your code and a little memory overhead. Though, the good thing is that it gives you the answers for questions 4-6 in an instant (constant time). ...



Top 50 recent answers are included