Data Structure Needed

*** PLEASE DO NOT REPLY TO THIS POSTING UNLESS
*** YOU KNOW EXACTLY WHAT I AM TALKING ABOUT
*** AND HAVE SOLUTION AT THE READY.
*** NO SWING TREE FYIs PLEASE...doesn't apply.
*** NO UI JAVASCRIPTS .. I HAVE THOSE.
I need a properly constructed multiway
(m-way, general, n-ary, etc.) data structure
implementation that uses non-ui
dependent/associated classes. This is know as the
first child/next sibling data structure used in
Filesystems (similiar to a BTree).
I am using many delimited strings, similiar to a
directory/file structure path but the string is a
software project hierarchy.
[a string is structured like this]
root|branch|...|branch|leaf
[Process]
1) the strings are fetched from DB by servlet.
2) servlet feeds strings into data structure
to eliminate duplicates and place in proper location.
3) servlet uses contents of data structure to
construct links that are coupled with the infamous
ui-tree script.
If you know your data structures and have an implementation
that won't take me 6 days to modify for it to work I would
appreciate your assistance. I am creating on my own as we
speak but one from a more experienced java programmer would
be better.
Thank You,
Kevin

Sounds like one hell of a frustrated programmer over there - all those capitals an'all..
If I understand you correctly, I don't think you'd take six days to implement this; just split your string by the separator;
String[] split(String path, char sep, char esc) {
  String[] result = new String[0];
  int o = 0;
  int i; for (i=0; i<path.length(); ++i) {
    char c = path.charAt(i);
    if (c == esc) {
      ++i;
      continue;
    if (c == sep) {
      String substring = path.substring(o, i);
      String[] newresult = new String[result.length+1];
      System.arraycopy(result, 0, newresult, 0, result.length);
      newresult[result.length] = substring;
      result = newresult;
      o = i+1;
}Then have a java.util.Hashtable as root, with all names in it pointers to either more Hashtables (nodes), or Strings (leaves). If it really does not get anymore complex than that (data associated with leaves, for example), you don't really have to use anything more complex than 'instanceof' here.
Then start looping over all your String[] split paths, retrieve all nodes, if it's a String and you have a child for it, then convert it to a Hashtable, it it's a Hashtable trod along, if it isn't there create a String (unless you know you have an extra child, in which case you create a Hashtable).
When you're ready to retrieve, just enumerate your root Hashtable, casting to String all the keys, examining all the values; if they are Hashtable, then recurse. If they're Strings, do your Thing (TM).

Similar Messages

  • Urgent! Need help in deciding data structure to use

    Hi all,
    I need to implement a restaurant system by which a customer can make a reservation.
    I was wondering whether vector would be able to be store such an object, The thing is I don't want a complex data structure. just sumthin simple cos i hardly have anytime left to my submission. sighz...
    The thing is I need to able to search based on 2 properties of an object. Eg. I need to search for a reservation based on the customer name and the date he reserved a table.
    But I am totally clueless how to search thru a vector based on 2 properties of the object... Would really appreciate some help. Like an example how to so so based on my program. Feelin so lost...This is all I have so far:
    class AddReservation
         static BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
         //Main Method
         public static void main (String[]args)throws IOException
              String custName, comments;
              int covers, date, startTime, endTime;
              int count = 0;
              //User can only add one reservation at a time
              do
                   //Create a new reservation
                   Reservation oneReservation=new Reservation();                         
                   System.out.println("Please enter customer's name:");
                   System.out.flush();
                   custName = stdin.readLine();
                   oneReservation.setcustName(custName);
                   System.out.println("Please enter number of covers:");
                   System.out.flush();
                   covers = Integer.parseInt(stdin.readLine());
                   oneReservation.setCovers(covers);
                   System.out.println("Please enter date:");
                   System.out.flush();
                   date = Integer.parseInt(stdin.readLine());
                   oneReservation.setDate(date);
                   System.out.println("Please enter start time:");
                   System.out.flush();
                   startTime = Integer.parseInt(stdin.readLine());
                   oneReservation.setstartTime(startTime);
                   System.out.println("Please enter end time:");
                   System.out.flush();
                   endTime = Integer.parseInt(stdin.readLine());
                   oneReservation.setendTime(endTime);
                   System.out.println("Please enter comments, if any:");
                   System.out.flush();
                   comments = stdin.readLine();
                   oneReservation.setComments(comments);
                   count++;
              while (count<1);
              class Reservation
              private Reservation oneReservation;
              private String custName, comments;
              private int covers, startTime, endTime, date;
              //Default constructor
              public Reservation()
              public Reservation(String custName, int covers, int date, int startTime, int endTime, String comments)
                   this.custName=custName;
                   this.covers=covers;
                   this.date=date;
                   this.startTime=startTime;
                   this.endTime=endTime;
                   this.comments=comments;
              //Setter methods
              public void setcustName(String custName)
                   this.custName=custName;
              public void setCovers(int covers)
                   this.covers=covers;;
              public void setDate(int date)
                   this.date=date;
              public void setstartTime(int startTime)
                   this.startTime=startTime;
              public void setendTime(int endTime)
                   this.endTime=endTime;
              public void setComments(String comments)
                   this.comments=comments;
              //Getter methods
              public String getcustName()
                   return custName;
              public int getCovers()
                   return covers;
              public int getDate()
                   return date;
              public int getstartTime()
                   return startTime;
              public int getendTime()
                   return endTime;
              public String getComments()
                   return comments;
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    class searchBooking
         static BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
         public static void main (String[]args)throws IOException
              int choice, date, startTime;
              String custName;
                   //Search Menu
                   System.out.println("Search By: ");
                   System.out.println("1. Date");
                   System.out.println("2. Name of Customer");
                   System.out.println("3. Date & Name of Customer");
                   System.out.println("4. Date & Start time of reservation");
                   System.out.println("5. Date, Name of customer & Start time of reservation");
                   System.out.println("Please make a selection: ");          
                   //User keys in choice
                   System.out.flush();
                   choice = Integer.parseInt(stdin.readLine());
                   if (choice==1)
                        System.out.println("Please key in Date (DDMMYY):");
                        System.out.flush();
                        date = Integer.parseInt(stdin.readLine());
                   else if (choice==2)
                             System.out.println("Please key in Name of Customer:");
                             System.out.flush();
                             custName = stdin.readLine();
                   else if (choice==3)
                             System.out.println("Please key in Date (DDMMYY):");
                             System.out.flush();
                             date = Integer.parseInt(stdin.readLine());
                             System.out.println("Please key in Name of Customer:");
                             System.out.flush();
                             custName = stdin.readLine();
                   else if (choice==4)
                             System.out.println("Please key in Date (DDMMYY):");
                             System.out.flush();
                             date = Integer.parseInt(stdin.readLine());
                             System.out.println("Please key in Start time:");
                             System.out.flush();
                             startTime = Integer.parseInt(stdin.readLine());
                   else if (choice==5)
                             System.out.println("Please key in Date (DDMMYY):");
                             System.out.flush();
                             date = Integer.parseInt(stdin.readLine());
                             System.out.println("Please key in Name of Customer:");
                             System.out.flush();
                             custName = stdin.readLine();
                             System.out.println("Please key in Start time:");
                             System.out.flush();
                             startTime = Integer.parseInt(stdin.readLine());
                        }

    Please stop calling your questions urgent. Everybody's question is urgent to them. Nobody's are urgent to the people who are going to answer them. Calling your questions urgent suggests that you think they are more important than others' (They're not.) and will only serve to irritate those who would help you. It won't get your questions answered any sooner.

  • Need help on efficient searches using hashes on large #s of data structures

    I have a massive amount of data and I need a way to access it using generated indexes instead of traditional searching such as binary chop as I require a fast response time.
    I have 100,000 Array data structures each containing roughly 10 to 60 elements. The elements of the Arrays do not store any raw data they just hold references to objects. I have about 10,000 unique objects which are referenced to by the arrays.
    What I need to do is supply a number of objects as the query and the system should return all the arrays which contain two or more different objects from the query.
    So for example>
    Given query objects> &#8220;DER&#8221; , &#8220;ERE&#8221; , &#8220;YPS&#8221;
    and arrays> [DER, SFR, PPR]
         [PER, ERE, SWE, YPS]
         [ERE, PPD, DER, YPS, SWE]     
         [PRD, LDF, WSA, MMD]
    It should return arrays 2 and 3.
    I had a look at hashMaps but I&#8217;m not entirely sure if that&#8217;s what I need.
    Would I need to hash the each Array and then hash the query objects and look for overlaps in the two hashes or something similar?
    Thanks In Advance

    For a single query, it's more efficient to do less work, so don't create intermediate objects, don't create a index of objects to sets of possibles, and stop counting matches when you find enough:.
                    final HashSet<String> querySet = new HashSet<String>(Arrays.asList(query));
                    final Set<String> results = new LinkedHashSet<String>();
                    // find matches using scan of all arrays
                    for (String[] array : data) {
                        int matchCount = 0;
                        for (String elt : array) {
                            if (querySet.contains(elt)) {
                                ++matchCount;
                                if (matchCount >= 2) {
                                    results.add(Arrays.asList(array).toString());
                                    break;
                    }Using random data, 100,000 arrays of selections from a list of 10,000 trigrams, scanning all the arrays takes about as long as the set code, but doesn't require generation of the map, which can take up a lot of memory if you pre-create the sets (I didn't complete a run doing that, although it should be faster to query, it used too much memory and my computer started swapping so I gave up after a few minutes).
    Running queries of size 2 to 25, times in ms:
    linear scan of all arrays in data set:
    elapsed: 2196
    creating index of trigram to arrays containing trigram:
    elapsed: 4635
    query using set union and index lookup:
    elapsed: 2195
    query using direct scan and index lookup:
    elapsed: 164
    So if I was doing one query per dataset, just use a simple scan as above. If you're doing lots on the same dataset, then create a map<String, List<String[]>> to index the arrays, and the lookup will save quite a bit of time.
    Creating the index:.
                dataSets = new HashMap<String, List<String[]>>();
                for (String trigram : trigrams)
                    dataSets.put(trigram, new ArrayList<String[]>());
                for (String[] array : data)
                    for (String trigram : array)
                        dataSets.get(trigram).add(array);Finding matches using scan of arrays with at least one elt in query:.
                    final HashSet<String> querySet = new HashSet<String>(Arrays.asList(query));
                    final Set<String> results = new LinkedHashSet<String>();
                    for (String trigram : query) {
                        for (String[] array : dataSets.get(trigram)) {
                            for (String elt : array) {
                                if (elt != trigram && querySet.contains(elt)) {
                                    results.add(Arrays.asList(array).toString());
                                    break;
                    }

  • Need links for data structure and algorithms.

    Hi.
    I am just new to java but need to learn data structure and algorithms.
    Do your guys got any good links or bbs to learn?
    Thanx in advance

    http://www.amazon.com/exec/obidos/tg/detail/-/1571690956/ref=cm_huw_sim_1_3/104-7657019-1043968?v=glance
    http://www.amazon.com/exec/obidos/tg/detail/-/0534376681/ref=cm_huw_sim_1_4/104-7657019-1043968?v=glance
    http://www.amazon.com/exec/obidos/tg/detail/-/0672324539/ref=cm_huw_sim_1_2/104-7657019-1043968?v=glance
    http://www.amazon.com/exec/obidos/tg/detail/-/0201775786/qid=1060946080/sr=8-1/ref=sr_8_1/104-7657019-1043968?v=glance&s=books&n=507846
    $8 for the first

  • Need help on how to construct proper data structure using vector

    I have several data files need to be loaded to my application. The data file has only 2 columns: "mean" and "standard deviation". The data file is looking like following:
    mean standard deviation
    217.0 27.3
    312.1 31.5
    I used two vectors to store the mean data and standard deviation data.
    Vector meanVec = new Vector();
    Vector stdVec = new Vector();
    the file is loaded once a time. so how to make a vector of vector to store the data like a matrix?
    In another word, when multiple files need to be loaded, how can I keep track and store these data to display in two table (or files) which can display mean data from all the files and std from all files, like the following:
    table1 or file1
    mean1 mean2
    217.0 282.3
    table2 or file2
    std1 std2
    27.3 27.9
    Any suggestion is greatly appreciated!

    If your application doesn't require to keep track of which mean (or std.dev.) values come from which file, whatever you are doing is just fine.
    Use ArraList in place of Vector, as Vector being part of older collection framework is avoided in newer programs (as far as I know).
    While reading each file line by line in a loop, store the first value on each line in one list and the second value in the other. After reading all the files, you would have two lists containing the mean and std. dev. values.

  • Need a good Data Structure/ Algorithm

    I am working on a small problem that requires me to cache a large amount of key/value pairs of data. I must then do a lookup on the cache for a large number of words one after another until I find a word that is present as a Key and then quit.
    The cache is pretty large. About 600 - 1000 words as keys and ints as values.
    Is there an existing Data Structure in Java for this? If not, what type of data structure (B-tree etc) is best suited to cache such data and what algorithm should be used for lookup?

    The lookup for hashmap is efficient for very large maps up to the amount of memory you have. If you tune the load factor you can minimise the impact of having very large tables.
    Another option is to have a fixed array of HashMaps. You can use the hashcode (or your own) to put the key, value into the HashMap. I am not sure if this is actaully any faster, as I believe one is enough, but if you have concern this is what you can do.

  • Need help with some Coldfusion data structures

    Hello,
    I need to keep some sort of a list that contains a page, and then that page will have associated with it values.  So,
    if I have page 1, I may have values 240, 245, 300.  Then, on to page 2, and I will have say, 344, 29, etc.
    So, what I will have is something that "could maybe" be a 2 dimensional array where one of the elements is a list?
    Or, do I set up a struct say, page.number and page.value list, and put that struct in an array?
    Plus, the fun part is I have to save this bad boy in session.  I've been looking around the web for some examples, no
    luck.  So, to reiterate:
    I have a page number that has to be associated with a list.  That entire structure needs to be in an array or list of
    some sort, and stored in session.
    Thanks in advance!

    Really Google did not show anything like:
    <cfset session.pageAry = [
         {page="pageOne", numList="240,245,300"},
         {page="pageTwo", numList="344,29"}]>
    <cfdump var="#session.pageAry#">
    OR
    <cfset session.pageAry = arrayNew(1)>
    <cfset arrayAppend(session.pageAry, strutNew())>
    <cfset session.pageAry[1].page = "pageOne">
    <cfset session.pageAry[1].numList = "240,245,300">
    <cfset arrayAppend(session.pageAry, strutNew())>
    <cfset session.pageAry[2].page = "pageTwo">
    <cfset session.pageAry[2].numList = "344,29">
    OR
    The <cfscript> version of these examples.

  • Can I automate the creation of a cluster in LabView using the data structure created in an autogenerated .CSV, C header, or XML file?

    Can I automate the creation of a cluster in LabView using the data structure created in an auto generated .CSV, C header, or XML file?  I'm trying to take the data structure defined in one or more of those files listed and have LabView automatically create a cluster with identical structure and data types.  (Ideally, I would like to do this with a C header file only.)  Basically, I'm trying to avoid having to create the cluster by hand, as the number of cluster elements could be very large. I've looked into EasyXML and contacted the rep for the add-on.  Unfortunately, this capability has not been created yet.  Has anyone done something like this before? Thanks in advance for the help.  
    Message Edited by PhilipJoeP on 04-29-2009 04:54 PM
    Solved!
    Go to Solution.

    smercurio_fc wrote:
    Is this something you're trying to do at runtime? Clusters are fixed data structures so you can't change them programmatically. Or, are you just trying to create some typedef cluster controls so that you can use them for coding? What would your clusters basically look like? Perhaps another way of holding the information like an array of variants?
    You can try LabVIEW scripting, though be aware that this is not supported by NI. 
     Wow!  Thanks for the quick response!  We would use this cluster as a fixed data structure.  No need to change the structure during runtime.  The cluster would be a cluster of clusters with multiple levels.  There would be not pattern as to how deep these levels would go, or how many elements would be in each.   Here is the application.  I would like to be able to autocode a Simulink model file into a DLL.  The model DLL would accept a Simulink bus object of a certain data structure (bus of buses), pick out which elements of the bus is needed for the model calculation, and then pass the bus object.  I then will take the DLL file and use the DLL VI block to pass a cluster into the DLL block (with identical structure as the bus in Simulink).  To save time, I would like to auto generate the C header file using Simulink to define the bus structure and then have LabView read that header file and create the cluster automatically.   Right now I can do everything but the auto creation of the cluster.  I can manually build the cluster to match the Simulink model bus structure and it runs fine.  But this is only for an example model with a small structure.  Need to make the cluster creation automated so it can handle large structures with minimal brute force. Thanks!  

  • What is the best data structure for loading an enterprise Power BI site?

    Hi folks, I'd sure appreciate some help here!
    I'm a kinda old-fashioned gal and a bit of a traditionalist, building enterprise data warehouses out of Analysis Service hypercubes with a whole raft of MDX for analytics.  Those puppies would sit up and beg when you asked them to deliver up goodies
    to SSRS or PowerView.
    But Power BI is a whole new game for me.  
    Should I be exposing each dimension and fact table in the relational data warehouse as a single Odata feed?  
    Should I be running Data Management Gateway and exposing each table in my RDW individually?
    Should I be flattening my stars and snowflakes and creating a very wide First Normal Form dataset with everything relating to each fact? 
    I guess my real question, folks, is what's the optimum way of exposing data to the Power BI cloud?  
    And my subsidiary question is this:  am I right in saying that all the data management, validation, cleansing, and regular ETTL processes are still required
    before the data is suitable to expose to Power BI?  
    Or, to put it another way, is it not the case that you need to have a clean and properly structured data warehouse
    before the data is ready to be massaged and presented by Power BI? 
    I'd sure value your thoughts and opinions,
    Cheers, Donna
    Donna Kelly

    Dear All,
    My original question was: 
    what's the optimum way of exposing data to the Power BI cloud?
    Having spent the last month faffing about with Power BI – and reading about many people’s experiences using it – I think I can offer a few preliminary conclusions.
    Before I do that, though, let me summarise a few points:
    Melissa said “My initial thoughts:  I would expose each dim & fact as a separate OData feed” and went on to say “one of the hardest things . . . is
    the data modeling piece . . . I think we should try to expose the data in a way that'll help usability . . . which wouldn't be a wide, flat table ”.
    Greg said “data modeling is not a good thing to expose end users to . . . we've had better luck with is building out the data model, and teaching the users
    how to combine pre-built elements”
    I had commented “. . . end users and data modelling don't mix . . . self-service so
    far has been mostly a bust”.
    Here at Redwing, we give out a short White Paper on Business Intelligence Reporting.  It goes to clients and anyone else who wants one.  The heart
    of the Paper is the Reporting Pyramid, which states:  Business intelligence is all about the creation and delivery of actionable intelligence to the right audience at the right time
    For most of the audience, that means Corporate BI: pre-built reports delivered on a schedule.
    For most of the remaining audience, that means parameterised, drillable, and sliceable reporting available via the web, running the gamut from the dashboard to the details, available on
    demand.
    For the relatively few business analysts, that means the ability for business users to create their own semi-customised visual reports when required, to serve
    their audiences.
    For the very few high-power users, that means the ability to interrogate the data warehouse directly, extract the required data, and construct data mining models, spreadsheets and other
    intricate analyses as needed.
    On the subject of self-service, the Redwing view says:  Although many vendors want tot sell self-service reporting tools to the enterprise, the facts of the matter are these:
    v
    80%+ of all enterprise reporting requirement is satisfied by corporate BI . . . if it’s done right.
    v Very few staff members have the time, skills, or inclination to learn and employ self-service business intelligence in the course of their activities.
    I cannot just expose raw data and tell everyone to get on with it.  That way lies madness!
    I think that clean and well-structured data is a prerequisite for delivering business intelligence. 
    Assuming that data is properly integrated, historically accurate and non-volatile as well, then I've just described
    a data warehouse, which is the physical expression of the dimensional model.
    Therefore, exposing the presentation layer of the data warehouse is – in my opinion – the appropriate interface for self-service business intelligence.
    Of course, we can choose to expose perspectives as well, which is functionally identical to building and exposing subject data marts.
    That way, all calculations, KPIs, definitions, and even field names, and all consistent because they all come from the single source of the truth, and not from spreadmart hell.
    So my conclusion is that exposing the presentation layer of the properly modelled data warehouse is – in general - the way to expose data for self-service.
    That’s fine for the general case, but what about Power BI?  Well, it’s important to distinguish between new capabilities in Excel, and the ones in Office 365.
    I think that to all intents and purposes, we’re talking about exposing data through the Data Management Gateway and reading it via Power Query.
    The question boils down to what data structures should go down that pipe. 
    According to
    Create a Data Source and Enable OData Feed in Power BI Admin Center, the possibilities are tables and views.  I guess I could have repeating data in there, so it could be a flattened structure of the kind Melissa doesn’t like (and neither do I). 
    I could expose all the dims and all the facts . . . but that would mean essentially re-building the DW in the PowerPivot DM, and that would be just plain stoopid.  I mean, not a toy system, but a real one with scores of facts and maybe hundreds of dimensions?
    Fact is, I cannot for the life of me see what advantages DMG/PQ
    has over just telling corporate users to go directly to the Cube Perspective they want, that has already all the right calcs, KPIs, security, analytics, field names . . . and most importantly, is already modelled correctly!
    If I’m a real Power User, then I can use PQ on my desktop to pull mashup data from the world, along with all my on-prem data through my exposed Cube presentation layer, and PowerPivot the
    heck out of that to produce all the reporting I’d ever want.  It'd be a zillion times faster reading the data directly from the Cube instead of via the DMG, as well (I think Power BI performance sucks, actually).
    Of course, your enterprise might not
    have a DW, just a heterogeneous mass of dirty unstructured data.  If that’s the case,
    choosing Power BI data structures is the least of your problems!  :-)
    Cheers, Donna
    Donna Kelly

  • Lease Out Contract - Master Data Structural Relations

    Dear Gurus,
    I am new to FX RE and if my question is too simple, please excuse me!
    I am researching the possibilities for the master data structure of lease in contracts and have a serious confusion.
    The documentation says that objects can be assigned to a contract individually or many objects related to one contract. At the same tim it is said that rental units are assigned only to lease out contracts.
    How should i proceed if my company has got many lease in contracts for different object. Is it a must the contract to be assigned to an object or it can be managed just as a contract? I saw that from the RE Navigator you can create a contract, does that mean that in FX RE the contracts itself is considered as master data record?
    Any opinions will be highly appreciated.
    Many thanks in advance!

    Dear Kumar,
    Sorry if I ve been confusing. I will try to make it more clear.
    I am working for a Teleco and i am researching the possibility of implementing FX - RE internally. We will not need all the functionalities of the module, but only the ones that allow you to manage your lease in contracts. We`ve got lots of base stations contracts (as you can imagine) where our company is a tenant in a lease contract. 
    I did some research in relation to the master data structure and cant work out how should our master data be structured. The business requirements are  - handling the advance payments, accruals and postings, giving and receiving notices, adjustments of rent etc. Is it possible to create the contract within the system,  set all the conditions directly in it or do we need to have another master record other that the contract itself.
    My confusion comes from the fact that the standard solution of the lease outs suggests creating a rental unit first and then assigning the contract to it. But since we will be tenants we dont need to more detailed information on these objects, we just need the conditions in the contract that will let us handle all the activities that arise in connection to it.
    I hope that i put the question more clearly this time.
    Can you also tell me if it is possible to create a template and after entering the conditions about the particular contract to generate it from the system on a hard copy?
    Many thanks and sorry if i cant make myself more clear!

  • ABAP proxy class - data structure

    I generated a ABAP Proxy Class and the data structure I want to use is put automatically under item structure which has 0...unbounded type.
    1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
    2. If my source structure has only 3 level, and the target structure has more than 3 (including item), how to map it?
    e.g.
    Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
    Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
    I need to map level 3 from my source to level 4 in target, but it didn't seem to work.
    Thanks.

    --->1. How can I get rid of this item structure as it will create another unnecessary level for my mapping
    You can delete the proxy at Application Server.....make necessary changes at XI Message Interface and again generate the proxy...
    -->Source structure: Level 1(occurrence 1) > Level 2(1)> Level 3(0..1)
    Target structure: Level 1(1])--> Level 2(0...1) --> item (0..unbounded) ---> Level 4(0..1)
    For this you need to make use of context change features of XI Mapping.
    Regards,

  • PCI_MSI_CAPABILITY data structure is not defined in the wdm.h?

    Hi
    I cannot find the PCI_MSI_CAPABILITY data structure definition in the wdm.h. I found
    PCI_CAPABILITIES_HEADER and
    PCI_PM_CAPABILITY
    etc. are defined in the wdm.h. Am I missing something?
    Thank you,
    Tiger

    The webpage
    https://msdn.microsoft.com/en-us/library/windows/hardware/ff537579%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 states it is not included.  Why do you think you need to reference it?
    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

  • A robust data structure for a histogram of events over time.

    Hi all,
    I've been thinking for days, I am still lost on how to solve the following:
    Let's say that we have a list of events that occur over a certain time interval. Each event has a start timestamp and a finish timestamp. The events occur in no particular order and expand over various length of periods.
    With respect to the histogram, we mark the time period of an event occuring with a frequency of one. When events overlap over a time period, we mark that time period with a frequency of number of overlapping events.
    Given this raw data, we want to examine the data's frequency under various granularity such as second, minutes, hours, days, weeks, month and years for 60sec, 60min, 24 hrs, 7 days, 4 wks ranges respectively.
    So, what is a good intermediate (general) data structure that can store all the various events such that they can be easily transformed to a specific granularity. My goal here is to read the event list once, and histogram of events data with respect to various timeframe can be calculated.
    Does a timeline like data strucuture that stores aggregated frequencies solve my problem? With a fine granuarlity say seconds and a long time range, the data structure will bound to overflow.
    Any help is greatly appreciated!
    Brian

    You data structure would be in terms of Classes. You need a class Anevent{
    String eventName;
    Date startTime;
    Date endTime;
    In your main program have a Vector object which can store unllimited objects and which would not overflow. Store your event objects as they happen in this Vector. After your time interval of events is completed and you have the final Vector, you can pass the vector object to various methods in your main program to be simple or pass it to specailized graph drawing classes you would have to write to draw various Histograms.

  • What is the smallest data structure record in a .TXT file record to be recognized as an Apple Address Book "Data Card"?

    Hello! This is my first time in this discussion group. The question posed is the subject line itself:
    What is the smallest data structure record in a .TXT file record to be recognized as an Apple Address Book "Data Card"?
    I'm lazy! As a math instructor with 40+ students per class per semester (pCpS), I would rather not have to create 40 data cards pCpS by hand, only to expunge that info at semester's end. My college's IS department can easily supply me with First name, Last name, and eMail address info, along with a myriad of other fields. I can manipulate those data on my end to create the necessary .TXT file, but I don't know the essential structure of that file.
    Can you help me?
    Thank you in advance.
    Bill

    Hello Bill, & welcome aboard!
    No idea what  pCpS is, sorry.
    To import a text file into Address Book, it needs to be a comma delimited .csv file, like...
    Customer Name,Company,Address1,Address2,City,State,Zip
    Customer 1,Company 1,2233 W Seventh Street,Unit 543,Seattle,WA,99099
    Customer 2,Company 2,1 Park Avenue,,New York,NY,10001
    Customer 3,Company 3,65 Loma Linda Parkway,,San Jose,CA,94321
    Customer 4,Company 4,89988 E 23rd Street,B720,Oakland,CA,99899
    Customer 5,Company 5,432 1st Avenue,,Seattle,WA,99876
    Customer 6,Company 6,76765 NE 92nd Street,,Seattle,WA,98009
    Customer 7,Company 7,8976 Poplar Street,,Coupeville,WA,98976
    Customer 8,Company 8,7677 4th Ave North,,Seattle,WA ,89876
    Customer 9,Company 9,4556 Fauntleroy Avenue,,West Seattle,WA,98987
    Customer 10,Company 10,4 Bell Street,,Cincinnati,OH,89987
    Customer 11,Company 11,4001 Beacon Ave North,,Seattle,WA,90887
    Customer 12,Company 12,63 Dehli Street,,Noida,India,898877-8879
    Customer 13,Company 13,63 Dehli Street,,Noida,India,898877-8879
    Customer 14,Company 14,63 Dehli Street,,Noida,India,898877-8879
    Customer 15,Company 15,4847 Spirit Lake Drive,,Bellevue,WA,98006
    Customer 16,Company 16,444 Clark Avenue,,West Seattle,WA,88989
    Customer 17,Company 17,6601 E Stallion,,Scottsdale,AZ,85254
    Customer 18,Company 18,801 N 34th Street,,Seattle,WA,98103
    Customer 19,Company 19,15925 SE 92nd,,Newcastle,WA,99898
    Customer 20,Company 20,3335 NW 220th,2nd Floor,Edmonds,WA,99890
    Customer 21,Company 21,444 E Greenway,,Scottsdale,AZ,85654
    Customer 22,Company 22,4 Railroad Drive,,Moclips,WA,98988
    Customer 23,Company 23,89887 E 64th,,Scottsdale,AZ,87877
    Customer 24,Company 24,15620 SE 43rd Street,,Bellevue,WA,98006
    Customer 25,Company 25,123 Smalltown,,Redmond,WA,98998
    Try Address Book Importer...
    http://www.sillybit.com/abee/

  • Open ended data structure for retrieving SQL data

    I have a flex project that reads data from a database and
    sends it to my flex app to display in a chart. I need to do this in
    Actionscript since I have to dynamically create different charts
    based on the database definitions. Up til now, I have inserted the
    data for each series into a separate
    ArrayList(java)/ArrayCollection(flex) in this way:
    BindingUtils.bindProperty(lineSeries, "dataProvider", series,
    "pointList");
    lineSeries.xField="point1";
    lineSeries.yField="point2";
    The series variable is a custom Actionscript/Java object
    which contains an ArrayCollection called pointList. And the array
    is made up of custom DataObjects with two fields, point1 &
    point2.
    But in the new paradigm, I'd basically like to create a big
    array of arrays similar to a database table and then just point the
    xField to one column, and the yField to another column. Anyway, it
    seems like the problem is that my point1 and point2 in the current
    implementation are variable names, but with this new dynamic
    structure, I won't be able to create variables on the fly. So how
    do I let flex know to look at column 3, for example for the yField?
    The attached code is from the Flex documentation and is an example
    of what I'd like to emulate (except I need to do it in
    actionscript). I'd like to be able to select "month" or "amount",
    etc. But coming from the Java side, there is no way for me to name
    the array contained in each column.

    I guess I wasn't clear enough. I am actually serializing a
    java object and mapping it to an actionscript object via blazeDS. I
    know about how the objects translate, for example for
    ArrayCollections in flex, I use ArrayLists in java. The problem is
    that I'm not sure how to get the associative aspects of the arrays
    in flex into my java data structures in a way that will translate
    to the way flex can define arrays, such as Month:"January".
    It seems that in flex, you can create an Array and assign it
    an element like {month:"January", amount:"450"} and it will create
    an Object with variables for month and amount. But I don't know how
    to do this on the fly in Java (or in Actionscript for that matter)
    when I have no way of knowing beforehand how many variables my
    object will need. Each series will need an x and y, though usually
    the x will be dates which are the same for each series. So if I had
    10 series sharing an axis, I'd need 11 variables in my object-
    date, series1, series 2...series 10.

Maybe you are looking for

  • JS CS3 flag duplicate images with scale and rotation differnce

    I've been trying to cut down on the number of images a script I have would produce.  The old script would look for links that are being used multiple times and then just version the link which is fine.  What I am finding this that although a document

  • File upload - issue with European .csv file format

    All, when uploading the .csv file for "Due List for Planned Receipts" in the File Transfer Upload center I receive an error.  It appears that it is due to the european .csv file format that is delimited by semicolon rather than comma. The only way I

  • Blackberry won't unmount

    When I plug my Blackberry 8310 (curve) into a USB socket on the back of my iMac, I can sync both the Mac and the Blackberry just fine using Mark/Space Missing Sync for Blackberry. However, I cannot unmount the Blackberry or eject it. The only way to

  • Date problem in a form

    Hi: I have a form (in jsp) where in I have a field for Date. The Date is entered in the form: 12/18/2002. I using beans to retrieve the form values and then pass to the program. THe date field is passed as String to the bean. The program changes the

  • Get the color of a pixel in an image

    how can i do to get the color of a pixel in an image ??? Can anyone help me ?