structure

Architectural Suggestions in a Linux App

Hi, I've done quite a bit of programming on Windows but now I have to write my first Linux app. I need to talk to a hardware device using UDP. I have to send 60 packets a second with a size of 40 bytes. If I send less than 60 packets within 1 second, bad things will happen. The data for the packets may take a while to generate. But if ...

How can I learn to write well-structured programs in Perl?

I've started learning Perl but most of my former programming experience has been in languages that emphasize object oriented programming such as C# and Java. All the Perl examples I have found tend to be long single function programs and I find my self writing code the same way. Are there any resources or tutorials for writing maintainab...

haXe: Keyframe animation without frames

I would like to do simple (looping) animation (moving, changing alpha etc) in haXe (flash9). I don't have anything that resembles frames in my library, just single frame assets. Since I am a beginner. I am not necessarily looking for a sophisticated framework. I would be happy with something quick & dirty. Maybe ifs checking the frame (...

How do you structure your site?

Im new with php. Have some questions on how to build. I include everything in index.php. Ex: ob_start.. html... functions etc.. if ($_GET['page'] == "forum") include('forum.php'); elseif ($_GET['page'] == "profile") include('profile.php'); else error...etc /html... I do it this way because I dont like to have to include a page in t...

Use data with variable structure

Imagine a system that works with data, which structure changes over time. Say, for example, today your User object contains Name : String and Email : String, but tomorrow you need to add Age : Integer and Address which consists of Country, Zip code, etc. Then you may want to create new field User.Contacts and move Email and Address to th...

Website Structure

Hey all, I'm pretty new to php and i'm trying to decide the best way to organize the pages and, using PHP, deliver them. The two (basic) ideas I've had are: A bunch of individual pages all with PHP includes to have the header, footer, and menu. A single main page that has the menu, header, and footer, along with an include for the mai...

Java Web Project Structure Best Practice

Hi All I am starting a new Java Web Project which is using Hibernate and a standard MVC Architecture. I have just started to layout the projects structure and while doing this I started to look around to see if there was any standards in this area, about where Controllers should go and generally the best way to lay everything out. Howe...

How should I deserialize this string data?

My application receives strings that represent objects. I have to parse the strings to get the property values for the object I'm creating. Each object will have to know the specifics about how many attributes there are, what each attribute means, etc. However, I want to avoid having each class know about how to parse the string. I'd...

structure alignment to port code to 64-bit

Hi, I have a 32-bit .NET assembly which PInvokes into the C layer. I want to port this assembly to 64-bit. I have read many documents related to porting to 64-bit, all of which seems to suggest that we need to take care of the alignment if we are to use structures. I had a general question related to structure alignment and wanted to c...

How would you structure a forum's DB schema?

1I'm building a little forum for practice. I see that forums like phpBB store the thread text in a separate table. Why? Why not store it all in the same table? Some thing like:thread_id, thread_date, thread_text, thread_author Why is it done this way? How would you do it? ...

How to convert Byte array into string ?

I have structure as follows: struct data {int no; string name; int id}; I am converting this structure into bytearray. I need to convert this back into structure format. For that I need to convert first members into integer and string. How to convert bytearray into structure ? ...

structuring your web based knowledge system

How would you structure the information which you maintain to keep all of the information about your projects and clients at your fingertips. We are finding that ours is becoming so large that at times we don't know for sure what we are looking for only that we know it is in the knowledge-base. We use a confluence in a classical hierarch...

Help with declaring C++ structure, with a float array as one of its members.

I was wondering if anyone could spot what is wrong with my structure declaration and use. At the moment I have a structure and wish to store float array as one of it's members. My code: struct Player{ float x[12]; float y[12]; float red,green,blue; float r_leg, l_leg; int poly[3]; bool up,down; }; I then tried filling the struct: f...

Loading a lookup table from a database into a C# program - data structure?

I have a table full of id's,categories and weights that I need to reference in my program as I read in records that contain those categories. What is the most efficient method to read those from a database and put into a structure that I can reference? The ID's (and possibly the names) would be unique Data might look like: ID,Category...

Dictionaries in Project Structure

Hello. I am wrapping up an application where I am using a lot of Dictionary classes to store Function and Action delegates. I am now refactoring my project a bit and cleaning code. My question is where do or would you put your Dictionary classes in your project structure? Right now, they are located within the calling class source files ...

Asp.Net Website Structure Question

Hi all, I recently got a project where i need to create a web app in asp.net. This is my first big project so i figured i'd ask you guys for your input on how to go about doing this. I'm planning on using asp.net webforms for this project. The app requires a bunch of summary pages that are some what similar (with the exception of a few ...

RMI: What change needs a recompiled impl class

I have two application which communicates by using RMI objects. I do have an interface, an implementation class and the generated stub class. I recognized, that some changes in the impl class take me to create a new stub class. My question is, what changes i can make without re-compiling the stub again? As far as What i know: I can ...

How to search a specific node in a graph structure in C?

Not that I have time to discuss this properly to reach a conclusion and adapt my code because the phase one (of three) of a school project is in 24hrs, but at least I need to know if I did the correct decision. I'm using linked lists and here's my structures: typedef struct sCity { int cityID; char *cityName; struct sCityL...

When to include sub-items in RESTful resource representation?

RESTful design seems to advocate flat or shallow structured representations (at least when resources are represented as XML). A resource representation should contain just the resource, which the URI identifies. I'm wondering when it is sensible to present resource's sub-resources within the parent resource? To elaborate, consider this...

How would you describe DSM in simple terms?

How would you describe DSM in simple terms? ...