132,726 Archived Topics
Remove Filter ![]() | |
[CODE] //clrscr.h #pragma once #include <windows.h> #include <iostream> #include <conio.h> using namespace std; void clrscr() { COORD coordScreen = { 0, 0 }; DWORD cCharsWritten; CONSOLE_SCREEN_BUFFER_INFO csbi; DWORD dwConSize; HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); GetConsoleScreenBufferInfo(hConsole, &csbi); dwConSize = csbi.dwSize.X * csbi.dwSize.Y; FillConsoleOutputCharacter(hConsole, TEXT(' '), dwConSize, coordScreen, &cCharsWritten); GetConsoleScreenBufferInfo(hConsole, &csbi); FillConsoleOutputAttribute(hConsole, csbi.wAttributes, … Software Development c++ | |
Please help me out guys I can't fully understand how this code works but I know some about it and I'm also unsure of such things about how it operates. [CODE]#include<iostream.h> #include<conio.h> int main() { for(int i=1; i<=6; i++) { for(int f=1; f<=i; f++) cout<<"*"; cout<<endl; } system ("pause"); return … Software Development c++ | |
Question on getting my class to work with a project I am working on oldY = changeY1(pos1[0]); I call the changeY1 function in my main and am setting a int = to the value returned,I am declaring this function in a seperate class of its own : [CODE] #ifndef INTERVAL_H … Software Development c++ | |
i'm making a quick class that has some getters and setters. i'm getting an error at line 46 when i try and create my setItemNumber function. Im also getting an unexpected EOF error but i think that it might have to do with my first error. this is my code.... … Software Development c++ | |
The purpose of my program is to have the user to enter a word to be checked to see if its a palindrome or not. My program works in Visual Basic...but i have to turn it in to my teacher through SSH. When I run my program there this is … Software Development c++ queue visual-basic | |
Making a Game for a school project and Im using a 2D array to make the gameboard. Well in the begginning of the game the user has to input what the current game board looks like. I have it so the user is entering data and the data is being … Software Development c++ | |
Hi just wonder how I can use commandbutton ( caption Letter A) click event to read names from an random file that just corespond to letter A in to an listbox. Software Development visual-basic | |
I am starting to feel completely dumb when it comes to VB.Net coding. I am using Visual Studio 2010 and am trying to compare the numbers in 2 listboxes. If an item from list A matches an item from list B, I want it to add that item to List … Software Development vb.net visual-studio ![]() | |
Level 2 Version B - Level 2 above plus Use of classes and objects to store and manipulate the item data Example • Write a new class ‘Event’ to represent details of sports event objects. A sports event consists of (for example) the event title, year and venue (“Olympic … Software Development java java-swing | |
Hello, Let me introduce to you my problem first, and then you guys should decide on the best method to take upon it. My sister has lately been HELLa annoying with her crush over Justin Bieber, and it's really starting to get to me not to be able to think … Software Development c++ | |
I've created a ray distribution method that generates rays over a fixed angle with an even distribution along the xz plane. [CODE] /// <summary> /// Generates rays that are evenly distrbuted in a circular formation around a point but are restricted to an angle /// </summary> /// <param name="point">The point … Software Development algorithm | |
Is it better to write the void funtion before the main funtion, or write it below the main function and mention it "prototype" it before the main? I know both works, but im wondering if the program uses a bit more time searching for it when its below the main … Software Development c++ | |
Hi everyone. Well I've been trying to figure this out for a quite a long time now by looking at some examples and searching the web, reading some tutorials and so on, but I don't even know where to start yet. Can you explain to me about the sprites too … Software Development pc-peripheral python | |
Hi, just joined this website as you guys seemed like the perfect people to ask for help, I'm creating a database system using python for car rental with tables customers,cars,and rentals. The customer table is fine but on my add_cars() function which adds a new car it is showing some … Software Development python | |
Hello all,quick question. I have to (not my option,has to be that way) make an array with huge length, definitely more than 100.000 ,maybe 1 million. But if i use a non-integer position counter (don't know the english word for it, like myArray[i] and i is not integer) i get … Software Development c | |
I've created a function which creates a new password. But I want a function to store it in a text file from which it will be called when the program is started. Also how do I make an edit or delete password function? As the password will have to be … Software Development python | |
[B]!USING PYTHON 3.1![/B] [B]USING WINDOWS[/B] I never thought it could be so simple. However I should have clarified that it's a [B]1 character[/B] input. But the general idea is the same. Someone suggested that I explain what is going on better, so I'm going to do that. The function 'getch()' … Software Development python | |
TEX] I have this code but can not get it to display the numbers the way i want. I want the display 1 21 . . . n-2)......1 (n-1).......1 n (n-1)... 21 My code is[/TEX] [CODE]public class print{ public static void parttens() { int w=4,t=0; int k = 1; int[]array=new … Software Development java | |
How do I split a string by 2 characters? lets say I am parsing a html page, and you have lots of tags such as <html> <title> blah bahl </html> If I wanted to split by <title></title>, how would I do that? my goal, is to get the strings within … | |
i have a datagridview which has a column name of tableNumber. i would like to fill this column from the code. this is my method which i call in formload [CODE]public void GetAndFillReservationTables() { ManagerTableReservation mgrTableReservation = new ManagerTableReservation(); for (int a = 0; a < dgvReservation.Rows.Count; a++) { int … Software Development | |
i have to create a soccer tournament like the world cup that starts off with 32 teams that goes down to 16 then quaters, semis and final i have to use sort stacks or queues or even linkedlist. there must also be arrays, classes. gui for bonus marks but i … | |
How to pass radio button's value to another frame i only know how to pass label and textfield value but not radiobutton. is there anyway to take the value from radiobutton to another frame? this is the code of mine how to pass label and textfield [CODE]public void actionPerformed(ActionEvent e){ … Software Development java | |
Hello Firstly - sorry to Mitja and kimbokasteniv who replied to this question a few days ago. I know your answers are correct, and I thought I understood but I don't. Or at least I don't know how to apply what you have said. My fault. Both my brain and … Software Development linked-list | |
Hello, I'm new to c++ and i'm making program to read from numbers from file and calculate average. The numbers in file is like this [CODE]10; 15; 200[/CODE] and my source so far [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream … Software Development c++ open-source | |
I have a file with 190 lines, that goes something like this: [QUOTE]Antigua,English,Local dialects Bahamas,English,Creole Barbados,English Belize,English,Spanish,Mayan,Carib Canada,English,French Costa Rica,Spanish,English Cuba,Spanish [/QUOTE] First field is the country, following fields are the different languages spoken in that country. Since some countries have more languages than others, I am stuck trying to … Software Development c | |
This works with Python 2.7 [code]class B: def __init__(self, arg): print(arg) class C(B): def __init___(self, arg): super(C, self).__init__(arg) c = C('abc') # abc [/code]Here super() gives a TypeError: must be type, not classobj [code]from math import pi class Circle: """with Python3 object is inherited automagically""" def __init__(self, r): self.r = … | |
Hi,All I'm now working in project to compress a files. And I used Huffman encoding to get new code for each character in the site. but now I can't complete my project. How can I use bitwise operation to put all those new codes into the compression file. and Also … Software Development c++ | |
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at DatabaseTwo.manufacturerSearch(DatabaseTwo.java:81) at SearchManufacturerScreen.searchForManufacturer(SearchManufacturerScreen.java:241) at SearchManufacturerScreen.actionPerformed(SearchManufacturerScreen.java:192) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at … Software Development java java-swing | |
I dont know what the problem...seems the button didnt work at all..~ help me find the problem plss... [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class listOfMovies extends JFrame implements ActionListener { private JLabel jlbWelcome, jlbPick; private JButton jbtBatman, jbtAngels, jbtDue, jbtFaster, jbtFour, jbtHuman, jbtWarrior, jbtWater, jbtHarry; public listOfMovies () … Software Development java java-swing oop | |
Hi, I am writing a student database in C++. There comes a point in my program where I have a succession of "cout's" requesting the user to input the students grade for a particular course. I want to check that the input is not less than 0 or greater than … Software Development c++ | |
I've been working on this for quite a while. Everything works except for writing and reading my Vector<Question> questionList to and from my binary file. The file is created as it should be and the rest of the program works ok, but I'm not sure what I'm doing wrong with … Software Development file-system java | |
Hello.. I made a java chat application which transfers files from between server and client. The thing is that i used sleep() method to make the progressbar go slow. I want the progress bar to progress according to the progress of work done.. I dont know about EventQueue ... Any … Software Development client-server java | |
We have to write a program to convert a user entered Kelvin temperature to either celsius or fahrenheit and also display the state of the water. I found the same question on here and used it to fix some problems I was having, but I still can't compile and I … Software Development c | |
I'm trying to get sounds to play from python. I've tried Winsound, snack, and now Pygame. Winsound only seemed to play windows preset sounds (which aren't so useful), snack did nothing, and Pygame is raising a memory error on a 2 second mp3. Is there something obvious I missed in … Software Development python | |
I am getting nullPointerException at this point and this is my code: [COLOR="Red"]int reservationID = Convert.ToInt32(dgvReservation.Rows[a].Cells[0].Value.ToString());[/COLOR] [CODE]public void GetResrervationTables() { ManagerTableReservation mgrTableReservation = new ManagerTableReservation(); for (int a = 0; a < dgvMenuItems.Rows.Count; a++) { int reservationID = Convert.ToInt32(dgvReservation.Rows[a].Cells[0].Value.ToString()); List<int> listOfReservationTables = mgrTableReservation.GetReservationTablesByReservationID(reservationID); string tables = ""; foreach (int t … Software Development | |
:confused:If there [COLOR="Red"]exists a [B]class [I]lock[/I][/B][/COLOR] and [COLOR="Green"]from this class [I]different [B]thread objects[/B] or [U]different [B]objects[/B] & there corresponding [B]threads[/B][/U][/I] are created[/COLOR], may they [B][I]run[/I] simultaneously[/B]?:?: e.g. [ICODE]public class Smiley extends Thread { public void run() { while(true) { try { synchronized(Smiley.class) { System.out.print(":"); sleep(100); System.out.print("-"); sleep(100); System.out.print(")"); sleep(100); } … Software Development java | |
Hello, I want to code an application that calculates a program's complexity. I may have put this the wrong way: I want to count the operators, variables, function calls etc. in a C/C++ program. At first I thought about reading the .C file as a .txt file, looping through each … Software Development c++ | |
hai friends, Am developing java project with client server interaction, am getting the Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: Java heap space Exception, i doknow how to solve this ,please help me in this. Software Development client-server java | |
Hey i have a project that i have put the Questation at the end of this message i am a newbie to java and have make this my mainly Questation how do i put somethin in my arrays from GUI ?? and how do i search in name or id … Software Development gui java java-swing | |
I need help on making an isosceles triangle 2sides with 5 asterisks, and a base with 9 asterisks, and has no asterisks inside the triangle. I've come up with the codes on a 2sides with 5 asterisks and the base with 9 asterisks, but this time, it has asterisks inside … Software Development c++ | |
[B]Book_Return_form[/B] [COLOR="Red"]Book_tag_id=textbox1 Member_id=textbox2 Book_return_on=textbox3 Book_due_date=textbox4 Fine=textbox5[/COLOR] [COLOR="Green"][B]In this form when I put book-tag_id the rest items come automatically a/c to database and I hv done all till textbox4(book_due_date). Now problem is with fine(textbox5) Fine is calculated acc to membership_type,there are three types of membership silver,gold,platinum Fines are:silver=30,gold=20,platinum=30 so the calculated … Software Development open-source | |
Hi guys! I have a code: [CODE] String Lastlogon(string username, string domain) { try { { DirectoryContext context = new DirectoryContext(DirectoryContextType.Domain,domain); DateTime latestLogon = DateTime.MinValue; string servername = null; DomainControllerCollection dcc = DomainController.FindAll(context); foreach (DomainController dc in dcc) { DirectorySearcher ds; using (dc) using (ds = dc.GetDirectorySearcher()) { ds.Filter = … Software Development c# file-system windows-server | |
hello, I've just added a data source to my project. In the book I follow, it says that I should be able to drag a table from the data sources window and drop it onto a form. This would create a control for each field of the table. I want … Software Development | |
There are errors in lines : [B]9,14,28,47,,49,38 & 66[/B] please can u give me solutions to these and thank for reading this. [CODE]CdRecord[] arrayrecord=new CdRecord[5]; int counter = 0; int result; CdRecord one = new CdRecord(); menu_choice=Integer.parseInt(JOptionPane.showInputDialog("Enter 1 to create cd" + "\nEnter 2 to print" + "\nEnter 3 to … Software Development java | |
How to fill a combobox with a data stored in a table in sql server?.... Can we use stored procedure to do so? I tryed this code but it keeps giving an error message: "An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll" What does that mean???? My code: Private … | |
Write a program that evaluates an expression.assume the operands are integers and operators are +, −, *, /. Please help me. Software Development java | |
[ICODE] Private Sub cmdAddCart_Click() Module1.toConnectProc Set globRSRecordset2 = New ADODB.Recordset globRSRecordset2.Open "SELECT * FROM tblBooks, tblTemporary WHERE tblBooks.Title = '" & Trim(Me.txtTitle) & "'", strVar, adOpenKeyset, adLockOptimistic With globRSRecordset2 .AddNew tblBooks.ISBN = tblTemporary.ISBN tblTemporary.UserID = ID !DateReserve = Date !Notes = "Fair" MsgBox "Added to Cart", vbInformation, "Add to Cart" … Software Development visual-basic |
The End.