1,306 Topics

Member Avatar for
Member Avatar for _Nestor

I have a question about how the message loop works in a windows application [code] while ( GetMessage(&msg, NULL, 0, 0) ) { TranslateMessage(&msg); DispatchMessage(&msg); } [/code] Does the windows o/s maintain a message queue that the app retrieves a message from the front of then dispatch it bck to …

Member Avatar for shinejos
0
379
Member Avatar for murali2489

Hi Team, Im reading Collections. It is mentioned that while intialising priority queue, it uses natural ordering by default. But my output is not like that. Below is my code and output. public class BackedCollections { public static void main(String[] args) { PriorityQueue<Integer> pq = new PriorityQueue<Integer>(); pq.offer(3); pq.offer(1); pq.offer(5); …

Member Avatar for murali2489
0
4K
Member Avatar for gil.nickson

This code is working but i want my added words to show in vertical because its output is shown in horizontal if two or more words is inserted. Can you help me to improve my program? Here are the codes... /** * Write a description of class Stacks here. * …

Member Avatar for Phaelax
-1
260
Member Avatar for ruggb

one of my computers has this problem. All r configured the same way. W7, one user, **Admin**, on C drive All other users on D drive All systems r up to date. Network printer hard wired to router. All have the same printer drivers installed. I believe the following symptoms …

Member Avatar for rch1231
0
202
Member Avatar for tesfaye.mulu.71

Dear programmer, A pharmacy needs to automate drug inventory management system. Every drug has chemical Name, Chemical Composition, date of manufacturing, expiry date, and country of origin, quantity, category and others. The pharmacy has a policy to dispose expired drug before use. However, it is not an easy task to …

Member Avatar for Schol-R-LEA
0
3K
Member Avatar for onsponge

Hi, Firstly, forgive us for posting such noob question, we are still new at PHP/web development. We are not sure what's the proper approach for the problem we are working on. Basically we are building a system where user could program their hardware board online: The user will upload their …

Member Avatar for cereal
0
210
Member Avatar for nadiam

there is a very frustrating problem with my queue linked list. the functions all work its just that after enqueue, dequeue or display the menu displays along with "Enter choice : Only one of the above can be your choice ". whats wrong? #include <stdio.h> #include <conio.h> #include <ctype.h> #include …

Member Avatar for nadiam
0
276
Member Avatar for muhammadmuzzammil1998

Here is the code for GUI in C++, http://facebook.com/muhammadmuzzammil1998 Tested in Code::Blocks hope it will help you :) #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "CodeBlocksWindowsApp"; int WINAPI WinMain …

0
283
Member Avatar for abousetta

Write a C++ code that implements a doubly linked list structure that contains float elements, and then do the following: 1. Implement a function DisplayDequeue(…) that displays the inserted elements in a way like the dequeue function in the queue, Example: input= 1.5 , 3.5, 10, 0.5 output= 1.5, 3.5, …

Member Avatar for Schol-R-LEA
0
358
Member Avatar for CreatorZeus

int numLines = 0; string unused; while (getline(users, unused)) { ++numLines; } cout << numLines << " Clients Found" << endl; //begin the search string search; string line; while(client.empty()) { cout << "Queue: "; //Display What The User Typed getline(cin,search); //Make it capital transform(search.begin(), search.end(),search.begin(), ::toupper); cout << search << …

Member Avatar for Ancient Dragon
0
230
Member Avatar for Aisha_1

A queue is a restricted data structure that allows only the following operations: a.Enqueue" an item at the end" of the queue. b.Dequeue" an item from the beginning" of the queue. These should correlate with your intuitive notion of a queue (line) in the physical world. In queues the first …

Member Avatar for nahi
0
247
Member Avatar for venkates.99

1)On receipt of the signed MSA back from the customer, the original should be sent to the legal representative and a controlled copy should be sent to the TM/Account Manager by ___________. B D M DM 2)Runtime Profiling is used by which category of users? Developers and System Administrators Configuration …

Member Avatar for deceptikon
-1
487
Member Avatar for hendraligawan

I have a problem when I do my task. task: Made a program about queue in Bank teller system. Teller A if deposit <=10million, teller B > 10million the count of customer(queue) is random and the price if deposit is random too. output: how much customers,time and total transaction at …

Member Avatar for hendraligawan
0
200
Member Avatar for NathanOliver

Hey Daniweb, I have recently started working with threads in the c++11 library. I started with a simple dispatch mechanism where I have a queue and that would get passed to the threads and the threads would take turns emptying the queue. Since each thread needs to share the queue …

Member Avatar for NathanOliver
0
338
Member Avatar for Mehak murtaza

there is a large busy cosmetic store. In store, for billing, there are four counters with four tellers (who deal payment etc) . A customer comes to the store and collects the things he/she wants to purchase and go to one of the counters to pay for purchase. If there …

Member Avatar for Ancient Dragon
0
234
Member Avatar for hhenali

#include<iostream.h> #include<conio.h> #include<string.h> #include<stdlib.h> // define maximum number of patients in a queue #define MAXPATIENTS 100 // define structure for patient data struct patient { char FirstName[50]; char LastName[50]; char ID[20]; }; // define class for queue class queue { public: queue (void); int AddPatientAtEnd (patient p); int AddPatientAtBeginning (patient …

Member Avatar for kal_crazy
0
1K
Member Avatar for ThisIsMeOrIsIt

Hi all - I need to write a program that reads in an array of strings from a file and uses a radixSort method to sort and print the array based on what characters they are composed of. The implementation should be able to handle strings of characters. The characters …

Member Avatar for mas971
0
4K
Member Avatar for nirmeen.asad
Member Avatar for nirmeen.asad
0
1K
Member Avatar for nikolaos

ProducerConsumer_Using_ExecutorService class in a for loop initiate producer consumer threads using worker threads from ExecutorServiceThreadPool class. consumer thread takes an element from queue adding it to ArrayList consumerdata. Seems that consumerdata has no elements. why is that; Both producer - consumer threads seem to work. import java.util.ArrayList; import java.util.Iterator; public …

Member Avatar for nikolaos
0
5K
Member Avatar for Swirly

I am trying to create Dijkstra's algorithm for a weighted graph, and have a flaw, I believe, in the implementation of the basic algorithm. It only visits the nearest nodes, checks the edges, but nothing else. Right now, I'm afraid I'm too close to this to see what's going on. …

Member Avatar for kal_crazy
0
282
Member Avatar for COKEDUDE

Can someone please tell me why I keep getting a stack overflow when I try to create nodes in a priority queue? class Node { public int frequency; // data item (key) public char character; // data item public Node leftChild; // this node's left child public Node rightChild; // …

Member Avatar for JamesCherrill
0
427
Member Avatar for phorce

I don't know why I'm having such a problem with this, basically, I want to have a Queue that is constantly running during the program called "Worker" this then works, however, every 10 seconds or so.. Another method called "Process" comes in and processes the data. Let's assume the following, …

Member Avatar for woooee
0
271
Member Avatar for JohnKelly

I am tryinh to send a number 123456 on a MSMQ. What goes onto the queue is 46 bytes as it is in XML. Another application is also writing to the queue and it only sends 6 Bytes to represent the number. I have tried putting the queue formatter into …

Member Avatar for Begginnerdev
0
87
Member Avatar for cmps

Hello I ma trying to practice on Data structure using java. I solved a lot of problems but this one looks interesting but I need some help understanding what I really have to do ... > write a program that simulates the operation of a busy airport that has only …

Member Avatar for bodiddly123
0
679
Member Avatar for dendenny01

Whenever I try to run this code in turbo c++ 4.5 I recieve an error "General Protection Exception List.c 60 List(2) 0x24DF:0x0157 processor Fault" whereas when the same Program is run in Turbo c++ 3 Dos version It Compiles and Runs Propely without any error. Please Help. #include <stdio.h> #include …

Member Avatar for Ancient Dragon
0
925
Member Avatar for blob84

Hello i implemented this FIFO queue: #include <stdio.h> void enqueue(int *, int); int dequeue(int *); int qempty(void); int head = 0; int tail = 0; int qerror(void); #define N 4 int main(void) { int i = 0; int v[N]; while (i < 10) { enqueue(v, i); i++; } while (!qempty()) …

Member Avatar for Nutster
0
11K
Member Avatar for somjit{}

[Version 1](http://www.daniweb.com/software-development/java/threads/462737/generic-resizing-circular-array-.-do-i-need-to-implement-iterable-) had quite a few problems that i didnt think about. A lot of them were pointed out in the replies. I tried to correct them as best as i could to make this code. However , I'm having some doubts regarding what to do while implementing the Collection …

Member Avatar for somjit{}
0
297
Member Avatar for somjit{}

Since the underlying data-structure used here is an array , which is itself iterable via `for-each()` , i'm wondering how much benefit implementing `Iterable` will provide here. I would appreciate if someone could review my code and suggest any further improvements. **Code:** import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; class ResizingCircularArray<E> …

Member Avatar for somjit{}
0
1K
Member Avatar for hahanottelling

Can anyone help me with displaying text in a C++ window? I've read the chapter 9 at winprog but it makes no sense to me. here's the code I'm using: [code]#include <windows.h> #include "resource.h" /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class …

Member Avatar for Nick_3
0
5K
Member Avatar for Plazmotech

Basically - I'm looking for the best game structure. Here's the idea that I have # IDEA *Class* - **GUI** - Can be customised to contain buttons and to do specific things. This can simply have an event handler function that returns the index of which button was pressed. *Class* …

Member Avatar for mike_2000_17
0
229
Member Avatar for nelson mark

8) what is the reason for disabling the ssid broadcasting and changing the default ssid on a wireless access point? a)wireless clients must then have ssid manually configured to connect to the wireless network. b)he accesses point stops broadcasting its own mac address thus preventing unauthorized wireless clients from connecting …

-1
81
Member Avatar for nitin1

today is "Rakshabandhan". I don't think many of you have heard of this. in this, sisters tie a band type something on their brother's wrist and in return brother gove gifts to them and they pray for long life of each other. we eat sweets and dance and we have …

Member Avatar for nitin1
0
127
Member Avatar for leonidas007

i've being trying to fix the error in my code for quite some time but am unable to resolve one or two of the errors like expected primary-expression before 'public' main.cpp:211:22: error: expected ';' before 'public' main.cpp:216:23: error: expected '}' before 'else' i am a beginner in programming # include<iostream> …

Member Avatar for mike_2000_17
0
152
Member Avatar for JohnKelly

Dear all I have a private MSMQ on a server in workgroup mode (SBS 2011) On a client I can see the queue using System.Messaging.MessageQueue.GetPrivateQueuesByMachine(servername) and am able to read the name of the queue. I am able to write to the queue but am unable to retrieve anything from …

Member Avatar for Begginnerdev
0
139
Member Avatar for Frank_5

//Author: Frank R. Mendez //Title: Object Oriented Queue //Description: This is program uses double linked list to store data in the queue its functions are enqueu,dequeue and display queue. //Hope it can help you in you future projects. Good vibes to all programmers! #include <iostream> using namespace std; struct Node …

Member Avatar for rubberman
0
2K
Member Avatar for rudasi

I have 2 processes (producer and consumer) sharing an int deque in shared memory, I have the producer process put 2 numbers in the deque and then it gets in a wait state losing its mutex lock. I then have the consumer process removing the numbers and printing them. It …

Member Avatar for rudasi
0
520
Member Avatar for newbie14

We have socket application which sends out quite a number of email out. So we decided to send huge number message into it which will trigger emails. Eventually we see the email are taking hours before it reach any of the inboxes either gmail,hotmail or yahoo etc. We have this …

0
417
Member Avatar for srinivas.rambha

import serial import threading import Queue import Tkinter as tk class SerialThread(threading.Thread): def __init__(self, queue): threading.Thread.__init__(self) self.queue = queue def run(self): s = serial.Serial('COM10',9600) while True: if s.inWaiting(): text = s.readline(s.inWaiting()) self.queue.put(text) class App(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.geometry("1360x750") frameLabel = tk.Frame(self, padx=40, pady =40) self.text = tk.Text(frameLabel, wrap='word', font='TimesNewRoman 37', …

Member Avatar for m_ishwar
0
1K
Member Avatar for papazulu

My account with Programming Forums has been activated but I cannot post in forums. It is saying that I am in moderation queue. I just a few days ago and would really like to make use of the forum. Any assistance with this would be appreciated. papazulu

Member Avatar for BigPaw
0
541
Member Avatar for Yongsmith

I am going to compile a small python program in order to use Queue to produce a random with a thread. For example, using one thread to print odd number, while another thread to print even number. Here is my codes, please offer me some advice: import threading import random …

Member Avatar for Lucaci Andrew
0
179
Member Avatar for suavedesign

Hi, I am creating a website using a predesigned template. There is some javascript that enables the user to zoom in on an image. I dont know javascript, and I want to know how to disable the zoom for some images. This is the link to my site:[http://www.suavedesign.net/works.html](http://www.suavedesign.net/works.html) Please go …

Member Avatar for iamthwee
0
2K
Member Avatar for mdfaisalamin

Hi, I am trying to read a CAN Stick with a USB interface and I am connected to a sensor module. I have a program which transfer sensor data from the embedded controller to the CAN Stick. There is a program which use an internal queue to transfer data from …

Member Avatar for mdfaisalamin
0
427
Member Avatar for daniel1977

Im having a problem with the following exercise. I have the whole program working, however, the transaction time is not passing to the customer. The only element that this affects is the time that the customer leaves. Anny assistance would be greatly appreciated. Best, Dani Below are the 5 files …

Member Avatar for dexblack_1
0
624
Member Avatar for grubby

Hi,I am a c++ beginner. I am using vs,and I got a problem in my code which check a sentence whether a palindrome or not. #include <iostream> #include <stack> #include <queue> using namespace std; int main () { bool palindrome = true; char character; StackType stack; Queue queue; char stackChar; …

Member Avatar for Lucaci Andrew
0
3K
Member Avatar for Doze_4u

I'm a little confused with an assignment here and i just needed someone to point me in the right direction. Design an inventory class that stores the following members: serialNum : An integer that holds a part’s serial number. manufactDate : A member that holds the date the part was …

Member Avatar for joshua.klaser
0
351
Member Avatar for shilu2

I have tried following code index.php <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>JQuery Popup Demo</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript"> function openOffersDialog(x) { $('#overlay').fadeIn('fast', function() { $(boxpopup).css('display','block'); $(boxpopup).animate({'left':'30%'},500); $('#content').html(x); }); } function closeOffersDialog(prospectElementID) { $(function($) { $(document).ready(function() { $('#' + prospectElementID).css('position','absolute'); $('#' + prospectElementID).animate({'left':'-100%'}, 500, function() …

Member Avatar for mrvijayakumar
0
339
Member Avatar for CloudZELL91

hi there... first of all i dont know where to post this,but still its a java thing so i post it here.. ...i need help on this,,dnt know how to fix,, when i play video or a video chat,,it failed to load and have a java application error, down is …

Member Avatar for ccbutler
0
338
Member Avatar for nilou.far.79

I am writing a program for a clinic now. here is my code ,the problem now is I need to write 2 functions for my program The first function : is to capture time of registration The second function: is for treated time of patient -each patient can consult DR …

Member Avatar for CodyOebel
0
230
Member Avatar for c0DEZOMBIE

Help needed with a function problem I really cant solve. Why is it that RegOpenKey() returns error success even though it fails. First it fails to return a handle with a valid Registry key/address filling the key paramater with nothing 0 but returns 0 aswell indicating an error_success right? because …

Member Avatar for c0DEZOMBIE
0
469
Member Avatar for ktsangop

Hi everyone, I am a C/C++ winapi developer and have to rewrite a "Dialog based" application in java, so that it will execute as an applet in any browser. My java skills are very few, since my knowledge is limited to past college classes. The application is not a large …

Member Avatar for ktsangop
0
376

The End.