structure

Storing jquery code in external file and directory structure?

Hi there, Can anyone can confirm the best idea for storing jquery code, initially i was inserting everything in the HEAD of a document but i am seeing more and more code being used across pages, Is the best way to use include files .. with the extension .JS? Anything else or better with respect to this? What would be the best place...

Where can I find information on the structure of the Delphi VMT?

The System.pas file contains a fair amount of information on hard-coded VMT offsets, but it doesn't seem to actually say much about the structure of the VMT itself. What I'd really like to know is, is there any way to find out the size of a VMT at runtime, or in other words, how many virtual methods exist for a given class? ...

Larger than memory data structures and how they are typically handled

Say I have a file based data structure such as a B+ Tree. My understanding is that the data is expected to be stored on disk, but the index is usually loaded in memory. What if you have such a large file that even its index doesn't fit into memory? How is that typically handled? Secondly, since the index is a tree, not a linear set of...

Storing file structure in PHP

What is the best way to store a file structure, along with files, say from a Zip file? Currently each file is a row in the MySQL database, but obviously no structure can be read from that. I want to avoid storing a binary file. All files should be plain text. Each zip/file structure is private to the user whom submitted it. ...

XML to C struct and C struct to XML

I like to do my server side programming in C, but need to inter-operate with some XML. What I need to write is some function that, given a C structure, or nested structure, and another structure (or nested structures) that describes the elements in the C structure, spits it out as XML. And another function that reads the XML, verifies ...

GetPhysicalMonitorsFromHMONITOR returned handle is always null.

Hi, On the Media Foundation SDK there is the GetPhysicalMonitorsFromHMONITOR function that I am trying to implement using C# but with no luck ... In the returned PHYSICAL_MONITOR[], the function returns the string description of the monitor but for some mysterious reasons, the hPhysicalMonitor handle remains at 0. I have generated the...

Installing the Structure Module with ExpressionEngine Core

I’m trying to install the Structure module with ExpressionEngine Core. I did a fresh install of everything: ExpressionEngine 1.6.7 Structure 1.2.5 (adding the empty lang.pages.php file to /language/english, per http://expressionengine.com/forums/viewthread/91290/ Followed the instructions for installing Structure at http://expressionen...

CVS: Checkout only the directory structure

How can I checkout only the directory structure of a project (without any files) in a CVS repository? This could be useful, e.g., to know the structure itself, and selectively checkout the folders later. I might not be interested in, say, the test cases folder which might take too much space on my local hard disk. ...

Scope, using functions in current module

Hi, I know this must be a trivial question, but I've tried many different ways, and searched quie a bit for a solution, but how do I create and reference subfunctions in the current module? For example, I am writing a program to parse through a text file, and for each of the 300 different names in it, I want to assign to a category. T...

how to design extensible and secure data structure in my scenario?

Hello everyone, I am developing a web site and I need to build a data structure to store user profile information. Just like what we filled about our gender/age/education/etc. information for Facebook, etc. The current issue I met with is how to design an extensible and secure data structure, in more details, Currently I may not consi...

Flex Project Structure

I am trying to create a large flex project. This Project consists of a CORE application, and other sub-applications. The CORE application should contain information that will be shared by all other projects (e.g., link to database, data manager which loads data from the database, application information like height width colors fonts......

How should I rewrite a very large compound if statement in C#?

In my C# code, I have an if statement that started innocently enough: if((something == -1) && (somethingelse == -1) && (etc == -1)) { // ... } It's growing. I think there must be 20 clauses in it now. How should I be handling this? ...

? Structuring a Revision Control System (SVN) to Handle Dependencies

Hi, For many years, I have been programming in a simple way: I would save my source files in directories organized by language and project, make the occasional manual backup, and if I’m smart, I make a copy before trying out a new version; that’s pretty much it. I recently decided to begin using revision control. After examining a bunc...

Phing, SVN and local file control

Like most people there comes a time when your localhost layout just doesnt really do it anymore and you find there are files all over the place. This is what I propose doing and I think that maybe im missing something or doing too many steps! Most of my work is with Joomla and oscommerce. My directory structure is as follows -Clients ...

Cart table structure and update only particular item in cart.

I am trying to design database for a simple online shopping cart.I am not getting the idea of what to place for the table shopping cart.Is not it ok to create cart id as primary key?And later on while updating the items in a cart,what would be the appropriate logic to update only the changed field(say quantity) of a particular product?Pl...

How should I design my code?

I'm building a forum in PHP and MySQL (for the funs). And I'm looking for a more elegant, cleaner, nicer, smarter way of strcturing it. I usually do it like this: page.php <?php include 'header.php' ?> <?php code for this specific page ?> content <?php loops and shit all over ?> <?php include 'footer.php' ?> In the header file I h...

Which XML structure makes more sense?

Without going into too much detail we are looking to use XML as meta-data to describe constraints on properties (This is a cutdown example and XSD did not support our proposed complex model), there are two options being considered, which of the following XML strucutures makes better sense? Option 1) <?xml version="1.0" encoding="us-asc...

Ruby on Rails pattern for setting class defaults and allowing an override on subclasses

Basically I want to implement a simple Rails extension to define the seriousness of methods in my controller so that I can restrict usage of them appropriately. For example I'd define the default restful actions as so in an abstract superclass: view_methods :index, :show edit_methods :new, :create, :edit, :update destroy_methods :destro...

processing html document structure

Hi all, I was just wondering whether there are any resources that discusses processing html document structures. For example, if i have a page from the New York Times, and for any page, i would like to understand where is the main article, where are the important elements in the page. For some websites, the raw html document gives some...

How much should doctrine record do?

Hello I'm creating my own CMS and use doctrine for database. Now I wonder, when I crate Post record, how much work should that record do? An example: I have Post -> Categories relation (one to many), should I create separate functions to append categories (to look if Post already has category, etc. ) or should Post do that using acc...