Hi Friends, Recently I've experienced an issue in my (following) code. I've designed an array-stack and checked the values pushed in to it. It works well when pushing but when popping it doesn't display the whole popped values. E.g: If I pushed the values "zero to nine" in to the stack, even though they are pushed successfully, their popping displays only "nine to five". Why it behaves like this? Could anyone suggest a solution for this? #define MAX 10 #include <stdio.h> #include <stdlib.h> struct stack{ int stackSize; int items[MAX];}; void push(struct stack *sp, int newItem){ if((sp->stackSize)<MAX){ sp->items[sp->stackSize++]=newItem; printf("Pushed %d\n",newItem); } …

Member Avatar
Member Avatar
+0 forum 3

Hi Everybody, Im running a Software web application - www.physioplustech.com My clients are asking for an offline version, where they can Access previous data and they can add new data even without internet connection. I wish I can create a desktop icon for my application, which when offline opens a limited version of my web application and make atleast few forms availbale offline and few data's they have entered to be availble offline just like Outlook. When connected to intenet again, those datas stored offline can be pushed to online tables. IM not a technical geek, IM a medical professional …

Member Avatar
Member Avatar
+0 forum 7

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

Hi i am working on a server sent event script to be sent when the user has logged out, but in the network tab the server sent pages are being sent every couple of seconds with no data. Client-Side script var source=new EventSource("include/updates.php"); source.addEventListener('logout',function(event){ $("#notificationsContainer").append(event.data + "<br />"); source.close(); },false); Server-side script header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); if(!isset($_SESSION)) session_start(); if(!isset($_SESSION['id'])) { $time = date('r'); echo "event: logout\n"; echo "data: user logged out at {$time}\n\n"; flush(); } Thanks for your time,

Member Avatar
Member Avatar
+0 forum 2

Alright, so I am designing a program that contains binary trees to function as a parser. I have encounted a very strange problem that is causing my program to fail while it is running. I have done several tests and narrowed down the incidents. Ok, so this results in a successful test: #include <iostream> #include <cstdlib> #include "BinaryTree.cpp" #include "Stack.cpp" using namespace std; int main() { BinaryTree<char> treeL, treeR; Stack< BinaryTree<char> > stack1; BinaryTree<char> tree1('a'); cout << "Test"; return 0; } Output: Test RUN SUCCESSFUL (total time: 93ms) Now, whenever I throw in the push function (the method that causes …

Member Avatar
Member Avatar
+0 forum 6

Hi. So I have a website (SNIP) and I am setting up a phpBB forum (or something else). But......I'm going mobile-style! Is there anyway I can make it so anytime a new post comes up (assuming the person is on the website), the person gets a push notification or something? (or maybe like a Javascript pop-up when someone posts something?) --limeramen22

Member Avatar
Member Avatar
+0 forum 2

Hi, I am learning python coming from a C background and I am trying to understand how python lists work. I took a look at the built in methods, and I am wondering if they are implemented like a linked list. The reason I am wondering this, is because I am wondering that if you can treat it as a queue, where you can push an element and pop one **simultaneously** with **two different threads** **(safely)** without the need of locks, semaphores etc.

Member Avatar
Member Avatar
+0 forum 2

This code is based on code from series of programs [URL="http://www.ferg.org/thinking_in_tkinter/"]'Thinking in tkinter'[/URL] This code is not perfect, especially it does not recognize key release when mouse moves out of button area during push. Leave event could also be captured for that to stop the event in that case.

Member Avatar
+0 forum 0

Hi, i have an ipod touch 4th generation running IOS 5 and the push notifications dont work. They are all on in settings and still nothing. My ipod is NOT jailbroken and it never will be. Thanks

Member Avatar
+0 forum 0

I am making a program of vehicles and i have to make a car garage class. In the class the max amount of vehicles that could enter are 20 or 25000 lbs. I wrote the charstack and the pop() and the push() but dont know how to limit it to 20 vehicles or 25000 lbs. Could someone help with this. Also, I have a problem with the vehicle interface in my program. other classes come with an error so I threw an exception but we are supposed to add code to the classes to make them compile. [CODE] package saturn; …

Member Avatar
Member Avatar
+1 forum 3

I just wanted to know what would happen if you abuse the CharStack class by pop()ing more characters than you push()? Would it be an error of out of exception or something else.

Member Avatar
Member Avatar
+0 forum 5

Hi, If i have a vector in MATLAB v; [CODE]v = [1 2][/CODE] How can i push a value say '7' to the vector. ie. v = 1 2 7 I am currently doing it in a loop: count = 0 ie. for 1 to 10 count = count + 1; v(count) = <insert function here> which is not ideal sorry for poor syntax, trying to help out a mate who does matlab, i'm a c++, java guy...

Member Avatar
Member Avatar
+0 forum 1

Hello! I'm trying to modify opensourced application but due to lack of knowledge, I'm stuck. Explantions are in the comments of the app :-) Thanks in adavance for your support! [CODE]void CBaseGame :: FixSlots( ) { struct Struct1{ list<string> UserList; list<CGameSlot> PlayerSlots; }; list<string>::iterator IT; list<CGameSlot>::iterator TI; for( vector<CGamePlayer *> :: iterator i = m_Players.begin( ); i != m_Players.end( ); i++ ) { unsigned char PID = (*i)->GetPID( ); if( PID < 13 ) { unsigned char SID = GetSIDFromPID( PID ); Struct1.UserList.push_back( (*i)->GetName( ) ); // let's say it added "Bob", "Mike", "Jack" Struct1.PlayerSlots.push_back( SID ); // let's say …

Member Avatar
Member Avatar
+0 forum 1

Hi everyone, My question is: I have two vectors, for example vectorA and vectorB, vectorA is filled with randomics values, like 23, 43, 54, etc, and its have 1000 members, like vectorA[0], vectorA[1], etc. My vectorB descending of vectorA, I use the "push_back" function to take the values of vectorA, but I specificate wich ones values I want, like this: [CODE]std::vector< double > vectorA ; std::vector< double > vectorB; double c2 = 100; while( c2 < 500){ vectorB.push_back(vectorA[c2]); } [/CODE] But when generate the vectorB, its have 1000 members, the vectorB[0] is equal to the vectorA[100](what I wanna in this …

Member Avatar
Member Avatar
+0 forum 5

Hey guys I am currently writing a code that will take the user input of a number and convert it to its hexadecimal form with the use of Stack ADT. This is what I have so far and would appreciate any help. [CODE]#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include "stack.h" int main(void) { int num; char alpha; int* digit; STACK* stack; stack = createStack (); printf("Please enter your integer (decimal): \n"); scanf("%d" , &num); while(num > 0) { digit = (int*) malloc (sizeof(int)); *digit = num % 16; push (stack, digit); num = num/16; } while (!emptyStack (stack)) { digit …

Member Avatar
Member Avatar
+0 forum 1

Hello, first off thanks for reading. So my problem occurs when I try to copy an element from one vector into a second vector. The error that I get says that the vector subscript is out of range when I try to push_back that element. I only get an error when there is more than one face detected (element in the DetectedFaces vector), if there's only one element in the vector, it works fine. [CODE] while(!DetectedFaces.empty()) { temp.push_back(DetectedFaces[0]); /////bad line DetectedFaces.erase(DetectedFaces.begin()); } [/CODE] Any ideas what would be wrong with this? or is there any other way to implement this …

Member Avatar
Member Avatar
+0 forum 7

So i am suppose to write two methods called superPop and superPush. superPop() pops a StarLine object from the stack, sends it to System.out.print, and returns it. superPush() pushes a StarLine object onto the stack, sends it to System.out.print, and returns it. I am continuing to try new things but any help would be greatly appreciated. So far I have this written for this new class I am creating: [CODE]import java.io.*; import java.util.*; public class AllStars extends MyStack{ public StarLine superPop(){ if(empty()) { throw new EmptyStackException(); } System.out.print(); return; } public StarLine superPush(StarLine stars){ }[/CODE] Also here is the Starline …

Member Avatar
Member Avatar
+0 forum 1

Ok so I have to write a reverse method of a stack and I am not quite sure how to do it. I understand that i need to pop the strings from one stack into another but whenever I try to do this errors arise. Specifically it says it cannot find the pop method which is clearly defined above. Can anyone help with this problem? [CODE]import java.io.*; import java.util.*; public class MyStack<E> implements MyStackInterface<E> { private List<E> theData; public MyStack() { theData = new ArrayList<E>(); } Stack<String> theDataReversed = new Stack<String>(); public E push(E o) { theData.add(o); return o; } …

Member Avatar
Member Avatar
+0 forum 1

in this program i've pushed 10 values into array but i use the condition [iCODE]if (tos==9)[/iCODE] which means no value should be stored at 10th position but when i am storing values, [iCODE]for (int i=1;i<=10;i++) first.push(i);[/iCODE] [CODE]class Stack{ int StackArray[] = new int[10]; int tos; Stack(){ tos=-1; } public void push(int value){ if (tos==9) // no value should be stored on 10th position System.out.print ("Stack already Full..!"); else StackArray[++tos] = value; } public int pop(){ if (tos==-1){ System.out.print ("Stack is Empty"); return 0; } else return StackArray[tos--]; } } class Stack1{ public static void main (String args[]){ Stack first = …

Member Avatar
Member Avatar
+0 forum 3

In line 32 which is the lttr[ctr] = read.next().charAt(0); wont read all the letters that i input. it only reads the last letter that i entered. what should i do to be able to display all the letters i entered and be able to reverse there order so that they would act as a PUSH. Line 34 is required every after a letter was input by the user. and if you have another solution so that the user can use a 'Y' and 'N' as a reply instead of 1 or 0. Thanks lttr --- is my array that reads …

Member Avatar
Member Avatar
+0 forum 6

Hello all, I recently started using Python to test a Bluetooth Push application prototype and everything was working great until threading. I wonder if someone knows how to start multiple threads of connectpush() with Obexftp running under Linux? So far with the code below I have to wait until the first client connection gets close to start the next connection and I need to start many push connections at once. The strange part is that the threads are working for obexftp.browsebt() method so I get push channels in every thread or maybe it's because we don't need to accept or …

Member Avatar
+0 forum 0

The End.