Let's assume couple things. I created a nice website based on compiled program language (Node.js, ASP, Java, C#, whatever). It works nicely. But I'd like to get an estimate on how much hardware I'd need. So I could run 1 hosting, and it would result in "this" amount of impact on servers (memory, processor cycles, networking etc.). But that's 1 person with 1 hired server. I'd like to test how would it be, if 10.000 people were on each of 10.000 servers. Any way to find that out, before releasing it? Primarily, I'd like to check if there are no …

Member Avatar
Member Avatar
+0 forum 9

I am doing a start up and am figuring out my stack. I've been using php for around 5 years now and am extremely familiar with it. However, I've recently been introduced to node.js and have seen it is on the rise. I'm not sure what to use for server side. The purpose of my company is e-commerce. Users will have accounts and subscribe to a service. I hope to grow quickly. Would node.js be a good choice or would php be fine?

Member Avatar
Member Avatar
+0 forum 7

I'm working on this code for class, I am not expecting anyone to do my homework but help would be appreciated. Nodes are confusing for me and my professor did not explain well. The errors I am getting are where I declare the functions, I dont know the nodeType(?) that goes in the arguments. Hopefully that makes sense.I think I may have also need to initialize the node? #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; ///employeeType struct, node struct, typedef statement go here. struct employeeType { int idNum; string firstName; string lastName; char gender; double payrate; …

Member Avatar
Member Avatar
+0 forum 1

Hi Friends! I have tried to find all possible paths between two nodes; #include <iostream> #include <vector> #include <queue> #include <map> #include "fstream" #define max_edges 16 #define MAX_NODES 5 using namespace std; bool isadjacency_node_not_present_in_current_path(int node,vector<int>pathway); int findpaths(int source ,int target ); void display_all_paths_map(); vector<vector<int> >GRAPH(100); vector<int>pathway; map<int,vector<int>> allpathsmap; map<int,vector<int>>:: iterator itapm; typedef pair<int,vector<int>> pairapm; int main() { int origin,destin,source,dest,l_id; ifstream file1 ("Link_ID.txt"); if (! file1.is_open()) { cout << "Error opening file Link_ID.txt"; } //did not include 'return' for(int i=1;i<=max_edges;i++) { file1 >>origin>>destin>>l_id; GRAPH[origin].push_back(destin); } cout<<"(source, dest)\n"; cin>>source>>dest; findpaths(source,dest); display_all_paths_map(); file1.close(); return 0; } //ADJACENCY NODE NOT PRESENT IN CURRENT PATH …

Member Avatar
+0 forum 0

Hi All, I have 2 frames in one page which is left frame and right frame. May i know how to set the link to the jstree node which is located at left frame. When click on the node, it will reload the page at right frame without reload the left frame. Looking for help. thanks in advance!

Member Avatar
+0 forum 0

Node inside a linkedlist SomeInterface has an addLast() method that should add a node at the end of the list public LinkedList<T> implements SomeInterface<T>{protected class Node<T>{ privateT data; private Node<T> head,tail; protected Node(T data,Node<T>tail){ this.data=data;head=null;this.tail=tail;} private T getInfo(){return this.data;} private void setTail(Node<T>newTail){this.tail=newTail;} private void setLink(Node<T>newHead){this.head=newHead;} private Node<T> getLink(){return tail;} }} public void addLast(){ } }//end of LinkedList<T> class when I create a LinkedList object (`LinkedList<String>somelist=new LinkedList<T>()`) and try to append multiple items (`somelist.append("William");somelist.append("Fredk rick"`);somelist.append(`Maria`)) only the last item/string gets appended to the list. Any reason why?

Member Avatar
Member Avatar
+0 forum 2

Hi again! So, I have an object that gets appended to a linked list now. Now I need to have all of that item's data output in a formatted manner - something similar to this: CD Artist CD Title CD Length Track Name Track Length Arist name here Title here hh:mm:ss Track name here mm:ss Track name here mm:ss Track name here mm:ss The problem with this is that the output for this is all in the overloaded << operator for my CD object and I'm having trouble figuring out how to append the track names and track lenghts, which …

Member Avatar
Member Avatar
+0 forum 6

Basically, I'm getting an error when I try to append a CD object to my linked list. What error? This one: > First-chance exception at 0x550257aa (msvcr100d.dll) in Programming 3 Course Project.exe: 0xC0000005: Access violation reading location 0xfeeefee2. > Unhandled exception at 0x550257aa (msvcr100d.dll) in Programming 3 Course Project.exe: 0xC0000005: Access violation reading location 0xfeeefee2. My code to append: case 1: tempCD.defineCD(); cout << "Works" << endl; CDlist.appendNode(tempCD); cout << "Still works." << endl; break; My linked list's appendNode function code: //Append List**************************** //*************************************** template <class T> void TList<T>::appendNode(T newValue) { ListNode<T> *newNode; ListNode<T> *nodePtr; //Make a new node, store …

Member Avatar
Member Avatar
+0 forum 15

Hello! I am making a custom control, simmilar to TreeView, in WinForms C#. And I was wondering how is the Nodes collection made. The one with Roots and Childs. I tried using a simple collection but it doesn't give the functionallity I need. [Screenshot](http://i.imgur.com/QAaW6.png, "Screenshot of the TreeView's nodes collection editor") I tried to take a look at the treeview definition but it doesn't make much sense without seeing the actual implementation. Maybe someone can give me at least some hints about where should i look for info or/and what exactly to look for. Google didn't help me much on …

Member Avatar
Member Avatar
+0 forum 1

hi, i am getting Run time error '13': Type mismatch error. below is my code: Dim ndMain As Node Set ndMain = TreeMain.Nodes.Add(, , "Root", "Main Menu", "myappname") thanks, krunal

Member Avatar
Member Avatar
+0 forum 4

I think this simple example might ask the question a lot more clearly. I have an input file with multiple products. There are different types of product (2 types with 2 product IDs is fine enough for this example), but the input will have many more. I only want to output the info for the first product of each type that I encounter in the for each Product loop. (I'm outputting info for the lowest priced product, so the first one will be the lowest price because I sort by Rate first.) So I want to read in each product, …

Member Avatar
Member Avatar
+0 forum 3

Im getting errors that i don't understand how to fix, any help would be greatly appreciated! >C:\MinGW\bin\g++ -pedantic -Wall -Wextra A9COPY.cpp -o A9COPY.exe A9COPY.cpp:36: error: expected constructor, destructor, or type conversion before '*' token A9COPY.cpp:44: error: expected unqualified-id before "void" A9COPY.cpp:44: error: expected constructor, destructor, or type conversion before "void" A9COPY.cpp:55: error: expected unqualified-id before "void" A9COPY.cpp:55: error: expected constructor, destructor, or type conversion before "void" A9COPY.cpp:68: error: expected unqualified-id before "bool" A9COPY.cpp:68: error: expected constructor, destructor, or type conversion before "bool" >Exit code: 1 #include <iostream> using namespace std; class Node { private: int val; Node* link; public: Node(){ …

Member Avatar
Member Avatar
+0 forum 1

If someone could help point me in the right direction, it would be much appreciated. My problem is merge sorting a list from a text file and outputting the sort into a different text file that the user chooses. The text file that's inputted is about a 20 item list of random integers that I created myself. The program builds and compiles, yet it doesn't merge sort at all. The mergeSort function is located in LinkedList.cpp. The way I used the .txt file to create nodes was implemented in LinkedList::createList. Is my implementation of the merge sort function itself wrong? …

Member Avatar
Member Avatar
+0 forum 1

Hi im writing a fill-in-the-blanks program and I am stuck on how to delete a node from a liked list. I am suppost to follow this psuedocode to finish the program. I think I am close to a solution, can anyone point out what im doing wrong? The list already has values stored and the user is asked from Main to enter a value to delete (int item is passed to delete function). The commented code is the steps I am suppost to take to solve this. My attempt is the actual code. I must use the function template given. …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to build a tree from a file and it keeps blowing up on me. It doesn't even give an error but it shuts down when I try to run it. I'm not sure what is wrong. I think I have something wrong with my root but I'm really unsure. Eventually, I have to sum the root-to-leaf paths, but I'm not to this point yet. I'm trying to figure this out, but I'm really not having much luck. I am willing to learn so any help, tips, comments, or advice is greatly appreciated! inputfile 5 8 7 4 7 …

Member Avatar
+0 forum 0

public void Enqueue(int value){ node end = endList.next; end.next=null; endList.data=value; endList.next=end; endList=end; Here is my code for an Enqueue method but when I run it mylist.Enqueue(12); It gives me an error. Is something wrong with my method or am I testing it incorrectly? Thanks.

Member Avatar
Member Avatar
+0 forum 5

Currently this method has a run time of O(N^2) and I am trying to get it to O(N). Any suggestion as to where I should start? public void removeAll(e removeNum) { node nodeToFind = this.find(removeNum); while(nodeToFind != null) { this.remove(nodeToFind); nodeToFind = this.find(removeNum); } } Thanks

Member Avatar
Member Avatar
+0 forum 2

ran into a little snag with my code. i am trying to push the data of all the nodes in a linkedlist into a stack. problem is, i have no idea how to properly convert a node into a variable. Node current = list.returnHeadNode(); //other code... stack.push(current.getData()); my error lies in here somewhere. can someone explain to me why this does not work and what i can do to fix it?

Member Avatar
Member Avatar
+0 forum 2

I am trying to input an int into the end of a singly linked list. I have already created the code to put a number at the end of the list but when I go to print it out, it only prints out (in my test class) the int that will go at the end of the list rather than printing out the whole list(and then . mylist.addEnd(8); System.out.println("after addEnd"); anIterator = mylist.iterator(); // reads mylist collection for (int i=0;i<mylist.getSize();i++) System.out.print(anIterator.next() + " "); If this seems correct then something must be wrong with my addEnd method.

Member Avatar
Member Avatar
+0 forum 3

So im having issues with a sorted list template, heres how I implemented it enum RelationType {LESS, EQUAL, GREATER}; template<class ItemType> struct NodeType { ItemType info; NodeType<ItemType>* next; }; template<class ItemType> class SortedType { public: SortedType(); ~SortedType(); bool IsFull() const; int GetLength() const; void MakeEmpty(); ItemType GetItem(ItemType item, bool& found); void PutItem(ItemType item); void DeleteItem(ItemType item); void ResetList(); ItemType GetNextItem(); private: NodeType<ItemType>* listData; int length; NodeType<ItemType>* currentPos; }; template<class ItemType> SortedType<ItemType>::SortedType() { length = 0; listData = NULL; } template<class ItemType> bool SortedType<ItemType>::IsFull() const {/* NodeType<ItemType>* location; try { location = new NodeType<ItemType>; delete location; return false; } catch(bad_alloc exception) …

Member Avatar
Member Avatar
+0 forum 2

Combining queue and stack link list? hello so here is my question i ave to connect a link lists together, one who behaves like a stack the other like a queue.the numbers used are 11 22 44 77 33 99 66. so the stack link list looks like this 66 99 33 77 44 22 11 queue link list looks like this 11 22 44 77 33 99 66 what i need to do is combine both, connect the stack to the queue to make a new link list with 14 numbers. new link list should look like this 66 …

Member Avatar
Member Avatar
+0 forum 1

Hai friends,I was developing a code for linked list operations. But while doing deletion, if we give a position except 1, the particular node will be deleted. But if i give position as 1, the node will not be deleted. Please help. I'm posting the code below #include <iostream.h> #include <conio.h> #include <process.h> #include <alloc.h> struct node { int info; struct node *link; }*start=NULL; void push(); void display(); void sort(); void delnode(int); void search(int value) { int pos=0; struct node *_node; _node=start; if(_node==NULL) { cout<<"NULL"; return; } while(_node!=NULL) { cout<<_node->info<<"->"; _node=_node->link; } cout<<"NULL"; _node=start; // for searching while(_node!=NULL) { if(_node->info …

Member Avatar
Member Avatar
+0 forum 3

I need help creating xml file with C# ok lets say I have the following users.xml file that contains the following <Users> </Users> After executing the C# code below public void addUser() { string filePaths = "users.xml"; XmlDocument xmlDoc = new XmlDocument(); string user = textBox2.Text; // USER INPUT if (File.Exists(filePaths)) { xmlDoc.Load(filePaths); XmlElement elmRoot = xmlDoc.DocumentElement; XmlElement elmNew = xmlDoc.CreateElement("User"); elmRoot.AppendChild(elmNew); elmRoot = xmlDoc.DocumentElement; elmNew = xmlDoc.CreateElement("Name"); XmlText CreateUserText = xmlDoc.CreateTextNode(user); elmRoot.LastChild.AppendChild(elmNew); elmRoot.LastChild.LastChild.AppendChild(CreateUserText);//8 xmlDoc.Save(filePaths); } } I get the following xml file <Users> <User> <!-- Generated by C# code above --> <Name>Eric</Name> <!-- Generated by C# code above --> …

Member Avatar
Member Avatar
+0 forum 1

Hi all, Say i have 2 nodes of a tree. struct tree{ int data; tree* left; tree* right; }; NODE1 data = 3; left = NULL; right = NULL and NODE2 data = 6; left = NULL; right = NULL How do i say Node 2 if the left link of node 1 so it creates the start of a tree. So it looks like NODE1 / \ NODE2 NULL I thought I could say node1->left = &node2; // left = the address of node 2. Is that right? Thanks

Member Avatar
Member Avatar
+0 forum 2

Can anybody share the algorythm to perform inorder traversal of a binary search tree using parent node(without stack or recursion)

Member Avatar
Member Avatar
+0 forum 4

Hi All, I am newbie to XML. I want to create only one XML file each day automatically using php function with the following format. I want to use the same function for appending the follwing portion into the existing XML file ## This portion need to append whenever the function is being called ## <Call> <StartTime>2012-07-12T01:13:01-00:00</StartTime> <User>adam</User> <Action>UI</Action> <Duration>0</Duration> <Application>Web apps</Application> <Interface>HTML (UI)</Interface> <Host>www.xyz.com</Host> </Call> #XML FILE FORMAT # <Monitor xsi:schemaLocation="http://xml.xyz.com/monitor/namespace http://xml.xyz.com/monitor/xsd/Monitor.xsd" xmlns="http://xml.xyz.com/monitor/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Call> <StartTime>2012-07-12T01:13:01-00:00</StartTime> <User>adam</User> <Action>UI</Action> <Duration>0</Duration> <Application>Web apps</Application> <Interface>HTML (UI)</Interface> <Host>www.xyz.com</Host> </Call> <Call> <StartTime>2012-07-12T01:13:01-00:00</StartTime> <User>john</User> <Action>UI</Action> <Duration>0</Duration> <Application>Web apps</Application> <Interface>HTML (UI)</Interface> <Host>www.xyz.com</Host> </Call> ## need to …

Member Avatar
Member Avatar
+0 forum 1

I have a Product class that is the parent of 3 other classes; Books, Movies, Music. And the Product class connects to the Store class that holds the Store's location. If I need to find a certain Product I have to traverse the list of each the Store class and the Product class. However, my code is throwing a NullPointerExeption. When I debug it shows that pHead = null. I am thinking the error is within my addProductBook method and is not appointing the first product to head? Or my findProduct method holds the error. My constructor and addProductBook is …

Member Avatar
Member Avatar
+0 forum 1

Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg ($row['$lrg'],'rname'); } return $total; } echo $total; ?>[/CODE] Please, solve it. I want to count how much i have in my left or right, sum of total in binary tree.

Member Avatar
Member Avatar
+0 forum 2

Hello. I am working on a data structures program that should be quite easy, but after programming in assembly language using mips, I forgot a little bit of C++ and can't remember how to do this. I've used my googlefu for at least 2 hours and still have this problem. The error: head undeclared, first use this function. The code it is talking about [CODE]void node::insertNode(int id, string name, double average,int *array) { node *newNode; //a new node node *nodePtr; // to traverse the list node *previousNode = NULL; //the previous node cout << "test 2"; //allocate a new node …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am asking about true syntax of the following:: I have a class name P and in header file (of this class) ------> [CODE] class P { public: P(); ~P(); void addItem(const int newItem); void deleteItem(const int Item); void showAll(); /** need to proper getter funct. of tail */ private: struct Node { int item; Node *next; Node *precede; }; int size; Node *tail; }; [/CODE] Now I am asking that how I can write getter function of tail ? -class P will be used by another class. Thanks for replying.

Member Avatar
Member Avatar
+0 forum 4

The End.