structure

How do I start a new Perl module distribution?

I'm trying to set up a large-ish project, written in Perl. The IBM MakeMaker tutorial has been very helpful so far, but I don't understand how to link all the modules into the main program. In my project root, I have MANIFEST, Makefile.PL, README, a bin directory, and a lib directory. In my bin directory, I have my main script (Main.p...

How to sort structure arrays in MATLAB?

I'm working with an image retrieval system using color histogram intersection in MATLAB. This method gives me the following data: a real number which represents the histogram intersection distance, and the image file name. Because they are different data types, I store them in structure array with two fields, and then I save this structu...

Add all projects to same solution or not?

I am the intranet developer for the company I work for and I have been doing this for the last 5 years. My projects are divided into two solutions, the "Intranet" solution itself and the "Library" solution. The "Library" sln itself has several projects containing the DAL, BLL, etc.. The reason why I kept them in a different solution is b...

Many-to-many relationship structure in SQL Server

Assume that we have two tables: Roles and Reports. And there exists a many-to-many relationship between them. Of course, the only solution that comes to my mind is to create a cross-table, let's name it RoleReport. I can see two approaches to the structure of that table: 1. Columns: RoleReportId, RoleId, ReportId PK: RoleReportId 2....

Proper site structure using PHP, HTML, and CSS?

I know this questions probably been used and abused.... but i keep seeing conflicting arguments. So, what is the BEST way to structure a site using php, html, and css (+ minimum javascript). I've heard of people storing all of their files in a hidden directory above the root and including, I've heard of people using an include folder wit...

What is the <appname>.rb file in /lib typically used for in a Ruby project?

In reference to this question: http://stackoverflow.com/questions/614309/ideal-ruby-project-structure I noticed that appname.rb is in lib, and is top level. I was reading through a little of the Rake source code on Github, and I noticed their project structure is pretty much the same. They have a top level 'rake.rb' file in /lib, but I'...

In C: How to set a pointer to a structure member that is an array?

How should I write my code to example a specific array index of an array that happens to be a member of a structure? The following code is giving me problems. // main.c void clean_buffers(void); // prototype struct DEV_STATUS { unsigned char ADDR; unsigned char DEV_HAS_DATA; unsigned char ETH_HAS_DATA; unsigned char D...

vb.net: "Object reference not set to an instance of an object" when creating user structre

Hi! I get an "Object reference not set to an instance of an object" error while running this code below, and I don't know what is wrong with it.. goes like this: Dim mypoint As New PairOfSingle(0, 0) Private Structure PairOfSingle Dim x As Single Dim y As Single Public Sub New(ByVal xCoordinate As Single, ByVal y...

How to get [#]region structure from (Document, ProjectItem, FileCodeModel in EnvDTE)

Hi to all, I'm developing the integrated Package which show structure of code (C#, VB) in TreeView of my control window. I found a SourceCodeOutliner project in (http://www.codeplex.com/SourceCodeOutliner) and translate it to C#. I'd learn how to get a project structure for file, but at now I want to add into my treeView [#]regions s...

How to build a multi-view portal application in ASP.NET MVC

I was just watching Scott Hanselman's presentation on ASP.NET MVC in San Francisco. After thinking about it for a while, I was stumped as to how to best approach building an ASP.NET MVC-based site that has a [portal|modular|multi-view] structure (pick your favorite definition). To give you an idea of what I'm after, my company builds a ...

How to share files in a depot

We are using Perforce. In the depot are some projects that have their own main/branches/releases sub folders. There are also some resource files (png, mp3 and so on) that are needed (shared) for some of the different projects. Those don't have the main/branches/structure. Currently they are stored in a seperat folder in the depot that is...

What is the difference between structures containing bool vs uint when using PInvoke?

Ok, I'm now very confused. After my last question had several people comment about changing bool to uint I verified they are the same size by: Console.WriteLine("sizeof bool = {0}", Marshal.SizeOf(typeof(bool))); Console.WriteLine("sizeof uint = {0}", Marshal.SizeOf(typeof(uint))); Which of course prints: sizeof bool = 4 siz...

Multiple Exits From F# Function

I could do this easily in C++ (note: I didn't test this for correctness--it's only to illustrate what I'm trying to do): const int BadParam = -1; const int Success = 0; int MyFunc(int param) { if(param < 0) { return BadParam; } //normal processing return Success; } But I cannot ...

Parsing variable length descriptors from a byte stream and acting on their type

I'm reading from a byte stream that contains a series of variable length descriptors which I'm representing as various structs/classes in my code. Each descriptor has a fixed length header in common with all the other descriptors, which are used to identify its type. Is there an appropriate model or pattern I can use to best parse and r...

Does storing a lot of images in a single directory slow down image retrieval?

If i have a site where users can upload as many images as they want(think photobucket-like), what is the best way to set up file storage (also, all uploads get a unique random timestamp)? site root --username ----image1.jpg ----image2.jpg ----image3.jpg --anotheruser ----image1.jpg ----image2.jpg ----image3.jpg ... or siteroot --uplo...

How do you structure your ASP.net sources in Visual Studio?

Do you have one solution with the web application project, class libraries, database project and tests? Or, do you segment it into multiple solutions? Why? I'm asking because we're trying to streamline this scenario for Visual Studio 2010 and I'd like to get input from the community on how you'd prefer to work. ...

Why is DateTime a structure in .Net?

Why is DateTime a structure instead of an inheritable class? (I would like to be able to override the ToString() method but I can't.) ...

How Is The Structure Of a Image

Hello, I'm thinking to build a library to manipulate images(my own image type that I will develop), but first I need to understand the structure of a image How it is mounted? About the layer technology... Where I can find some good resources to understand these things? Thanks. ...

Doubt regarding de-referencing structure pointers. Please explain

I am compiling this piece of code and I get compliation errors saying " dereferencing pointer to incomplete type" . I get the errors for the last print statement and before that where I try to point (*temp). num to the address of b Here's the code snippet: void main() { struct { int xx; char *y; int * nu...

What Is The Structure Of a XPS File

As I think, XPS files are like PDF files, but what is the structure od a XPS file? It's like PDF files? ...