Search Results

Search found 33736 results on 1350 pages for 'project structure'.

Page 87/1350 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • Growable data structure in MATLAB

    - by rlbond
    I need to create a queue in matlab that holds structs which are very large. I don't know how large this queue will get. Matlab doesn't have linked lists, and I'm worried that repeated allocation and copying is really going to slow down this code which must be run thousands of times. I need some sort of way to use a growable data structure. I've found a couple of entries for linked lists in the matlab help but I can't understand what's going on. Can someone help me with this problem?

    Read the article

  • Rails + Dragonfly gem: Saving image in a directory structure based on ActiveRecord object attributes

    - by Allen Bargi
    I'm using dragonfly gem to manage images and attachments in my rails app and I need to store images in a specific directory structure based on my user model. let' say I have user model which has a name and each user has many albums, which have a name also, then I want the images to be stored in "#{RAILS_ROOT}/public/system/#{user.name}/#{user.album.name}/#{suffix}" I've managed to changed the root_path in dragon fly and I even overrided relative_storage_path like this: class MyDataStore < Dragonfly::DataStorage::FileDataStore private def relative_storage_path(suffix) "#{suffix}" end end but still, I don't know how I can pass the ActiveRecord object attributes like user.name and user.album.name to relative_storage_path to create my ideal path. do you have any idea how I can do such a thing?

    Read the article

  • To join or not to join - database structure

    - by Industrial
    Hi! We're drawing up the database structure with the help of mySQL Workbench for a new app and the number of joins required to make a listing of the data is increasing drastically as the many-to-many relationships increases. The questions: Is it really that bad to merge tables where needed and thereby reducing joins? Is there a better way then pivot tables to take care of many-to-many relationships? We discussed about instead storing all data in serialized text columns and having the application make the sorting instead of the database, but this seems like a very bad idea, even though that the database will be heavily cached. What do you think? Thanks!

    Read the article

  • Quickest way to write to file in java

    - by user1097772
    I'm writing an application which compares directory structure. First I wrote an application which writes gets info about files - one line about each file or directory. My soulution is: calling method toFile Static PrintWriter pw = new PrintWriter(new BufferedWriter( new FileWriter("DirStructure.dlis")), true); String line; // info about file or directory public void toFile(String line) { pw.println(line); } and of course pw.close(), at the end. My question is, can I do it quicker? What is the quickest way? Edit: quickest way = quickest writing in the file

    Read the article

  • Queue-like data structure with fast search and insertion

    - by Max
    I need a datastructure with the following properties: It contains integer numbers, no duplicates. After it reaches the maximal size the first element is removed. So if the capacity is 3, then this is how it would look when putting in it sequential numbers: {}, {1}, {1, 2}, {1, 2, 3}, {2, 3, 4}, {3, 4, 5} etc. Only two operations are needed: inserting a number into this container (INSERT) and checking if the number is already in the container (EXISTS). The number of EXISTS operations is expected to be approximately 2 * number of INSERT operations. I need these operations to be as fast as possible. What would be the fastest data structure or combination of data structures for this scenario?

    Read the article

  • Database structure for storing Bank-like accounts and transactions

    - by user1241320
    We're in the process of adding a bank-like sub-system to our own shop. We already have customers, so each will be given a sort of account and transactions of some kind will be possible (adding to the account or subtracting from it). So we at least need the account entity, the transaction one and operations will then have to recalculate overall balances. How would you structure your database to handle this? Is there any standard bank system have to use that I could mock? By the way, we're on mysql but will also look at some nosql solution for performance boost.

    Read the article

  • Flexibility starting to develop applications and DB

    - by kristaps
    Hi! First of all I want to say some info for admins. This post can help to all DBA and developers. Hope You don't close this. I'm writing about widespread problem I'm writing master work and I want that You will had little time to answer my questions in my form. These questions are about db structures. Visit here: http://spreadsheets.google.com/embeddedform?formkey=dEhmOWFGb2twWVFreWJwWXp2U3c5a1E6MQ After I summarized results, I insert it in new post and developers can choose which structure to use to reach needed requirements developing new applications. I think that my test will help a lot of people. Best regards, Kristaps

    Read the article

  • Get the newest file from directory structure year/month/date/time

    - by Radek
    I store backups of databases in a directory structure year/month/day/time/backup_name an example would be basics_mini/2012/11/05/012232/RATIONAL.0.db2inst1.NODE0000.20110505004037.001 basics_mini/2012/11/06/012251/RATIONAL.0.db2inst1.NODE0000.20110505003930.001 note that timestamp from the backup file cannot be used. Before the automation testing starts the server time is set to 5.5.2011 So the question is how I can get the latest file if I pass the "base directory" (basics_mini) to some function that I am going to code. My thoughts are that I list the base directory and sort by time to get the year. Then I do the same for month, day and time. I wonder if there is any "easier" solution to that in php.

    Read the article

  • Better data-structure design

    - by Tempname
    Currently in my application I have a single table that is giving me a bit of trouble. The issue at hand is I have a value object that is mapped to this table. When the data is returned to me as an array of value objects, I have to then loop through this array and begin my recursion by matching the ParentID to parent ObjectID's. The column ParentID is either null (acts a parent) or it holds the value of an ObjectID. I know there has to be a better way to create this data structure so that I do not have to do recursive loops to match ParentID's with their ObjectID's. Any help with this is greatly appreciated. Here is the table in describe form: +----------------+------------------+------+-----+---------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +----------------+------------------+------+-----+---------------------+-----------------------------+ | ObjectID | int(11) unsigned | NO | PRI | NULL | auto_increment | | ObjectHeight | decimal(6,2) | NO | | NULL | | | ObjectWidth | decimal(6,2) | NO | | NULL | | | ObjectX | decimal(6,2) | NO | | NULL | | | ObjectY | decimal(6,2) | NO | | NULL | | | ObjectLabel | varchar(255) | NO | | NULL | | | TemplateID | int(11) unsigned | NO | MUL | NULL | | | ObjectTypeID | int(11) unsigned | NO | MUL | NULL | | | ParentID | int(11) unsigned | YES | MUL | NULL | | | CreationDate | datetime | YES | | 0000-00-00 00:00:00 | | | LastModifyDate | timestamp | YES | | NULL | on update CURRENT_TIMESTAMP | +----------------+------------------+------+-----+---------------------+-----------------------------+e

    Read the article

  • Change array structure in PHP.

    - by Muhammad Sajid
    Refers to my previous question : Show values in TDropDownList in PRADO. ok fine the array i receive from query is an object array like : ContactRecord Object ( [id] => 1 [name] => leo [_recordState:protected] => 1 [_connection:protected] => [_invalidFinderResult:protected] => [_e:TComponent:private] => Array ( ) ) ContactRecord Object ( [id] => 2 [name] => ganda [_recordState:protected] => 1 [_connection:protected] => [_invalidFinderResult:protected] => [_e:TComponent:private] => Array ( ) ) If I convert it in to array like: Array ( [key 1] => leo [key 2] => ganda ) then I can populate values into TDropDownList. Now can anyone help me to convert array structure which I need ... ? Again thanks

    Read the article

  • Correct structure and way of website versioning

    - by Saif Bechan
    Recently I use GIT to version my website. It makes it all really easy to see how my project develops and I always have save backups on different places on the web. Now my main question is if it is recommended to version your whole root of the website. I have a basic structure that looks something like this: /httpdocs /config /media /application index.php .htaccess 1) Should I use the /httpdocs folder to version, or should I use the content of the folder. 2) Is it recommended to version the media folder. In the media version I have several images for the overall layout, and some other images for the website. These imagas can be quite large. I work on these images from time to time and so they change. I hardly never need the old image again, so is this not just taking up precious storage space. I would highly appreciate just some basic recommendation on this topic.

    Read the article

  • Can Wordpress Duplicate An Entire Page Structure?

    - by rob walsh
    I have a wordpress site that i've been working on that has some pages (as in NOT posts) that a client changes content on in order to target particular keywords. these pages have been using podscms for content management. The client now wants to be able to duplicate these pages any number of times and edit the text within them. So basically, he wants to be have a dozen or so versions of about 4 linked pages. Does anyone know if it's possible to duplicate an entire multipage structure like this in WP? Or any WP driven sites that implement segmentation similarly?

    Read the article

  • Python - from file to data structure?

    - by Seafoid
    Hi, I have large file comprising ~100,000 lines. Each line corresponds to a cluster and each entry within each line is a reference i.d. for another file (protein structure in this case), e.g. 1hgn 1dju 3nmj 8kfn 9opu 7gfb 4bui I need to read in the file as a list of lists where each line is a sublist, thus preserving the integrity of the cluster, e.g. nested_list = [['1hgn', '1dju', '3nmj', '8kfn'], ['9opu', '7gfb'], ['4bui']] My current code creates a nested list but the entries within each list are a single string and not comma separated. Therefore, I cannot splice the list with indices so easily. Any help greatly appreciated. Thanks, S :-)

    Read the article

  • Javascript recursive data structure definition

    - by Matt Bierner
    I need to define a data structure recursively in Javascript. Here is a simple example of a circular linked list: // List a very simplified example of what the actual (non list) code does. function List(f, r) { return function(){ return [f, r]; }; } var head = List('a', List('b', List('c', head))); When this is executed, head in List 'c' is resolved to undefined, not List 'a' as I need. List is an example function that returns a function (It is not an Javascript list that I can append to). I tried to wrap the definition of head is a self executing named function, but that blew the stack when head was resolved. What is the Javascript style solution that I am overlooking?

    Read the article

  • data structure for counting frequencies in a database table-like format

    - by user373312
    i was wondering if there is a data structure optimized to count frequencies against data that is stored in a database table-like format. for example, the data comes in a (comma) delimited format below. col1, col2, col3 x, a, green x, b, blue ... y, c, green now i simply want to count the frequency of col1=x or col1=x and col2=green. i have been storing the data in a database table, but in my profiling and from empirical observation, database connection is the bottle-neck. i have tried using in-memory database solutions too, and that works quite well; the only problem is memory requirements and quirky init/destroy calls. also, i work mainly with java, but have experience with .net, and was wondering if there was any api to work with "tabular" data in a linq way using java. any help is appreciated.

    Read the article

  • Appropriate data structure for a buffer of the packets

    - by psihodelia
    How to implement a buffer of the packets where each packet is of the form: typedef struct{ int32 IP; //4-byte IP-address int16 ID; //unique sequence id }t_Packet; What should be the most appropriate data structure which: (1) allows to collect at least 8000 such packets (fast Insert and Delete operations) (2) allows very fast filtering using IP address, so that only packets with given IP will be selected (3) allows very fast find operation using ID as a key (4) allows very fast (2), then (3) within filtered results ? RAM size does matter, e.g. no huge lookup table is possible to use.

    Read the article

  • Data structure for unrooted trees

    - by Esmond
    I'm having problems figuring out how to build an unrooted tree with weighted edges and what data structure to store such a tree. An example of an unrooted tree would be like the one here: http://www.bio.davidson.edu/courses/GENOMICS/seq/unrooted.gif The problem i am having is the leaves would only have 1 link to the internal nodes and the internal nodes would have 3 links(the internal nodes would have 2 children and a link to another internal node). Do i have to distinguish between the 2 different kinds of nodes or can i have one class having the function of both types of nodes?

    Read the article

  • JNAerator Unnamed Union Missing in Structure

    - by Nick
    I'm trying to get JNAerator to generate some JNA backed Java code from a C shared library and everything is fine except that it failed to generate an unnamed union nested inside a structure. Example: typedef struct MY_STRUCTURE { union { My_Type1 var1; My_Type2 var2; }; }MY_STRUCTURE; If I change the header to make the union have a name it will work. But for obvious reasons I can't just change the header without breaking the shared library I'm trying to use. Any solutions other than changing the header file and shared library to named union?

    Read the article

  • Tree data structure in php

    - by Piyush
    in my application user starts a new tree or get added under a child-user and keep on adding users in branches in such a way- >there are 10 level of tree type structure. >root node contain 1 user and each node(user) can have max 5 child-user in this way tree will be like level 0 = 1 user , level 1 = 5 user, level 2 = 25 user , level 3 = 125 user and so on. I created one MySQL table having columns like- User_id , level, super_id, child1_id, child2_id, child3_id, child4_id, child5_id my question is How can I get all child-user(child to child also) of a particular user at any level do I need to add some more columns in my table??

    Read the article

  • what mysql table structure is better

    - by Sergey
    I have very complicated search algorithm on my site, so i decided to make a table with cache or maybe all possible results. I wanna ask what structure would be better, or maybe not the one of them? (mySQL) 1) word VARCHAR, results TEXT or BLOB where i'll store ids of found objects (for example 6 chars for each id) 2) word VARCHAR, result INT, but words are not unique now i think i'll have about 200 000 rows in 1) with 1000-10000 ids each row or 200 000 000+ rows in 2) First way takes more storage memory but i think it would be much faster to find 1 unique row among 200 000, than 1000 rows among 200 mln non unique rows i think about index on word column and no sphinx. So that do YOU think? p.s. as always, sorry for my english if it's not very good.

    Read the article

  • How to organize product catalog site in Drupal 6?

    - by user319366
    Hello there, please advice me how to organize product catalog site with such structure (this is pages which should be in site map): - Home page - About Us -- Team -- Contacts - Products -- Category --- Product ---- Overview ---- Photo gallery ---- Variants -- Category --- Subcategory --- Product ---- Overview ---- Photo gallery ---- Variants I know that i can use Page nodes for general pages like About page. And i can prepare Product node with CCK with needed fields. Then i can use taxonomy vocabulary for product categories/subcategories. Is this a right way to do such functionality? Or better to use just child/parent nodes? And how i can show subpages menu on product page? How i can organize menus? I need one menu with primary links, second menu below it, for secondary links (except Products catalog) and sidebar menu for Products catalog. Please advice. May be this is easy questions, but i just learning Drupal (but i have experience with other CMS). Thanks a lot.

    Read the article

  • How do I take the advantage of the variable column key/value structure of Cassandra

    - by icejade
    If I have to predefine all the columns, how do I take the advantage of the variable column key/value structure of cassandra? If I use update table command, it will insert null for all the rows which don't have that column. This is same as relational DB. For example, for contact column family, I have name, phone, email. I have 100 contacts have all 3 field. Then number 101 contact has skype id which I want to add. If I use insert statement, it won't let me add skypeid since it's not defined in the CF. So I have to run alter statement to change the CF, then all the first 100 contacts will have a null field for each of them.

    Read the article

  • Where should I store my App specific config files in WPF

    - by Akash Deshpande
    Background : I have some Application Data. i.e. the Database, come important config files. This data is vital for the application to start else it is exited. Problem : Where should I store this data. i.e in which folder and where. Right Now (This is wrong) it is stored in a folder in Debug/App_Data. But is causing issues in git and when we publish the App the data is not found. So where can we store this folder ? Present Structure is "WpfApplication2\WpfApplication2\bin\Debug" These Files need to be present when the app is started. So they need to be a part of the app itself.

    Read the article

  • Namespacing technique in JavaScript, recommended? performant? issues to be aware of?

    - by Bjartr
    In a project I am working on I am structuring my code as follows MyLib = { AField:0, ASubNamespace:{ AnotherField:"value", AClass:function(param) { this.classField = param; this.classFunction = function(){ // stuff } } }, AnotherClass:function(param) { this.classField = param; this.classFunction = function(){ // stuff } } } and so on like that to do stuff like: var anInstance = new MyLib.ASubNamespace.AClass("A parameter."); Is this the right way to go about achieving namespacing? Are there performance hits, and if so, how drastic? Do performance degradations stack as I nest deeper? Are there any other issues I should be aware of when using this structure? I care about every little bit of performance because it's a library for realtime graphics, so I'm taking any overhead very seriously.

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >