Search Results

Search found 4088 results on 164 pages for 'avl tree'.

Page 48/164 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • What's the term describing this system for generating user interfaces?

    - by mjfgates
    So, there's this idea, which you already know: Define the layout of your UI by creating a tree of panels. The leaf nodes on the tree are what we used to call 'controls' way back in the day-- the things that the user interacts with, radio buttons and listboxes and such. The internal nodes are mostly concerned with layout; this kind of panel stacks its child panels vertically, that kind puts its children into a grid, etc. It's COMMON. Most of the UI-generating systems I've seen in the past twenty years are implementations of this, and the ones that aren't borrow from it. What's the word for this idea?

    Read the article

  • Is it better to cut and store all sprites needed from a spritesheet in memory, or cut them out just-in-time?

    - by xLite
    I'm not sure what's best practice here as I have little experience with this. Essentially what I am asking is... if it's better to get your single PNG with all your different sprites on it for use in-game, cut out every sprite on startup and store them in memory, then access the already-cut-out sprite from memory quickly or Only have the single PNG with all the different sprites residing in memory, and when you need, for example, a tree. You cut out the tree from the PNG and then continue to use it as normal. I imagine the former is more CPU friendly than the latter but less memory friendly, vice versa for the latter. I want to know what the norm is for game dev. This is a pixel based game using 2D art. Each PNG is actually an avatar's sprite sheet with each body part separated and then later joined to form the full body of the avatar.

    Read the article

  • What has 'rm -r ~' done to my home directory?

    - by GUI Junkie
    gedit creates hidden backup files ending with '~'. I wanted to do a recursive cleanup of my directory tree. The command rm *~ will delete all local files ending with '~' I thought rm -r *~ . would delete all files in the whole tree, but I typo-ed rm -r ~. There was a message some directory could not be deleted and I quit the command. The question is: What have I been deleting? I did notice that my Filezilla configuration was gone. Does this command delete all hidden directories from the home dir?

    Read the article

  • Writing a spell checker similar to "did you mean"

    - by user888734
    I'm hoping to write a spellchecker for search queries in a web application - not unlike Google's "Did you mean?" The algorithm will be loosely based on this: http://catalog.ldc.upenn.edu/LDC2006T13 In short, it generates correction candidates and scores them on how often they appear (along with adjacent words in the search query) in an enormous dataset of known n-grams - Google Web 1T - which contains well over 1 billion 5-grams. I'm not using the Web 1T dataset, but building my n-gram sets from my own documents - about 200k docs, and I'm estimating tens or hundreds of millions of n-grams will be generated. This kind of process is pushing the limits of my understanding of basic computing performance - can I simply load my n-grams into memory in a hashtable or dictionary when the app starts? Is the only limiting factor the amount of memory on the machine? Or am I barking up the wrong tree? Perhaps putting all my n-grams in a graph database with some sort of tree query optimisation? Could that ever be fast enough?

    Read the article

  • Testing complex compositions

    - by phlipsy
    I have a rather large collection of classes which check and mutate a given data structure. They can be composed via the composition pattern into arbitrarily complex tree-like structures. The final product contains a lot of these composed structures. My question is now: How can I test those? Albeit it is easy to test every single unit of these compositions, it is rather expensive to test the whole compositions in the following sense: Testing the correct layout of the composition-tree results in a huge number of test cases Changes in the compositions result in a very laborious review of every single test case What is the general guideline here?

    Read the article

  • How do I improve my incremental-backup performance?

    - by Alistair Bell
    I'm currently using the traditional rsync+cp -al method to create incremental/snapshot backups of our server tree. The backups are going onto a pair of eight-disk towers connected to the backup machine (a Sandy Bridge machine with 16 GB of RAM, running CentOS 5.5) via four eSATA connections (four disks per connection). Each disk is a regular 2 TB disk, so we have 32 TB of disk space connected to the backup machine. We're backing up about 20 TB of data on the servers with this. The problem is that each daily backup is taking more than 24 hours, and the real time-killer isn't the actual rsync, but the time it takes to perform a cp -al of the tree locally on the backup machine. It's taking more than 12 hours just to make the shadow copy of the tree, and as far as I can tell the performance backlog is at the disk (top shows the cp using a lot of RAM but not a lot of CPU and mostly in uninterruptible-sleep state) We have the server data split into four major volumes (and a few minor ones), and each of these backups runs in parallel (with some offsets in the cron to try to get some disks' cp done first). There are two volumes on the backup drive, both striped LVM volumes of 16 TB each. So obviously I need to improve the performance because it's unusable as it stands. The first question is: when CentOS 6 comes out, with support for btrfs, will making snapshots of subvolumes with btrfs substantially increase this performance? The second is: is there a way, with ext3 or something else supported in CentOS 5 or 6, to 'encourage' it to put the directories/inodes in one part of a volume (which could happen to be the part that's on an SSD, via LVM) and the files in another? That would presumably solve the problem, but I don't know of ways to hint ext3 like that.

    Read the article

  • Setup of HP ProCurve 2810-24G for iSCSI?

    - by 3molo
    Hi, I have a pair of ProCurve 2810-24G that I will use with a Dell Equallogic SAN and Vmware ESXi. Since ESXi does MPIO, I am a little uncertain on the configuration for links between the switches. Is a trunk the right way to go between the switches? I know that the ports for the SAN and the ESXi hosts should be untagged, so does that mean that I want tagged VLAN on the trunk ports? This is more or less the configuration: trunk 1-4 Trk1 Trunk snmp-server community "public" Unrestricted vlan 1 name "DEFAULT_VLAN" untagged 24,Trk1 ip address 10.180.3.1 255.255.255.0 no untagged 5-23 exit vlan 801 name "Storage" untagged 5-23 tagged Trk1 jumbo exit no fault-finder broadcast-storm stack commander "sanstack" spanning-tree spanning-tree Trk1 priority 4 spanning-tree force-version RSTP-operation The Equallogic PS4000 SAN has two controllers, with two network interfaces each. Dell recommends each controller to be connected to each of the switches. From vmware documentation, it seems creating one vmkernel per pNIC is recommended. With MPIO, this could allow for more than 1 Gbps throughput.

    Read the article

  • Can't install xclip on Ubuntu 10.10

    - by wildster
    I'm trying to load an SSH key to Github from a new machine and this command is not working: sudo apt-get install xclip Reading package lists... Done Building dependency tree Reading state information... Done Package xclip 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 xclip has no installation candidate when I try: sudo aptitude install xclip Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done No candidate version found for xclip No candidate version found for xclip The following partially installed packages will be configured: synaptics-dkms 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. Writing extended state information... Done Setting up synaptics-dkms (1.1.1) ... Loading new synaptics-1.1.1 DKMS files... Error! Cannot locate /usr/src/synaptics-1.1.1.dkms.tar.gz. File does not exist. dpkg: error processing synaptics-dkms (--configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: synaptics-dkms E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up synaptics-dkms (1.1.1) ... Loading new synaptics-1.1.1 DKMS files... Error! Cannot locate /usr/src/synaptics-1.1.1.dkms.tar.gz. File does not exist. dpkg: error processing synaptics-dkms (--configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: synaptics-dkms Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Any idea how I can install this? Mucho thanks in advance

    Read the article

  • Can't install xclip on Ubuntu 10.10

    - by wildster
    I'm trying to load an SSH key to Github from a new machine and this command is not working: sudo apt-get install xclip Reading package lists... Done Building dependency tree Reading state information... Done Package xclip 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 xclip has no installation candidate when I try: sudo aptitude install xclip Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done No candidate version found for xclip No candidate version found for xclip The following partially installed packages will be configured: synaptics-dkms 0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. Writing extended state information... Done Setting up synaptics-dkms (1.1.1) ... Loading new synaptics-1.1.1 DKMS files... Error! Cannot locate /usr/src/synaptics-1.1.1.dkms.tar.gz. File does not exist. dpkg: error processing synaptics-dkms (--configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: synaptics-dkms E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up synaptics-dkms (1.1.1) ... Loading new synaptics-1.1.1 DKMS files... Error! Cannot locate /usr/src/synaptics-1.1.1.dkms.tar.gz. File does not exist. dpkg: error processing synaptics-dkms (--configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: synaptics-dkms Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Any idea how I can install this? Mucho thanks in advance

    Read the article

  • GitHub - commit local changes in local branch to remote branch

    - by user62046
    I use Git Shell in Windows 7, working in a branch named Save-Rotation. Then I used git push origin Save-Rotation to commit the changes to remote. The result is posted at the end. It seems good. But when I went to my repository in GitHub site, which is https://github.com/chiapas/sumatrapdf/tree/Save-Rotation I can't see any change in the repository tree or commit tree. How can I know if the commit (to remote) is successful, and why the repository page is not updated? Here is the result in command-line C:\Users\imo\Documents\GitHub\sumatrapdf [Save-Rotation]> git push origin Save-R otation Counting objects: 167, done. Delta compression using up to 8 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (119/119), 27.43 KiB, done. Total 119 (delta 101), reused 119 (delta 101) To https://github.com/chiapas/sumatrapdf * [new branch] Save-Rotation -> Save-Rotation C:\Users\imo\Documents\GitHub\sumatrapdf [Save-Rotation +2 ~17 -0 !]> git push o rigin Save-Rotation Everything up-to-date C:\Users\imo\Documents\GitHub\sumatrapdf [Save-Rotation +2 ~17 -0 !]>

    Read the article

  • Primefaces TreeView node expansion

    - by Boiler Bill
    Being new to primefaces, I have been researching a way to have TreeView in dynamic mode update a separate tab pane given the id on Node expansion. This works great for node selection with the "update" attribute. Can it work the same way on Node Expansion was well? Here is my code that works when a node is selected: <p:tree id="tree" dynamic="true" var="node" cache="true" update="details" value="#{treeBean.root}" rendered="#{treeBean.root != null}" styleClass="inventoryTree" nodeExpandListener="#{treeBean.onNodeExpand}" nodeSelectListener="#{treeBean.onNodeSelect}">

    Read the article

  • jsTree async with preloaded data.

    - by Paul Knopf
    I am trying to make a tree view be async. When the page is rendered, there is default tree items displayed. jsTree tries to reload the root anyway. I want the page to render (with jsTree init'ed) with default items rendered from browser, not the ajax call. Then we the user tries to go deeper, thats when I want to do do the ajax calls. Any help is appreciated. Thanks!

    Read the article

  • Dynatree toDict()

    - by gnomixa
    In the http://wwwendt.de/tech/dynatree/index.html it says toDict() Convert the tree into a JavaScript object. See node.toDict() for details. Is there a way to initialize the tree from that object later? Thanks.

    Read the article

  • Escape key event problem in wxPython?

    - by MA1
    Hi All The following key event is not working. Any idea? class Frame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, title='testing', size=(300,380), style= wx.MINIMIZE_BOX|wx.SYSTEM_MENU |wx.CAPTION|wx.CLOSE_BOX|wx.CLIP_CHILDREN) self.tree = HyperTreeList(self, style = wx.TR_DEFAULT_STYLE | wx.TR_FULL_ROW_HIGHLIGHT | wx.TR_HAS_VARIABLE_ROW_HEIGHT | wx.TR_HIDE_ROOT) # create column self.tree.AddColumn("coll") self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) def OnKeyDown(self, event): keycode = event.GetKeyCode() print "keycode ", keycode if keycode == wx.WXK_ESCAPE: print "closing" self.Close() Regards,

    Read the article

  • What do the FireBug DOM colors mean?

    - by André Pena
    I'm confused with these colors. I noticed there are 4 colors showing in the left hand column of FireBug DOM tree: Bold black Black Bold green Green In the right hand column: Blue Red Bold green Green Multiple color elements representing object structures. What do this colors represent? And why, e.g, I can access window.document.URL and I can't access window.document.body in Console even though they are both in the "not-bold black" category in the DOM tree? Thanks a lot

    Read the article

  • How to get the clicked element in a dynamically built JQuery Treeview?

    - by Alexander
    I have a product database with several product categories. Each category has a number of sub-categories, which has sub-sub-categories, which has... Well, quite some levels deep. The tree is too huge to load at once, so I need to built it dynamically as users select specific product categories. Here's a snapshot of the product tree. Initially, only the first level is loaded. The second level (Cat. 1.1 and cat. 1.2) is added when the user clicks on cat. 1: <ul id="navigation"> <li id="625212">Product cat. 1 <ul> <li id="625213">Product cat. 1.1 <ul></ul> </li> <li id="625109">Product cat. 1.2 <ul></ul> </li> </ul> </li> <li id="624990">Product cat. 2 <ul></ul> </li> </ul> I intend to extend the tree as users click on specific product categories. I can get the list of sub-categories from a URL that takes the parent product category ID as input and outputs HTML in the format needed by treeview. I cannot use PHP and have to make this work with the .click() event. Here's the code that I have: $(document).ready(function(){ function doSomethingWithData(htmldata, id) { var branches = $(htmldata).appendTo("#navigation #"+id+" ul"); $("#navigation").treeview({ add: branches }); } $("#navigation").treeview({ collapsed: true, unique: true, persist: "location" }); $("#navigation li[id]").click(function() { var id=$(this).attr("id"); if ($("#"+$(this).attr("id")+" ul li").size()==0) { $.get('someurl?id='+$(this).attr("id"), function(data) { doSomethingWithData(data, id); } ) } }); }); The problem I'm having is with the click-event. When clicking on cat 1.1. to extend it one level deeper, it still returns the ID of the top level product category. How can I change the click events so that it will return the ID of the clicked <LI> instead of the top one? If the product category does not have any sub-categories, how can I remove the <UL></UL> and thus inidcating that the tree cannot be expanded any further?

    Read the article

  • Absolute reRendering using RichFaces

    - by wheelie
    Hey there, I am implementing copy/paste functionality for a complex object tree, this means you can copy an object and paste it where the object type is the same. Therefore I need to reRender the <a4j:commandLink>-s which are performing the paste action (so it will show on the GUI or not). Simplified example: Problem is that copy links are deep in the tree. How is it possible to reRender on a higher level in the component tree? (very)Simplified example: ... <h:form id="form1"> ... <a4j:commandLink value="Copy" reRender=":paste1, :paste2, :paste3" /> <a4j:commandLink id="paste1" value="Paste" rendered="#{myBean.myHashMap.key}" /> <a4j:outputPanel> <a4j:region renderRegionOnly="true"> <a4j:commandLink value="Copy" reRender=":paste1, :paste2, :paste3" /> <a4j:commandLink id="paste2" value="Paste" rendered="#{myBean.myHashMap.key}" /> </a4j:region> <a4j:outputPanel> <a4j:region renderRegionOnly="true"> <a4j:commandLink value="Copy" reRender=":paste1, :paste2, :paste3" /> <a4j:commandLink id="paste3" value="Paste" rendered="#{myBean.myHashMap.key}" /> </a4j:region> </a4j:outputPanel> </a4j:outputPanel> ... </h:form> Something like that. In practise this differs in that a rich:tree is displayed. Also, there can be multiple instances of the same paste link: object:0::paste3, object:1::paste3. private final String pasteIDs = ":xxPaste, ... , :xyPaste"; According to the RichFaces reference, putting the separator to the beginning of the ID means it is an "absolute" search expression, however this way i get the same result: only the 'local' paste link gets rerendered, the others not. Every copy-paste link pair is encapsulated in <a4j:region renderRegionOnly="true">, because it is necessary for other components to restrict the reRender to that region. Could this be blocking the reRender I want to make? Also I want to rerender exactly those paste links, so no other rerender action is triggered. Hope it is clear what i want to achieve. Any help would be appreciated! Daniel

    Read the article

  • how to find maximum frequent item sets from large transactional data file

    - by ANIL MANE
    Hi, I have the input file contains large amount of transactions like Transaction ID Items T1 Bread, milk, coffee, juice T2 Juice, milk, coffee T3 Bread, juice T4 Coffee, milk T5 Bread, Milk T6 Coffee, Bread T7 Coffee, Bread, Juice T8 Bread, Milk, Juice T9 Milk, Bread, Coffee, T10 Bread T11 Milk T12 Milk, Coffee, Bread, Juice i want the occurrence of every unique item like Item Name Count Bread 9 Milk 8 Coffee 7 Juice 6 and from that i want an a fp-tree now by traversing this tree i want the maximal frequent itemsets as follows The basic idea of method is to dispose nodes in each “layer” from bottom to up. The concept of “layer” is different to the common concept of layer in a tree. Nodes in a “layer” mean the nodes correspond to the same item and be in a linked list from the “Head Table”. For nodes in a “layer” NBN method will be used to dispose the nodes from left to right along the linked list. To use NBN method, two extra fields will be added to each node in the ordered FP-Tree. The field tag of node N stores the information of whether N is maximal frequent itemset, and the field count’ stores the support count information in the nodes at left. In Figure, the first node to be disposed is “juice: 2”. If the min_sup is equal to or less than 2 then “bread, milk, coffee, juice” is a maximal frequent itemset. Firstly output juice:2 and set the field tag of “coffee:3” as “false” (the field tag of each node is “true” initially ). Next check whether the right four itemsets juice:1 be the subset of juice:2. If the itemset one node “juice:1” corresponding to is the subset of juice:2 set the field tag of the node “false”. In the following process when the field tag of the disposed node is FALSE we can omit the node after the same tagging. If the min_sup is more than 2 then check whether the right four juice:1 is the subset of juice:2. If the itemset one node “juice:1” corresponding to is the subset of juice:2 then set the field count’ of the node with the sum of the former count’ and 2 After all the nodes “juice” disposed ,begin to dispose the node “coffee:3”. Any suggestions or available source code, welcome. thanks in advance

    Read the article

  • Scriptaculous Drag: How do I offset the dragging element?

    - by Angus Croll
    This is an age old problem - but now I'm using scriptaculous its come back to haunt me. When dragging a tree node over other tree nodes I want mouseover to fire for each node. So I want to position the dragging thing so that its top-left is slightly offset from the mousepointer I could reposition constantly in the onDrag handler but this is jerky and slow can anyone help? - thanks

    Read the article

  • Can't parse XML effectively using Python

    - by Harshit Sharma
    import urllib import xml.etree.ElementTree as ET def getWeather(city): #create google weather api url url = "http://www.google.com/ig/api?weather=" + urllib.quote(city) try: # open google weather api url f = urllib.urlopen(url) except: # if there was an error opening the url, return return "Error opening url" # read contents to a string s = f.read() tree=ET.parse(s) current= tree.find("current_condition/condition") condition_data = current.get("data") weather = condition_data if weather == "<?xml version=": return "Invalid city" #return the weather condition #return weather def main(): while True: city = raw_input("Give me a city: ") weather = getWeather(city) print(weather) if __name__ == "__main__": main() gives error , I actually wanted to find values from google weather xml site tags

    Read the article

  • Bash script to replace spaces in file names

    - by armandino
    Can anyone recommend a safe solution to recursively replace spaces with underscores in file and directory names starting from a given root directory? For example, $ tree . |-- a dir | `-- file with spaces.txt `-- b dir |-- another file with spaces.txt `-- yet another file with spaces.pdf becomes $ tree . |-- a_dir | `-- file_with_spaces.txt `-- b_dir |-- another_file_with_spaces.txt `-- yet_another_file_with_spaces.pdf

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >