Search Results

Search found 7902 results on 317 pages for 'structure'.

Page 17/317 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Composite Views and View Controllers

    - by BillyK
    Hi, I'm somewhat new to Android and am in the process of designing an application with a couple fairly complex views. One of the views is intended to involve a complex view displaying information associated with model objects and segregated into several different views; the navigation of which is meant to be achieved using sliding effects (i.e. sliding one's finger across the screen to traverse from one screen to the next, etc). The view itself will be used to host multiple sets of views for varying types of model objects, but with a general structure that is reused between them all. As a rough example, the view might come up to display information about a person (the model object), displaying several details views: a view for general information, a view displaying a list of hobbies, and a view displaying a list of other individuals associated with their social network. The same general view, when given a model object representing a particular car would give several different views: A general view with details, A view containing photo images for that vehicle, a view representing locations which it could be purchased from, and a view providing a list of related cars. (NOTE: This is not the real data involved, but is representative of the general intent for the view). The subviews will NOT cover the entire screen real-estate and other features within the view should be both visible and able to be interacted with by the user. The idea here is that there is a general view structure that is reusable and which will manage a set of subviews dynamically generated based upon the type of model object handed to the view. I'm trying to determine the appropriate way to leverage the Android framework in order to best achieve this without violating the integrity of the framework. Basically, I'm trying to determine how to componentize this larger view into reusable units (i.e. general view, model-specific sub-view controllers, and individual detail views). To be more specific, I'm trying to determine if this view is best designed as a composite of several custom View classes or a composite of several Activity classes. I've seen several examples of custom composite views, but they typically are used to compose simple views without complex controllers and without attention to the general Activity lifecycle (i.e. storing and retrieving data related to the model objects, as appropriate). On the other hand, the only real example I've seen regarding a view comprised of a composite of Activities is the TabActivity itself, and that isn't customizable in the fashion that would be necessary for this. Does anyone have any suggestions as to the appropriate way to structure my view to achieve the application framework I'm looking for? Views? Activities? Something else? Any guidance would be appreciated. Thanks in advance.

    Read the article

  • Efficient data structure for fast random access, search, insertion and deletion

    - by Leonel
    I'm looking for a data structure (or structures) that would allow me keep me an ordered list of integers, no duplicates, with indexes and values in the same range. I need four main operations to be efficient, in rough order of importance: taking the value from a given index finding the index of a given value inserting a value at a given index deleting a value at a given index Using an array I have 1 at O(1), but 2 is O(N) and insertion and deletions are expensive (O(N) as well, I believe). A Linked List has O(1) insertion and deletion (once you have the node), but 1 and 2 are O(N) thus negating the gains. I tried keeping two arrays a[index]=value and b[value]=index, which turn 1 and 2 into O(1) but turn 3 and 4 into even more costly operations. Is there a data structure better suited for this?

    Read the article

  • django: ajax view structure

    - by zack
    I want to know the correct way to structure ajax views in django. say i do something like : def foo_json(request): if is.ajax(): # return JSON here and make it available as a resource at something like '/foo/data/'.. all is fine.. but if I point the browser at '/foo/data/' .. obviously I get an error (debug) like: app.views.foo_json didn't return an HttpResponse object. so... my question is: Whats the best way structure this kind of view? ..should I return an HTTP response code ..maybe 404 / 405 ... or something else? - not sure of the best way to handle this, any advice appreciated :)

    Read the article

  • Strategy to structure a search index in a relational database

    - by neilc
    I am interested in suggestions for building an efficient and robust structure for indexing products in a new database I am building (i'm using MySql) When a product is entered through the form there are three parts I am interested in indexing for searching purposes. The product title The product description Tags The most important is title, followed by tags, followed by the description. I was thinking of using the following structure CREATE TABLE `searchindex` ( `id` INT NOT NULL , `word` VARCHAR( 255 ) NOT NULL , `weighting` INT NOT NULL , `product_id` INT NOT NULL , PRIMARY KEY ( `id` ) ) Then each time a product is created I would split apart the title, description and tags (removing common words) and award them a weighting. Then it is trivial to select out the words and corresponding products and order them by weighting. Is there a better way to do this? I would be worried that this strategy would slow down over time and as the database filled up.

    Read the article

  • Storing a bucket of numbers in an efficient data structure

    - by BlitzKrieg
    I have a buckets of numbers e.g. - 1 to 4, 5 to 15, 16 to 21, 22 to 34,.... I have roughly 600,000 such buckets. The range of numbers that fall in each of the bucket varies. I need to store these buckets in a suitable data structure so that the lookups for a number is as fast as possible. So my question is what is the suitable data structure and a sorting mechanism for this type of problem. Thanks in advance

    Read the article

  • load table data on jsp using struts2 with fixed table structure

    - by Zahra
    Hi. I want to have a fixed table structure on my jsp page(3row, 4column). but I want to load data for this table from DataBase with using struts 2. I know if my table structure wasn't fixed I could have just get a List and iterate on it and add a data in every iteration, but how could I do this in this case. also if I don't have enough data to fill table, I want those places to be empty. I didn't find a good example, if you could help me or introduce me a good tutorial, it would be really appreciated. Thanks in advance.

    Read the article

  • Call an IOUSBDeviceInterface function on an obj-c object instead of a C structure

    - by b1onic
    Let's say I want to close an USB device. Here is a C structure representing the USB device: struct __USBDevice { uint16_t idProduct; io_service_t usbService; IOUSBDeviceInterface **deviceHandle; IOUSBInterfaceInterface **interfaceHandle; Boolean open; }; typedef struct __USBDevice *USBDeviceRef; Here is the code to close the device: // device is a USBDeviceRef structure // USBDeviceClose is a function member of IOUSBDeviceInterface C Pseudoclass (*device->deviceHandle)->USBDeviceClose(device->deviceHandle); Now imagine that the device properties are declared in an obj-c class @interface Device : NSObject { NSNumber idProduct io_service_t usbService; IOUSBDeviceInterface **deviceHandle; IOUSBInterfaceInterface **interfaceHandle; BOOL open; } @end How would I do to call USBDeviceClose() ?

    Read the article

  • Problem with array of elements of a structure type

    - by kobac
    I'm writing an app in Visual Studio C++ and I have problem with assigning values to the elements of the array, which is array of elements of structure type. Compiler is reporting syntax error for the assigning part of the code. Is it possible in anyway to assign elements of array which are of structure type? typedef struct { CString x; double y; } Point; Point p[3]; p[0] = {"first", 10.0}; p[1] = {"second", 20.0}; p[2] = {"third", 30.0};

    Read the article

  • Data Structure for a particular problem??

    - by AGeek
    Hi, Which data structure can perform insertion, deletion and searching operation in O(1) time in the worst case. We may assume the set of elements are integers drawn from a finite set 1,2,...,n, and initialization can take O(n) time. I can only think of implementing a hash table. Implementing it with Trees will not give O(1) time complexity for any of the operation. Or is it possible?? Kindly share your views on this, or any other data structure apart from these.. Thanks..

    Read the article

  • How to create a complete generic TreeView like data structure

    - by Nima Rikhtegar
    I want to create a completely generic treeview like structure. some thing like this: public class TreeView<T, K, L> { public T source; public K parent; public List<L> children; } as you can see in this class source, parent and also the children, all have a different generic data type. also i want my tree view to have unlimited number of levels (not just 3). this way when i want to work with my nodes in the code, all of them are going to be strongly typed. not just objects that i need to convert them to their original type. is it possible to create this kind of structure in c#, a treeview which all of its nodes are strongly typed? thanks

    Read the article

  • database vs flat file, which is a faster structure for "regex" matching with many simultaneous reque

    - by Jamex
    Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)? Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read. Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use? Which language is best for the type of structure? Perl for flat and PHP for db? Addition info: If I want to find all the cities have the pattern "cis" in their names. Which is better/faster, using regex or string functions? Please recommend a strategy TIA

    Read the article

  • database vs flat file, which is a faster structure for regex matching with many simultaneous request

    - by Jamex
    Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)? Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching using regex against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read. Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use? Which language is best for the type of structure? Perl for flat and PHP for db? TIA

    Read the article

  • Copy VSS structure to server with asp.net

    - by Tyzak
    i want to copy the structure (with the documents) from our vss server to an webserver. Therefore i want to create an application which is on this webserver. i want to use asp.net. i don't know what exactly i need therefore : I have to build somekind of connection? then go throw the structure and copy it somehow : ? important: i want to copy the documents with the right creation date ( it changes when i just copy the doc.) are there APIs for asp.net <- vss?

    Read the article

  • Proper structure for many test cases in Python with unittest

    - by mellort
    I am looking into the unittest package, and I'm not sure of the proper way to structure my test cases when writing a lot of them for the same method. Say I have a fact function which calculates the factorial of a number; would this testing file be OK? import unittest class functions_tester(unittest.TestCase): def test_fact_1(self): self.assertEqual(1, fact(1)) def test_fact_2(self): self.assertEqual(2, fact(2)) def test_fact_3(self): self.assertEqual(6, fact(3)) def test_fact_4(self): self.assertEqual(24, fact(4)) def test_fact_5(self): self.assertFalse(1==fact(5)) def test_fact_6(self): self.assertRaises(RuntimeError, fact, -1) #fact(-1) if __name__ == "__main__": unittest.main() It seems sloppy to have so many test methods for one method. I'd like to just have one testing method and put a ton of basic test cases (ie 4! ==24, 3!==6, 5!==120, and so on), but unittest doesn't let you do that. What is the best way to structure a testing file in this scenario? Thanks in advance for the help.

    Read the article

  • Creating a good directory structure

    - by numerical25
    This might be a silly question but I am still learning. I have read several books on creating application and creating a good directory structure. When people talk about creating a directory structure, do they mean the folders you make within the solution explorer (folders you actually find inside of a .sln file) or do they mean setting up and creating folders that reside in the same folder as your .sln file or your compiled application (.exe). I figured the solution explorer folders are different from a typical windows folder cause the folders I create inside my .sln file are no where to be found on my windows system.

    Read the article

  • folder structure for project documentation

    - by Qiulang
    Hi all, I saw some questions raised about the folder structure of source codes, but I never see the question about folder structure of project documentation. I googled it and still do not see many articles talk about. Here is one http://www.projectperfect.com.au/downloads/Info/info_project_folder_structure.pdf To quote some of its words: "There are two broad approaches: Organize by phase so that each top directory is a phase. For example, you might have directories for Feasibility, Business Analysis, Design etc. or whatever your phases are called. Organize by function so that the top directory level are functions. For example, Risks, Requirements, Scope, Change Control, Development. Most times a mix of both are used..." So any thought about it? I believe this is also an important issue!

    Read the article

  • Optimal directory structure for filesystem

    - by Pankaj
    We have large scale web application which has millions of customer. Each customer can have document based on document type. We may have 20-30 types of documents. We are planning to use GlusterFS for storing these documents. I'm trying to find out what are the limitations of Gluster as far as number of files/directories ? Do we need to have hierarchical directory structure ? What would be the optimal directory structure ? Does this make sense - CustmerId Documenttype File1 File2

    Read the article

  • How to structure a Visual Studio project for the data access layer

    - by Akk
    I currently have a project that uses various DB access technologies mainly for showcasing or for demos. Currently we have: Namespace App.Data (App.Data.dll) Folder NHibernate Folder EntityFramework Folder LinqToSql The above structure is ok as we only use Sql Server as the DB. But going forward we will be including Oracle, MySql etc. So what would be a better structure with this in mind? I thought about: Namespace App.Data.SqlServer (App.Data.SqlServer.dll) Folder NHibernate Folder EntityFramework Folder LinqToSql Or would it just be better to have separate assemblies for each database and access technology?: Namespace App.Data.SqlServer.NHibernate (App.Data.SqlServer.NHibernate.dll) Namespace App.Data.SqlServer.EntityFramework(App.Data.SqlServer.EntityFramework.dll) Namespace App.Data.Oracle.NHibernate (App.Data.Oracle.NHibernate.dll) Namespace App.Data.MySql.NHibernate (App.Data.MySql.Oracle.dll)

    Read the article

  • How to structure web application with part of it being secured (SSL)

    - by spirytus
    What is the common pattern to structure web application where part of it has to be secured. So lets say I have page_a and page_b which do not need to be secured, although should display login information (login fields or login details once user logged in). This web app. also would have secured pages (admin, checkout or similar) secure_page_c and secure_page_d. My questions are: What is the common folder structure for such assuming I code in php with no frameworks? Also how shall I deal with session variables in case user navigates lets say from secure_page_b to non secure page_a or vice versa? What else might be a problem and should be considered when coding that kind of app in php? Thank you all for any suggestions

    Read the article

  • What is this project/compilation source structure?

    - by Werner
    Hi, I am working on some project my boss sent to me. After unzipping, this is the structure of the files: executable_file config.mk doc include lib Makefile sources I have only worked with "usual" Makefile projects. But I do not undersatnd the meaning of config.mk here. Do you know which kind of "build" structure (what is the right name for this concept?) is it, and where can i find more information about this? I need to modify it, so it compiles in another hardware, so I do not know where I sohuld work on. Thanks

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >