Search Results

Search found 4775 results on 191 pages for 'databound lists'.

Page 32/191 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Ubuntu Extras keyring error

    - by Pawan Neupane
    Recently I got lots of GPG errors and tried the following methods at various stages: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3E5C1192 sudo apt-get install -reinstall ubuntu-extras-keyring (For Ubuntu Extras only) gpg –keyserver keyserver.ubuntu.com –recv 3E5C1192 gpg –export –armor 3E5C1192 | sudo apt-key add - sudo apt-get update sudo aptitude -o Acquire::http::No-Cache=True -o Acquire::BrokenProxy=true update sudo -i apt-get clean cd /var/lib/apt mv lists lists.old mkdir -p lists/partial apt-get clean apt-get update I again got BADSIG error for extras.ubuntu.com today. So, I'm really at a loss what's causing this error to occur time and again. I really want to solve this problem once and for all.

    Read the article

  • I cannot update my version 12-04. After installation of 12.04 I get only error reports when I try to update

    - by cees groenewoud
    received report: from Google translate : Could not initialize the package information There was an insoluble problem occurred while initializing the package information. Please this error in the package "update-manager" to report and add the following message to: 'E: Encountered a section with no Package: header E: Problem with Merge List / var/lib/apt/lists/nl.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en, E: The package lists or status file could not decompose or not be opened. " Kon de pakketinformatie niet initialiseren Er heeft zich een onoplosbaar probleem voorgedaan bij het initialiseren van de pakketinformatie. Gelieve deze fout in het pakket ‘update-manager’ te rapporteren en voeg de volgende foutmelding toe: 'E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/nl.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en, E:De pakketlijsten of het statusbestand konden of niet ontleed, of niet geopend worden.'

    Read the article

  • Which data structure you will use to for a witness list?

    - by mateen
    I'm making a game where the plot is a bank robbery. Lots of people witness that robbery. The game will load a list of suspects, while the players (witnesses) will have to identify the suspects of this robbery. The game should load a list of suspects to identify the one as quickly as possible. Admin can add/remove suspects in the lists and two or more lists of suspects can also be merged into one (to show it to the player). The question is which data structure will be suitable to develop the lists?

    Read the article

  • Dynamic MMap ran out of room when trying to sudo apt-get anything

    - by user1610406
    I was having an error in Update Manager that asks me to do a partial upgrade and it fails. Now I can't sudo apt-get install anything. I tried to fix it, and now I can't sudo apt-get anything. Every time, I get this output: Reading package lists... Error! E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf) E: Error occurred while processing libuptimed0 (NewVersion1) E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_lucid_universe_binary-i386_Packages W: Unable to munmap E: The package lists or status file could not be parsed or opened. I have no idea why this is happening or how to fix it, and I fear that if I try something that probably doesn't work that it will make my problem worse. (Just for reference I am currently running 10.04 (Lucid) on my machine.)

    Read the article

  • cowbuilder --create --distribution lucid fails

    - by Daenyth
    I'm trying to create a build environment for Lucid, and calling cowbuilder --create --distribution lucid fails with the messages below: Get:1 http://us-east-1.ec2.archive.ubuntu.com lucid Release.gpg [189B] Hit http://us-east-1.ec2.archive.ubuntu.com lucid Release Hit http://us-east-1.ec2.archive.ubuntu.com lucid/main Packages Fetched 189B in 0s (2376B/s) Reading package lists... I: Obtaining the cached apt archive contents Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Reading package lists... Building dependency tree... apt is already the newest version. Package cowdancer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package cowdancer has no installation candidate I: unmounting dev/pts filesystem I: unmounting proc filesystem pbuilder create failed forking: rm -rf /opt/cowbuilder

    Read the article

  • Managing multiple references of the same game entity in different places using IDs

    - by vargonian
    I've seen great questions on similar topics, but none that addressed this particular method: Given that I have multiple collections of game entities in my [XNA Game Studio] game, with many entities belonging to multiple lists, I'm considering ways I could keep track of whenever an entity is destroyed and remove it from the lists it belongs to. A lot of potential methods seem sloppy/convoluted, but I'm reminded of a way I've seen before in which, instead of having multiple collections of game entities, you have collections of game entity IDs instead. These IDs map to game entities via a central "database" (perhaps just a hash table). So, whenever any bit of code wants to access a game entity's members, it first checks to see if it's even in the database still. If not, it can react accordingly. Is this a sound approach? It seems that it would eliminate many of the risks/hassles of storing multiple lists, with the tradeoff being the cost of the lookup every time you want to access an object.

    Read the article

  • Why does my Ubuntu Software Center not work? [closed]

    - by Alex Mundy
    Possible Duplicate: How do I fix a “Problem with MergeList” error when trying to do an update? I've been having trouble with my Software Center. Whenever I try to open it, or even do an apt-get in the terminal I get this message: Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages E: The package lists or status file could not be parsed or opened. How do I fix it? Note: I'm new to Ubuntu. I need simple instructions for the moment.

    Read the article

  • How to fix "Could not open lock file" because "Permission denied"?

    - by user66498
    Whenever trying to install any software and update manger, I get an error stating Package operation failed The installation or removal of a software package failed When I run sudo apt-get update I got this result: conan51xd@conan51xd-Lenovo-B470:~$ sudo apt-get -f install [sudo] password for conan51xd: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. conan51xd@conan51xd-Lenovo-B470:~$ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

    Read the article

  • How to remove corrupted repositories ?

    - by istimsak abdulbasir
    I was in the process of updating 11.04 and came across and error message saying: Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_natty-security_main_i18n_Translation-en E: The package lists or status file could not be parsed or opened. I tried to remove the damage repository by going to ubuntu software center. There was no option of repository removal. Then I tried synaptic, however I got the same error message stated above. I cannot find software source in 11.04. How do I remove repository from the commandline since that seems to be my only option?

    Read the article

  • Split List into Sublists with LINQ

    - by Felipe Lima
    Hi all, I believe this is another easy one for you LINQ masters out there. Is there any way I can separe a List into several separate lists of SomeObject, using the item index as the delimiter of each split? Let me exemplify: I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially). eg.: Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c] I'd also need the resulting lists size to be a parameter of this function. Is it possible?? Thanks!

    Read the article

  • Primefaces datatable in-cell edit to update other rows in the same datatable with ajax rowEdit event processing

    - by Java Thu
    I have issue to update other rows in the same datatable when one row updated using primeface datatable in-cell edit ajax rowEdit. But failed to update other row with ajax call. The ajax response only return the same row data which was updated. The codes are as following: <h:form id="testForm"> <p:dataTable id="testDT" var="d" rowIndexVar="rowIndex" value="#{testBean.lists}" editable="true"> <p:column> <f:facet name="header">No</f:facet> <h:outputText value="#{rowIndex}" /> </p:column> <p:column headerText="Value"> <p:cellEditor> <f:facet name="output"> <h:outputText value="#{d.value}" /> </f:facet> <f:facet name="input"> <p:inputText value="#{d.value}" size="5" /> </f:facet> </p:cellEditor> </p:column> <p:column headerText="Edit" style="width:50px"> <p:outputPanel rendered="#{d.editable}"> <p:rowEditor> </p:rowEditor> </p:outputPanel> </p:column> <p:ajax event="rowEdit" update=":testForm:testDT" listener="#{testBean.onRowUpdate}" /> </p:dataTable> </h:form> My TestBean: package web.bean.test; import java.util.ArrayList; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import org.primefaces.event.RowEditEvent; @ManagedBean(name="testBean") @ViewScoped public class TestBean { private List<TestData> lists = new ArrayList<>(); @PostConstruct protected void init() { TestData d = new TestData("Row1Data", 1d, true); lists.add(d); d = new TestData("Row1Data", 11.11d, false); lists.add(d); } public void onRowUpdate(RowEditEvent event) { Object o = event.getObject(); if (o != null) { TestData d = (TestData)o; TestData d1 = lists.get(1); d1.setValue(d1.getValue() + d.getValue()); } } public List<TestData> getLists() { return lists; } public void setLists(List<TestData> lists) { this.lists = lists; } } package web.bean.test; public class TestData { private String name; private double value; private boolean editable; public TestData(String name, double value, boolean editable) { super(); this.name = name; this.value = value; this.editable = editable; } public TestData() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public double getValue() { return value; } public void setValue(double value) { this.value = value; } public boolean isEditable() { return editable; } public void setEditable(boolean editable) { this.editable = editable; } } The ajax response body: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/Octopus-G/javax.faces.resource/theme.css.xhtml?ln=primefaces-bluesky" /><link type="text/css" rel="stylesheet" href="/Octopus-G/javax.faces.resource/primefaces.css.xhtml?ln=primefaces&amp;v=3.2" /><script type="text/javascript" src="/Octopus-G/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces&amp;v=3.2"></script><script type="text/javascript" src="/Octopus-G/javax.faces.resource/primefaces.js.xhtml?ln=primefaces&amp;v=3.2"></script></head><body> <form id="testForm" name="testForm" method="post" action="/Octopus-G/test.xhtml" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="testForm" value="testForm" /> <div id="testForm:testDT" class="ui-datatable ui-widget"><table role="grid"><thead><tr role="row"><th id="testForm:testDT:j_idt5" class="ui-state-default" role="columnheader"><div class="ui-dt-c"><span>No</span></div></th><th id="testForm:testDT:j_idt8" class="ui-state-default" role="columnheader"><div class="ui-dt-c"><span>Value</span></div></th><th id="testForm:testDT:j_idt12" class="ui-state-default" role="columnheader" style="width:50px"><div class="ui-dt-c"><span>Edit</span></div></th></tr></thead><tfoot></tfoot><tbody id="testForm:testDT_data" class="ui-datatable-data ui-widget-content"><tr data-ri="0" class="ui-widget-content ui-datatable-even" role="row"><td role="gridcell"><div class="ui-dt-c">0</div></td><td role="gridcell" class="ui-editable-column"><div class="ui-dt-c"><span id="testForm:testDT:0:j_idt9" class="ui-cell-editor"><span class="ui-cell-editor-output">1.0</span><span class="ui-cell-editor-input"><input id="testForm:testDT:0:j_idt11" name="testForm:testDT:0:j_idt11" type="text" value="1.0" size="5" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" /><script id="testForm:testDT:0:j_idt11_s" type="text/javascript">PrimeFaces.cw('InputText','widget_testForm_testDT_0_j_idt11',{id:'testForm:testDT:0:j_idt11'});</script></span></span></div></td><td role="gridcell" style="width:50px"><div class="ui-dt-c"><span id="testForm:testDT:0:j_idt13"><span id="testForm:testDT:0:j_idt14" class="ui-row-editor"><span class="ui-icon ui-icon-pencil"></span><span class="ui-icon ui-icon-check" style="display:none"></span><span class="ui-icon ui-icon-close" style="display:none"></span></span></span></div></td></tr><tr data-ri="1" class="ui-widget-content ui-datatable-odd" role="row"><td role="gridcell"><div class="ui-dt-c">1</div></td><td role="gridcell" class="ui-editable-column"><div class="ui-dt-c"><span id="testForm:testDT:1:j_idt9" class="ui-cell-editor"><span class="ui-cell-editor-output">11.11</span><span class="ui-cell-editor-input"><input id="testForm:testDT:1:j_idt11" name="testForm:testDT:1:j_idt11" type="text" value="11.11" size="5" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all" /><script id="testForm:testDT:1:j_idt11_s" type="text/javascript">PrimeFaces.cw('InputText','widget_testForm_testDT_1_j_idt11',{id:'testForm:testDT:1:j_idt11'});</script></span></span></div></td><td role="gridcell" style="width:50px"><div class="ui-dt-c"></div></td></tr></tbody></table></div><script id="testForm:testDT_s" type="text/javascript">$(function() {PrimeFaces.cw('DataTable','widget_testForm_testDT',{id:'testForm:testDT',editable:true,behaviors:{rowEdit:function(event) {PrimeFaces.ab({source:'testForm:testDT',process:'testForm:testDT',update:'testForm:testDT',event:'rowEdit'}, arguments[1]);}}});});</script><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-8223787210091934199:-360328890338571623" autocomplete="off" /> </form></body> </html>

    Read the article

  • Why does Sharepoint 2010 Web Reference work, but Service Reference does not

    - by Darien Ford
    Sharepoint is setup to use NTLM authentication. When I reference http://myserver/Sites/Ops/_vti_bin/Lists.asmx?WSDL as a Web Reference, I can call the methods and get valid responses. When I reference the same url as a Service Reference, the server throws an exception when calling methods. My account is admin on the Sharepoint Farm. This is the app.config for the service reference (mostly auto generated): <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> </configSections> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="ListsSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Ntlm" /> </security> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://myserver/Sites/Ops/_vti_bin/Lists.asmx" binding="basicHttpBinding" bindingConfiguration="ListsSoap" contract="SharepointLists.ListsSoap" name="ListsSoap" /> </client> </system.serviceModel> </configuration> Saddly, the only information the exception provides is this: "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown." No other details. The code that I'm using is: public ListClass() { _Client = new SharepointLists.ListsSoapClient(); } public System.Xml.Linq.XElement GetTaskList() { return _Client.GetList("Tasks"); } Any thoughts? I would like to use the Service Reference rather than the Web Reference. UPDATE: I tried Rob's suggestion and got this error: HTTP GET Error URI: http://myserver/Sites/Ops/_vti_bin/Lists.asmx The document at the url http://myserver/Sites/Ops/_vti_bin/Lists.asmx was not recognized as a known document type. The error message from each known type may help you fix the problem: - Report from 'http://myserver/Sites/Ops/_vti_bin/Lists.asmx' is 'The document format is not recognized (the content type is 'text/html; charset=utf-8').'. - Report from 'DISCO Document' is 'There was an error downloading 'http://myserver/_vti_bin/Lists.asmx?disco'.'. - The request failed with HTTP status 404: Not Found. - Report from 'WSDL Document' is 'The document format is not recognized (the con tent type is 'text/html; charset=utf-8').'. - Report from 'XML Schema' is 'The document format is not recognized (the conten t type is 'text/html; charset=utf-8').'.

    Read the article

  • Accessing hidden SharePoint list

    - by BeraCim
    Hi all: Currently I have a few lists in my SharePoint site that has been hidden from the user (via the hidden property which was set programmatically). I was wondering whether there are any special urls/web or ways to access those lists? e.g. {site}/lists/hiddenList or something similar? Thanks.

    Read the article

  • Pseudocode help

    - by vatsag
    Hello All I've been banging my head over few hours for realising this particular logic My task is to have a masterlist ListM elements of which shall be list(again) in the form of ListA(type A) and ListB(type B) and ListC(type C)(some generic type). Also the lists A and ListB can contain elements of type C(some generic type). Coming to the preconditions 1. ListA can contain only 50 elements of type 'A', rest of the elements can be of generic type C 2. ListB can contain only 50 elements of type 'B', rest of the elements can be of generic type C 3. Also the lists(ListA or ListB) can take at max of 100 elements. 4. ListC can contain elements of generic type C and can take max of 100 elements For ex: Now, If i have 200 elements of type A and 200 elements of type B and 600 elements of type C then i should be able to get 4 Lists(50 elements in each list) of type...ListA (because each ListA can contain at max of 50 elements of type A only, rem 50 is typeC) 4 Lists(50 elements in each list) of type...ListB (because each ListA can contain at max of 50 elements of type B only, rem 50 is typeC) 2 Lists(50 elements in each list) of type...ListC i shall be glad to explain it again if my explanation is quite confusing. Can anyone suggest a better way for implementing such a requirement in the form of a pseudocode ? Thanks in advance VATSAG

    Read the article

  • Problem with JSONResult

    - by vikitor
    Hi, I' still newby to this so I'll try to explain what I'm doing. Basically what I want is to load a dropdownlist depending on the value of a previous one, and I want it to load the data and appear when the other one is changed. This is the code I've written in my controller: public ActionResult GetClassesSearch(bool ajax, string phylumID, string kingdom){ IList<TaxClass> lists = null; int _phylumID = int.Parse(phylumID); int _kingdom = int.Parse(kingdom); lists = _taxon.getClassByPhylumSearch(_phylumID, _kingdom); return Json(lists.count); } and this is how I call the method from the javascript function: function loadClasses(_phylum) { var phylum = _phylum.value; $.getJSON("/Suspension/GetClassesSearch/", { ajax: true, phylumID: phylum, kingdom: kingdom }, function(data) { alert(data); alert('no fallo') document.getElementById("pClass").style.display = "block"; document.getElementById("sClass").options[0] = new Option("-select-", "0", true, true); //for (i = 0; i < data.length; i++) { // $('#sClass').addOption(data[i].classID, data[i].className); //} }); } The thing is that just like this it works, I pass the function the number of classes within a selected phylum, and it displays the pclass element, the problem gets when I try to populate the slist with data (which should contain the objects retrieved from the database), because when there is data returned by the database changing return Json(lists) instead of return Json(lists.count) I keep getting the same error: A circular reference was detected while serializing an object of type 'SubSonic.Schema.DatabaseColumn'. I've been going round and round debugging and making tests but I can't make it work, and it is suppossed to be a simple thing, but I'm missing something. I have commented the for loop because I'm not quite sure if that's the way you access the data, because I've not been able to make it work when it finds records. Can anyone help me? Thanks in advance, Victor

    Read the article

  • How to "interleave" two DataTables.

    - by Brent
    Take these two lists: List 1 Red Green Blue List 2 Brown Red Blue Purple Orange I'm looking for a way to combine these lists together to produce: List 3 Brown Red Green Blue Purple Orange I think the basic rules are these: 1) Insert on top the list any row falling before the first common row (e.g., Brown comes before the first common row, Red); 2) Insert items between rows if both lists have two items (e.g., List 1 inserts Green between Red and Blue); and 3) Insert rows on the bottom if the there's no "between-ness" found in 2 (e.g., List 2 inserts Orange at the bottom). The lists are stored in a DataTable. I'm guessing I'll have to switch between them while iterating, but I'm having a hard time figuring out a method of combining the rows. Thanks for any help. --Brent

    Read the article

  • java memory management

    - by pavlos
    i have the following code snapshot: public void getResults( String expression, String collection ){ ReferenceList list; Vector lists = new Vector(); list = invertedIndex.get( 1 )//invertedIndex is class member lists.add(list); } when the method is finished, i supose that the local objects ( list, lists) are "destroyed". Can you tell if the memory occupied by list stored in invertedIndex is released as well? Or does java allocate new memory for list when assigning list = invertedIndex.get( 1 );

    Read the article

  • SharePoint's CAML query the "Created By" field with username

    - by yellowblood
    Hey, I have a form for administrators where they insert a user name ("domain\name") and the code gets and sets some information out of it. It's a huge project and some of the lists contain the username as a string ("domain\name"), but some lists only count on the "Created By" column, which is auto-created. I want to know what's the fastest way to query these lists using the username string. I tried to use the same query as the one I use for the first kind of lists and it obviously didn't work - <Where><Eq><FieldRef Name='UserName'/><Value Type='Text'>domain\\username</Value></Eq></Where> Thank you.

    Read the article

  • MOSS 2007 - list permission

    - by nav
    Hi All, I have configured my list so that users can only read and edit items they have created. I now need to configure this list so that a particular group of users can edit and read all items on this list. I know users with the 'Manage Lists' permission would be able to do this. My question is can this be configured to be even more granular to apply a permission that works like the 'Manage Lists' permission but only for a particular list, rather than all lists? Many Thanks, Nav

    Read the article

  • C# bindinglist made of bindinglists

    - by Toto
    Hi, Is there a simple way to have a bindinglist composed of serveral bindinglists ? ie that is the "view" of the lists. That is to say : I have 3 lists (list1,list2,list3). I want a list that is alway the union of the 3 listx (we can suppose that no object is contained in 2 different lists). Certainly, I can succeed in using the ListChange property but maybe there is a smarter way to do this ? Thx

    Read the article

  • C# Constructor & List Question

    - by ShonnaE
    Ohk, I am doing a c-sharp program, and I get everything but this, I just can't understand what it is asking. I know how to create a list.. and how to create a constructor.. but this is where i get confused.. its probably way simple but i am missing it. I created 2 lists .. now i should create a constructor here is one my lists List<Person> organize = new List<Person>(); THIS PART --- *The constructor should also initialize the two event lists to new empty lists. *

    Read the article

  • Multi-threaded Pooled Allocators

    - by Darren Engwirda
    I'm having some issues using pooled memory allocators for std::list objects in a multi-threaded application. The part of the code I'm concerned with runs each thread function in isolation (i.e. there is no communication or synchronization between threads) and therefore I'd like to setup separate memory pools for each thread, where each pool is not thread-safe (and hence fast). I've tried using a shared thread-safe singleton memory pool and found the performance to be poor, as expected. This is a heavily simplified version of the type of thing I'm trying to do. A lot has been included in a pseudo-code kind of way, sorry if it's confusing. /* The thread functor - one instance of MAKE_QUADTREE created for each thread */ class make_quadtree { private: /* A non-thread-safe memory pool for int linked list items, let's say that it's * something along the lines of BOOST::OBJECT_POOL */ pooled_allocator<int> item_pool; /* The problem! - a local class that would be constructed within each std::list as the * allocator but really just delegates to ITEM_POOL */ class local_alloc { public : //!! I understand that I can't access ITEM_POOL from within a nested class like //!! this, that's really my question - can I get something along these lines to //!! work?? pointer allocate (size_t n) { return ( item_pool.allocate(n) ); } }; public : make_quadtree (): item_pool() // only construct 1 instance of ITEM_POOL per // MAKE_QUADTREE object { /* The kind of data structures - vectors of linked lists * The idea is that all of the linked lists should share a local pooled allocator */ std::vector<std::list<int, local_alloc>> lists; /* The actual operations - too complicated to show, but in general: * * - The vector LISTS is grown as a quadtree is built, it's size is the number of * quadtree "boxes" * * - Each element of LISTS (each linked list) represents the ID's of items * contained within each quadtree box (say they're xy points), as the quadtree * is grown a lot of ID pop/push-ing between lists occurs, hence the memory pool * is important for performance */ } }; So really my problem is that I'd like to have one memory pool instance per thread functor instance, but within each thread functor share the pool between multiple std::list objects.

    Read the article

  • Erlang : flattening a list of strings

    - by ErJab
    I have a list like this: [["str1","str2"],["str3","str4"],["str5","str6"]] And I need to convert it to ["str1", "str2", "str3", "str4", "str5", "str6"] How do I do this? The problem is that I'm dealing with lists of strings, so when I do lists:flatten([["str1","str2"],["str3","str4"],["str5","str6"]]) I get "str1str2str3str4str5str6" However, if the elements of the original list where just atoms, then lists:flatten would have given me what I needed. How do I achieve the same with strings?

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >