Search Results

Search found 6103 results on 245 pages for 'logical tree'.

Page 10/245 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Get Your Logical Fallacies Straight with this Rhetological Fallacies Chart

    - by Jason Fitzpatrick
    Have trouble telling your Ad Hocs from your Ad Hominems? Fear not, this extensive and easy to read logical fallacy chart makes it easy to tell when someone is begging the question or suffering from a confirmation bias. Rhetological Fallacies Chart [via Neatorama] How to Own Your Own Website (Even If You Can’t Build One) Pt 2 How to Own Your Own Website (Even If You Can’t Build One) Pt 1 What’s the Difference Between Sleep and Hibernate in Windows?

    Read the article

  • Generate syntax tree for simple math operations

    - by M28
    I am trying to generate a syntax tree, for a given string with simple math operators (+, -, *, /, and parenthesis). Given the string "1 + 2 * 3": It should return an array like this: ["+", [1, ["*", [2,3] ] ] ] I made a function to transform "1 + 2 * 3" in [1,"+",2,"*",3]. The problem is: I have no idea to give priority to certain operations. My code is: function isNumber(ch){ switch (ch) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '.': return true; break; default: return false; break; } } function generateSyntaxTree(text){ if (typeof text != 'string') return []; var code = text.replace(new RegExp("[ \t\r\n\v\f]", "gm"), ""); var codeArray = []; var syntaxTree = []; // Put it in its on scope (function(){ var lastPos = 0; var wasNum = false; for (var i = 0; i < code.length; i++) { var cChar = code[i]; if (isNumber(cChar)) { if (!wasNum) { if (i != 0) { codeArray.push(code.slice(lastPos, i)); } lastPos = i; wasNum = true; } } else { if (wasNum) { var n = Number(code.slice(lastPos, i)); if (isNaN(n)) { throw new Error("Invalid Number"); return []; } else { codeArray.push(n); } wasNum = false; lastPos = i; } } } if (wasNum) { var n = Number(code.slice(lastPos, code.length)); if (isNaN(n)) { throw new Error("Invalid Number"); return []; } else { codeArray.push(n); } } })(); // At this moment, codeArray = [1,"+",2,"*",3] return syntaxTree; } alert('Returned: ' + generateSyntaxTree("1 + 2 * 3"));

    Read the article

  • How can a B-tree node be represented?

    - by chronodekar
    We're learning B-trees in class and have been asked to implement them in code. The teacher has left choice of programming language to us and I want to try and do it in C#. My problem is that the following structure is illegal in C#, unsafe struct BtreeNode { int key_num; // The number of keys in a node int[] key; // Array of keys bool leaf; // Is it a leaf node or not? BtreeNode*[] c; // Pointers to next nodes } Specifically, one is not allowed to create a pointer to point to the structure itself. Is there some work-around or alternate approach I could use? I'm fairly certain that there MUST be a way to do this within the managed code, but I can't figure it out. EDIT: Eric's answer pointed me in the right direction. Here's what I ended up using, class BtreeNode { public List<BtreeNode> children; // The child nodes public static int MinDeg; // The Minimum Degree of the tree public bool IsLeaf { get; set; } // Is the current node a leaf or not? public List<int> key; // The list of keys ... }

    Read the article

  • OutOfMemoryError creating a tree recursively?

    - by Alexander Khaos Greenstein
    root = new TreeNode(N); constructTree(N, root); private void constructTree(int N, TreeNode node) { if (N > 0) { node.setLeft(new TreeNode(N-1)); constructTree(N-1, node.getLeft()); } if (N > 1) { node.setMiddle(new TreeNode(N-2)); constructTree(N-2, node.getMiddle()); } if (N > 2) { node.setRight(new TreeNode(N-3)); constructTree(N-3, node.getRight()); } Assume N is the root number, and the three will create a left middle right node of N-1, N-2, N-3. EX: 5 / | \ 4 3 2 /|\ 3 2 1 etc. My GameNode class has the following variables: private int number; private GameNode left, middle, right; Whenever I construct a tree with an integer greater than 28, I get a OutOfMemoryError. Is my recursive method just incredibly inefficient or is this natural? Thanks!

    Read the article

  • How to reload Ext.tree.TreePanel on demand?

    - by Sergei Stolyarov
    I want to create Ext.tree.TreePanel component and periodically load content from the external URl. So I've written something like new Ext.tree.TreePanel({ root: { nodeType: 'async', text: 'asdasd', draggable: false, id: 'folders-tree-root' }, loader: new Ext.tree.TreeLoader() }); And now I want to reload this tree, so I write: tree.loader.dataUrl = 'folders-sample.json'; tree.root.reload(); And nothing happens. add: The only way I've found is set some invalid value to dataUrl param on TreeLoader creation: new Ext.tree.TreePanel({ root: { nodeType: 'async', text: 'asdasd', draggable: false, id: 'folders-tree-root' }, loader: new Ext.tree.TreeLoader(dataUrl: 'something') });

    Read the article

  • Binary Tree in C Insertion Error

    - by Paul
    I'm quite new to C and I'm trying to implement a Binary Tree in C which will store a number and a string and then print them off e.g. 1 : Bread 2 : WashingUpLiquid etc. The code I have so far is: #include <stdio.h> #include <stdlib.h> #define LENGTH 300 struct node { int data; char * definition; struct node *left; struct node *right; }; struct node *node_insert(struct node *p, int value, char * word); void print_preorder(struct node *p); int main(void) { int i = 0; int d = 0; char def[LENGTH]; struct node *root = NULL; for(i = 0; i < 2; i++) { printf("Please enter a number: \n"); scanf("%d", &d); printf("Please enter a definition for this word:\n"); scanf("%s", def); root = node_insert(root, d, def); printf("%s\n", def); } printf("preorder : "); print_preorder(root); printf("\n"); return 0; } struct node *node_insert(struct node *p, int value, char * word) { struct node *tmp_one = NULL; struct node *tmp_two = NULL; if(p == NULL) { p = (struct node *)malloc(sizeof(struct node)); p->data = value; p->definition = word; p->left = p->right = NULL; } else { tmp_one = p; while(tmp_one != NULL) { tmp_two = tmp_one; if(tmp_one->data > value) tmp_one = tmp_one->left; else tmp_one = tmp_one->right; } if(tmp_two->data > value) { tmp_two->left = (struct node *)malloc(sizeof(struct node)); tmp_two = tmp_two->left; tmp_two->data = value; tmp_two->definition = word; tmp_two->left = tmp_two->right = NULL; } else { tmp_two->right = (struct node *)malloc(sizeof(struct node)); tmp_two = tmp_two->right; tmp_two->data = value; tmp_two->definition = word; tmp_two->left = tmp_two->right = NULL; } } return(p); } void print_preorder(struct node *p) { if(p != NULL) { printf("%d : %s\n", p->data, p->definition); print_preorder(p->left); print_preorder(p->right); } } At the moment it seems to work for the ints but the description part only prints out for the last one entered. I assume it has something to do with pointers on the char array but I had no luck getting it to work. Any ideas or advice? Thanks

    Read the article

  • How-to read data from selected tree node

    - by Frank Nimphius
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} By default, the SelectionListener property of an ADF bound tree points to the makeCurrent method of the FacesCtrlHierBinding class in ADF to synchronize the current row in the ADF binding layer with the selected tree node. To customize the selection behavior, or just to read the selected node value in Java, you override the default configuration with an EL string pointing to a managed bean method property. In the following I show how you change the selection listener while preserving the default ADF selection behavior. To change the SelectionListener, select the tree component in the Structure Window and open the Oracle JDeveloper Property Inspector. From the context menu, select the Edit option to create a new listener method in a new or an existing managed bean. Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} For this example, I created a new managed bean. On tree node select, the managed bean code prints the selected tree node value(s) import java.util.List; import javax.el.ELContext; import javax.el.ExpressionFactory; import javax.el.MethodExpression; import javax.faces.application.Application; import javax.faces.context.FacesContext; import java.util.Iterator; import oracle.adf.view.rich.component.rich.data.RichTree; import oracle.jbo.Row; import oracle.jbo.uicli.binding.JUCtrlHierBinding; import oracle.jbo.uicli.binding.JUCtrlHierNodeBinding; import org.apache.myfaces.trinidad.event.SelectionEvent; import org.apache.myfaces.trinidad.model.CollectionModel; import org.apache.myfaces.trinidad.model.RowKeySet; import org.apache.myfaces.trinidad.model.TreeModel; public class TreeSampleBean { public TreeSampleBean() {} public void onTreeSelect(SelectionEvent selectionEvent) { //original selection listener set by ADF //#{bindings.allDepartments.treeModel.makeCurrent} String adfSelectionListener = "#{bindings.allDepartments.treeModel.makeCurrent}";   //make sure the default selection listener functionality is //preserved. you don't need to do this for multi select trees //as the ADF binding only supports single current row selection     /* START PRESERVER DEFAULT ADF SELECT BEHAVIOR */ FacesContext fctx = FacesContext.getCurrentInstance(); Application application = fctx.getApplication(); ELContext elCtx = fctx.getELContext(); ExpressionFactory exprFactory = application.getExpressionFactory();   MethodExpression me = null;   me = exprFactory.createMethodExpression(elCtx, adfSelectionListener,                                           Object.class, newClass[]{SelectionEvent.class});   me.invoke(elCtx, new Object[] { selectionEvent });     /* END PRESERVER DEFAULT ADF SELECT BEHAVIOR */   RichTree tree = (RichTree)selectionEvent.getSource(); TreeModel model = (TreeModel)tree.getValue();  //get selected nodes RowKeySet rowKeySet = selectionEvent.getAddedSet();   Iterator rksIterator = rowKeySet.iterator();   //for single select configurations,this only is called once   while (rksIterator.hasNext()) {     List key = (List)rksIterator.next();     JUCtrlHierBinding treeBinding = null;     CollectionModel collectionModel = (CollectionModel)tree.getValue();     treeBinding = (JUCtrlHierBinding)collectionModel.getWrappedData();     JUCtrlHierNodeBinding nodeBinding = null;     nodeBinding = treeBinding.findNodeByKeyPath(key);     Row rw = nodeBinding.getRow();     //print first row attribute. Note that in a tree you have to     //determine the node type if you want to select node attributes     //by name and not index      String rowType = rw.getStructureDef().getDefName();       if(rowType.equalsIgnoreCase("DepartmentsView")){      System.out.println("This row is a department: " +                          rw.getAttribute("DepartmentId"));     }     else if(rowType.equalsIgnoreCase("EmployeesView")){      System.out.println("This row is an employee: " +                          rw.getAttribute("EmployeeId"));     }        else{       System.out.println("Huh????");     }     // ... do more useful stuff here   } } -------------------- Download JDeveloper 11.1.2.1 Sample Workspace

    Read the article

  • Find all paths from root to leaves of tree in Scheme

    - by grifaton
    Given a tree, I want to find the paths from the root to each leaf. So, for this tree: D / B / \ A E \ C-F-G has the following paths from root (A) to leaves (D, E, G): (A B D), (A B E), (A C F G) If I represent the tree above as (A (B D E) (C (F G))) then the function g does the trick: (define (g tree) (cond ((empty? tree) '()) ((pair? tree) (map (lambda (path) (if (pair? path) (cons (car tree) path) (cons (car tree) (list path)))) (map2 g (cdr tree)))) (else (list tree)))) (define (map2 fn lst) (if (empty? lst) '() (append (fn (car lst)) (map2 fn (cdr lst))))) But this looks all wrong. I've not had to do this kind of thinking for a while, but I feel there should be a neater way of doing it. Any ideas for a better solution (in any language) would be appreciated.

    Read the article

  • How to reduce redundant code when adding new c++0x rvalue reference operator overloads

    - by Inverse
    I am adding new operator overloads to take advantage of c++0x rvalue references, and I feel like I'm producing a lot of redundant code. I have a class, tree, that holds a tree of algebraic operations on double values. Here is an example use case: tree x = 1.23; tree y = 8.19; tree z = (x + y)/67.31 - 3.15*y; ... std::cout << z; // prints "(1.23 + 8.19)/67.31 - 3.15*8.19" For each binary operation (like plus), each side can be either an lvalue tree, rvalue tree, or double. This results in 8 overloads for each binary operation: // core rvalue overloads for plus: tree operator +(const tree& a, const tree& b); tree operator +(const tree& a, tree&& b); tree operator +(tree&& a, const tree& b); tree operator +(tree&& a, tree&& b); // cast and forward cases: tree operator +(const tree& a, double b) { return a + tree(b); } tree operator +(double a, const tree& b) { return tree(a) + b; } tree operator +(tree&& a, double b) { return std::move(a) + tree(b); } tree operator +(double a, tree&& b) { return tree(a) + std::move(b); } // 8 more overloads for minus // 8 more overloads for multiply // 8 more overloads for divide // etc which also has to be repeated in a way for each binary operation (minus, multiply, divide, etc). As you can see, there are really only 4 functions I actually need to write; the other 4 can cast and forward to the core cases. Do you have any suggestions for reducing the size of this code? PS: The class is actually more complex than just a tree of doubles. Reducing copies does dramatically improve performance of my project. So, the rvalue overloads are worthwhile for me, even with the extra code. I have a suspicion that there might be a way to template away the "cast and forward" cases above, but I can't seem to think of anything.

    Read the article

  • Carpool logical architecture

    - by enrmarc
    I'm designing a carpool system (drivers can publish their routes and passengers can subscribe to them) with WebServices(axis2) and Android clients (ksoap2). I have been having problems with the logical architecture of the system and I wondered if this architecture is fine. And another question: for that architecture (if it is ok), how would be the packages structure? I suppose something like that: (In android) package org.carpool.presentation *All the activities here (and maybe mvc pattern) (In the server) package org.carpool.services *Public interfaces (for example: register(User user), publishRoute(Route route) ) package org.carpool.domain *Pojos (for example: User.java, Route.java, etc) package org.carpool.persistence *Dao Interface and implementation (jdbc or hibernate)

    Read the article

  • Arguments for or against using Try/Catch as logical operators

    - by James P. Wright
    I just discovered some lovely code in our companies app that uses Try-Catch blocks as logical operators. Meaning, "do some code, if that throws this error, do this code, but if that throws this error do this 3rd thing instead". It uses "Finally" as the "else" statement it appears. I know that this is wrong inherently, but before I go picking a fight I was hoping for some well thought out arguments. And hey, if you have arguments FOR the use of Try-Catch in this manner, please do tell. EDIT For any who are wondering, the language is C# and the code in question is about 30+ lines and is looking for specific exceptions, it is not handling ALL exceptions.

    Read the article

  • Can't Remove Logical Drive/Array from HP P400

    - by Myles
    This is my first post here. Thank you in advance for any assistance with this matter. I'm trying to remove a logical drive (logical drive 2) and an array (array "B") from my Smart Array P400. The host is a DL580 G5 running 64-bit Red Hat Enterprise Linux Server release 5.7 (Tikanga). I am unable to remove the array using either hpacucli or cpqacuxe. I believe it is because of "OS Status: LOCKED". The file system that lives on this array has been unmounted. I do not want to reboot the host. Is there some way to "release" this logical drive so I can remove the array? Note that I do not need to preserve the data on logical drive 2. I intend to physically remove the drives from the machine and replace them with larger drives. I'm using the cciss kernel module that ships with Red Hat 5.7. Here is some information pertaining to the host and the P400 configuration: [root@gort ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) [root@gort ~]# uname -a Linux gort 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux [root@gort ~]# rpm -qa | egrep '^(hp|cpq)' cpqacuxe-9.30-15.0 hp-health-9.25-1551.7.rhel5 hpsmh-7.1.2-3 hpdiags-9.3.0-466 hponcfg-3.1.0-0 hp-snmp-agents-9.25-2384.8.rhel5 hpacucli-9.30-15.0 [root@gort ~]# hpacucli HP Array Configuration Utility CLI 9.30.15.0 Detecting Controllers...Done. Type "help" for a list of supported commands. Type "exit" to close the console. => ctrl all show config detail Smart Array P400 in Slot 0 (Embedded) Bus Interface: PCI Slot: 0 Cache Serial Number: PA82C0J9SVW34U RAID 6 (ADG) Status: Enabled Controller Status: OK Hardware Revision: D Firmware Version: 7.22 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 15 secs Surface Scan Mode: Idle Wait for Cache Room: Disabled Surface Analysis Inconsistency Notification: Disabled Post Prompt Timeout: 0 secs Cache Board Present: True Cache Status: OK Cache Ratio: 25% Read / 75% Write Drive Write Cache: Disabled Total Cache Size: 256 MB Total Cache Memory Available: 208 MB No-Battery Write Cache: Disabled Cache Backup Power Source: Batteries Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True Logical Drive: 1 Size: 136.7 GB Fault Tolerance: RAID 1 Heads: 255 Sectors Per Track: 32 Cylinders: 35132 Strip Size: 128 KB Full Stripe Size: 128 KB Status: OK Caching: Enabled Unique Identifier: 600508B100184A395356573334550002 Disk Name: /dev/cciss/c0d0 Mount Points: /boot 101 MB, /tmp 7.8 GB, /usr 3.9 GB, /usr/local 2.0 GB, /var 3.9 GB, / 2.0 GB, /local 113.2 GB OS Status: LOCKED Logical Drive Label: A0027AA78DEE Mirror Group 0: physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK) Mirror Group 1: physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK) Drive Type: Data Array: A Interface Type: SAS Unused Space: 0 MB Status: OK Array Type: Data physicaldrive 1I:1:1 Port: 1I Box: 1 Bay: 1 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM57RF40000983878FX Model: HP DG146BB976 Current Temperature (C): 29 Maximum Temperature (C): 35 PHY Count: 2 PHY Transfer Rate: Unknown, Unknown physicaldrive 1I:1:2 Port: 1I Box: 1 Bay: 2 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM55VQC000098388524 Model: HP DG146BB976 Current Temperature (C): 29 Maximum Temperature (C): 36 PHY Count: 2 PHY Transfer Rate: Unknown, Unknown Logical Drive: 2 Size: 546.8 GB Fault Tolerance: RAID 5 Heads: 255 Sectors Per Track: 32 Cylinders: 65535 Strip Size: 64 KB Full Stripe Size: 256 KB Status: OK Caching: Enabled Parity Initialization Status: Initialization Completed Unique Identifier: 600508B100184A395356573334550003 Disk Name: /dev/cciss/c0d1 Mount Points: None OS Status: LOCKED Logical Drive Label: A5C9C6F81504 Drive Type: Data Array: B Interface Type: SAS Unused Space: 0 MB Status: OK Array Type: Data physicaldrive 1I:1:3 Port: 1I Box: 1 Bay: 3 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM2H5PE00009802NK19 Model: HP DG146ABAB4 Current Temperature (C): 30 Maximum Temperature (C): 37 PHY Count: 1 PHY Transfer Rate: Unknown physicaldrive 1I:1:4 Port: 1I Box: 1 Bay: 4 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM28YY400009750MKPJ Model: HP DG146ABAB4 Current Temperature (C): 31 Maximum Temperature (C): 36 PHY Count: 1 PHY Transfer Rate: 3.0Gbps physicaldrive 2I:1:5 Port: 2I Box: 1 Bay: 5 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM2FGYV00009802N3GN Model: HP DG146ABAB4 Current Temperature (C): 30 Maximum Temperature (C): 38 PHY Count: 1 PHY Transfer Rate: Unknown physicaldrive 2I:1:6 Port: 2I Box: 1 Bay: 6 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM8AFAK00009920MMV1 Model: HP DG146BB976 Current Temperature (C): 31 Maximum Temperature (C): 41 PHY Count: 2 PHY Transfer Rate: Unknown, Unknown physicaldrive 2I:1:7 Port: 2I Box: 1 Bay: 7 Status: OK Drive Type: Data Drive Interface Type: SAS Size: 146 GB Rotational Speed: 10000 Firmware Revision: HPDE Serial Number: 3NM2FJQD00009801MSHQ Model: HP DG146ABAB4 Current Temperature (C): 29 Maximum Temperature (C): 39 PHY Count: 1 PHY Transfer Rate: Unknown

    Read the article

  • how to initialize two logical drives on a HP P400i controller without reboot

    - by John
    What I am trying to do is initialize two logical drives on a HP P400i embedded controller without a reboot of the system here my current Array config: array A (SAS, Unused Space: 0 MB) logicaldrive 1 (17.9 GB, RAID 5, OK) logicaldrive 2 (17.9 GB, RAID 5, OK) logicaldrive 3 (75.9 GB, RAID 5, OK) logicaldrive 4 (25.0 GB, RAID 5, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 72 GB, OK) array B (SAS, Unused Space: 0 MB) logicaldrive 5 (99 MB, RAID 0, OK) logicaldrive 6 (68.2 GB, RAID 0, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 72 GB, OK) windows 2003 machine running the HpCISs2.sys driver version 6.20.0.32 . I have the ACU and ACU CLI tools installed version 8.28.13.0, P400i firmware version 2.74 . Now what I'd like to do is removes the physical drive 1I:1:4 and delete the two logical drives in array B. then insert a new drive in to bay 4 that contains two new logical drives and have them show up in array B again. So far after I remove the drive and delete the failed logical drives, I insert the new drive and run HPacucli rescan. I get the new drive to show up as unassinged physical drive but I cant figure out now to "for lack of a better word" mount the 2 logical drives on the new unassinged disk. If I reboot the system the array controller picks up the new fourth drive and creates Array B with the drives without problem but I'd really like to not have to reboot the server. Any ideas?

    Read the article

  • Implementing logical paging with RadDataPager for WPF and Silverlight

    Following the great series about RadDataPager started by Rossen and Pavel, today I’m going to show you how to implement logical paging. We are going to implement alphabetical paging similar to this ASP.NET AJAX Grid Demo. As you may already know, the key to the heart of the RadDataPager is the IPagedCollectionView interface. You can create your own implementations of this interface and implement any custom logic for paging you want. This is exactly what we are going to do in this article. Introducing PagedCollectionViewBase and LogicallyPagedCollectionView<T> If you have looked at IPagedCollectionView interface you may have found out that it is not a trivial interface to implement. It has 5 methods, 6 properties and 2 events – total number of members to implement 13. To ease any further implementation of the paging interface we are going to create a base class that will have most of the ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • DVD RW+ Not showing up

    - by Manywa R.
    I'm running Ubuntu 12.10 on a Toshiba Satellite Pro A120 and my built in DVD Drive is not opening any cd/dvd/dvd rw that am trying to play on them. the drive seems to be mounted and recongnized: Output of sudo lshw: ... *-cdrom description: DVD-RAM writer product: DVD-RAM UJ-841S vendor: MATSHITA physical id: 1 bus info: scsi@1:0.0.0 logical name: /dev/cdrom logical name: /dev/cdrw logical name: /dev/dvd logical name: /dev/dvdrw logical name: /dev/sr0 version: 1.40 capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram configuration: ansiversion=5 status=ready *-medium physical id: 0 logical name: /dev/cdrom and the disk seems to start but hang with the dvd drive LED solid amber.... the output of jun@jun-Satellite-Pro-A120:~$ dmesg | grep "sr0" [679396.184901] sr 1:0:0:0: [sr0] Unhandled sense code [679396.184910] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [679396.184920] sr 1:0:0:0: [sr0] Sense Key : Hardware Error [current] [679396.184931] sr 1:0:0:0: [sr0] Add. Sense: Id CRC or ECC error [679396.184942] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00 [679396.184965] end_request: I/O error, dev sr0, sector 0 [679396.184975] Buffer I/O error on device sr0, logical block 0 [679396.184984] Buffer I/O error on device sr0, logical block 1 [679396.184990] Buffer I/O error on device sr0, logical block 2 [679396.184996] Buffer I/O error on device sr0, logical block 3 [679396.185002] Buffer I/O error on device sr0, logical block 4 [679396.185008] Buffer I/O error on device sr0, logical block 5 [679396.185014] Buffer I/O error on device sr0, logical block 6 [679396.185020] Buffer I/O error on device sr0, logical block 7 [679396.185031] Buffer I/O error on device sr0, logical block 8 [679396.185038] Buffer I/O error on device sr0, logical block 9 [679396.185070] sr 1:0:0:0: [sr0] unaligned transfer [679396.185108] sr 1:0:0:0: [sr0] unaligned transfer Can someone help me through this? tired of moving around with an external dvd drive. Thanks

    Read the article

  • Simple dependency tree diagram generator

    - by foampile
    I have a need to produce a simple dependency tree diagram. The input data would be in the following simple format: ITEM_NAME DEPENDENCY ---------------------------- ITEM_101 ITEM_75 ITEM_102 ITEM_77 ITEM_102 ITEM_61 ITEM_102 ITEM_11 This means that ITEM_101 depends on ITEM_75 and ITEM_102 depends on items ITEM_77, ITEM_61 and ITEM_11. So the diagram would have items ITEM_77, ITEM_61 and ITEM_11 in one vertical level and ITEM_102 would be below it with a line connecting each of the three dependencies to ITEM_102. The same would be for ITEM_101, ITEM_75 would be somewhere above it and there would be a line connecting it. In the real world this tree represents a hierarchy of scheduling jobs. We have a very extensive workload automation hierarchy in Autosys and I have heard that its front end utility has something like this tree visual representation, however, for some reason, that utility has been disabled by admins. My business users want to see this hierarchy in an easy-to-consume format. I was hoping that I won't have to program something like this from scratch because it seems like quite a common reporting requirement and the input data is simply formatted. My question is: is there a FOSS tool that takes standardized data input and produces such a hierarchical tree? Thanks

    Read the article

  • Count function on tree structure (non-binary)

    - by Spevy
    I am implementing a tree Data structure in c# based (largely on Dan Vanderboom's Generic implementation). I am now considering approach on handling a Count property which Dan does not implement. The obvious and easy way would be to use a recursive call which Traverses the tree happily adding up nodes (or iteratively traversing the tree with a Queue and counting nodes if you prefer). It just seems expensive. (I also may want to lazy load some of my nodes down the road). I could maintain a count at the root node. All children would traverse up to and/or hold a reference to the root, and update a internally settable count property on changes. This would push the iteration problem to when ever I want to break off a branch or clear all children below a given node. Generally less expensive, and puts the heavy lifting what I think will be less frequently called functions. Seems a little brute force, and that usually means exception cases I haven't thought of yet, or bugs if you prefer. Does anyone have an example of an implementation which keeps a count for an Unbalanced and/or non-binary tree structure rather than counting on the fly? Don't worry about the lazy load, or language. I am sure I can adjust the example to fit my specific needs. EDIT: I am curious about an example, rather than instructions or discussion. I know this is not technically difficult...

    Read the article

  • How to Create tree type CVL in Content server(UCM)

    - by rajeev.y.ranjan-oracle
    Steps to create tree choice list:1)Create a table "tblStates" with column "stateID" and "stateName". Click on "ADD Recommended".2) Create another table "tblCities with columns "cityID", "stateID" and "cityName".3)Then create two views on these tables namely "tblstateview" and "tblcityview".3)In "StateView" added two rows with values as JH and MH in stateID column.Jharkhand and Maharastra in stateName.4)Similarly in tblcityview added two rows with values as:BO and RA in cityID column.JH and MH in stateID columnBokaro and Mumbai in cityname column.5)Created relationship with Parentinfo "tblStates" and stateID and  childinfo with tblCities and stateID.6)Created metadata by name "Newtest"Enable option list,go to the configure ,Select use tree,Click on go edit definition 7)Tree Definition at level 1: a)Choose" tblstateView"b)Choose relation "newstatecity"At Level2:a)Choose cityView.Log out of the NativeUI and ContentUI and test the tree created by name "Newtest".

    Read the article

  • Layers - Logical seperation vs physical

    - by P.Brian.Mackey
    Some programmers recommend logical seperation of layers over physical. For example, given a DL, this means we create a DL namespace not a DL assembly. Benefits include: faster compilation time simpler deployment Faster startup time for your program Less assemblies to reference Im on a small team of 5 devs. We have over 50 assemblies to maintain. IMO this ratio is far from ideal. I prefer an extreme programming approach. Where if 100 assemblies are easier to maintain than 10,000...then 1 assembly must be easier than 100. Given technical limits, we should strive for < 5 assemblies. New assemblies are created out of technical need not layer requirements. Developers are worried for a few reasons. A. People like to work in their own environment so they dont step on eachothers toes. B. Microsoft tends to create new assemblies. E.G. Asp.net has its own DLL, so does winforms. Etc. C. Devs view this drive for a common assembly as a threat. Some team members Have a tendency to change the common layer without regard for how it will impact dependencies. My personal view: I view A. as silos, aka cowboy programming and suggest we implement branching to create isolation. C. First, that is a human problem and we shouldnt create technical work arounds for human behavior. Second, my goal is not to put everything in common. Rather, I want partitions to be made in namespaces not assemblies. Having a shared assembly doesnt make everything common. I want the community to chime in and tell me if Ive gone off my rocker. Is a drive for a single assembly or my viewpoint illogical or otherwise a bad idea?

    Read the article

  • FIlling a Java Bean tree structure from a csv flat file

    - by Clem
    Hi, I'm currently trying to construct a list of bean classes in Java from a flat description file formatted in csv. Concretely : Here is the structure of the csv file : MES_ID;GRP_PARENT_ID;GRP_ID;ATTR_ID M1 ; ;G1 ;A1 M1 ; ;G1 ;A2 M1 ;G1 ;G2 ;A3 M1 ;G1 ;G2 ;A4 M1 ;G2 ;G3 ;A5 M1 ; ;G4 ;A6 M1 ; ;G4 ;A7 M1 ; ;G4 ;A8 M2 ; ;G1 ;A1 M2 ; ;G1 ;A2 M2 ; ;G2 ;A3 M2 ; ;G2 ;A4 It corresponds to the hierarchical data structure : M1 ---G1 ------A1 ------A2 ------G2 ---------A3 ---------A4 ---------G3 ------------A5 ------G4 ---------A7 ---------A8 M2 ---G1 ------A1 ------A2 ---G2 ------A3 ------A4 Remarks : A message M can have an infinite number of groups G and attributes A A group G can have an infinite number of attributes and an infinite number of under-groups each of them having under-groups too That beeing said, I'm trying to read this flat csv decription to store it in this structure of beans : Map<String, MBean> messages = new HashMap<String, Mbean>(); == public class MBean { private String mes_id; private Map<String, GBean> groups; } public class GBean { private String grp_id; private Map<String, ABean> attributes; private Map<String, GBean> underGroups; } public class ABean { private String attr_id; } Reading the csv file sequentially is ok and I've been investigating how to use recursion to store the description data, but couldn't find a way. Thanks in advance for any of your algorithmic ideas. I hope it will put you in the mood of thinking about this ... I've to admit that I'm out of ideas :s

    Read the article

  • jquery Tree Traversal prev() problem.

    - by Guido Lemmens
    Hello, I like to click a label and check the previous checkbox. I've tried the next code, but this is not working. I have tried for 2 hours, but what am i missing? JQUERY jQuery(document).ready(function() { $('.profilename').live('click', function() { if ($(this).prev("input:checked").val() != null) { $(this).prev("input").removeAttr("checked"); } else { $(this).prev("input").attr("checked","checked"); } }); }); HTML <input type="checkbox" class="check" name="example"> <label class="namelabel">John Doe</label> Who can help me to solve this question? Many thanks! p.s. I know i can easy solve this with the <label for=""> tag, but that is not the question.

    Read the article

  • Implementing the tree with reference to the root for each leaf

    - by AntonAL
    Hi, i implementing a products catalog, that looks, like this: group 1 subgroup 1 subgroup 2 item 1 item 2 ... item n ... subgroup n group 2 subgroup 1 ... subgroup n group 3 ... group n The Models: class CatalogGroup < ActiveRecord::Base has_many: catalog_items has_many :catalog_items_all, :class_name => "CatalogItem", :foreign_key => "catalog_root_group_id" end class CatalogItem < ActiveRecord::Base belongs_to :catalog_group belongs_to :catalog_root_group, :class_name => "CatalogGroup" end Migrations: class CreateCatalogItems < ActiveRecord::Migration def self.up create_table :catalog_items do |t| t.integer :catalog_group_id t.integer :catalog_root_group_id t.string :code t.timestamps end end For convenience, i referenced each CatalogItem to it's top-most CatalogGroup and named this association "catalog_root_group". This will give us the simple implementation of search request, like "show me all items in group 1". We will have a deal only with CatalogModel.catalog_root_group The problem is - this association does't work. I always get "catalog_root_group" equals to nil Also, i have tried to overcome the using of reference to root group ("catalog_root_group"), but i cannot construct appropriate search request in ruby ... Do you know, how to do it ?

    Read the article

  • Parse tree and grammars information

    - by fuzzylogikk
    Do anyone know where to find good online resources with examples how to make grammars and parsetrees? Preferebly introductary materials. Info that is n00b friendly, haven't found anything good with google myself. edit: I'm thinking about theory, not a specific parser software.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >