Member Avatar

Hello! So I have this homework that i have no idea how to continue. this is an exemple of input,but i have to do it for a general one: **7 pencils car ball candy tshirt bike video_game Mike Andrew Inna** and the output must be like this: **Mike: pencils candy video_game Andrew: car tshirt Ioana: ball bike ** we have to use a queue and this is what I wrote,but I don't know what should i do next. Can Somebody help me,please? #include <iostream> #include<queue> #include<vector> #include<string> #include<cstring> using namespace std; int main() { int n,j=0; queue<string> cadouri; vector<string> names; …

Member Avatar
0
19
Member Avatar

Hi all, I searching for how to make autocomplete in textbox. however there are list contain fruits name. "Apple" "Banana" "Pear" "Orange" When i type "Ap" in textbox, program will completed the text and highlight the fruit name in listbox. How i can do this. Thank you

Member Avatar
0
1,221
Member Avatar

Im looking for the "best" GUI builder for java. I use Eclipse to write my scripts, and i would appreciate you guys telling me your favourite GUI Builder and the reasons why. Thanks

Member Avatar
0
1,333
Member Avatar

Hi, Could somebody provide me with an example of how to display data (some text) in a combobox? Thanks Collin

Member Avatar
0
5,753
Member Avatar

hi there i have some python coding which i need to convert to java can ne1 help me please email me back if you can help then i will show you the coding much appriciated

Member Avatar
0
63,570
Member Avatar

Below is a program that asks the user to input a username and password. Once logged off the user is asked to re-enter their username and password. Is the program correct where it checks if the username and password input before is correctly input again?. Any help would be welcome Regards Mark # program that checks that the username and password are correct # username = input("Please enter your username : ") password = input("Please enter your password : ") print ("Greetings," , username, "you are now logged in now with a password") command = input("Please type a command :") …

Member Avatar
0
67,064
Member Avatar

Is it possible to store a certain function as a variable? If not, is it okay to make a class, and define a function. Store the class as the variable and invoke that function?

Member Avatar
1
24,256
Member Avatar

I got bored of revision last night, and decided to have another go at python! So to refresh my memory and have a bit of a practice I wrote a quick phone-book program. I'd be grateful if y'all could give me some tips and ways to improve on it/make it more efficient :) It only seems to run in idle though - when I run the actual python file - the menu doesn't work. [CODE]import os class Phonebook: def __init__(self): self.phonebook = {} self.phonebook_file = 'Phonebook.txt' def loadAll(self): #Clear the phonebook dictionary self.phonebook.clear() #Load all of the items from the …

Member Avatar
0
6,815
Member Avatar

guys sorry about my post earlier . this is what i did with my program but i dont think my equation is correct because whenever i want to get the total amount due it always give the wrong amount . i dont thinks this equation is correct "amount=amount+price*quant;" guys i need your help. Thank you! #include<iostream> #include <windows.h> using namespace std; void gotoxy(long x, long y) { COORD pos = {x, y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); } main() { char name [25]; int order; int quant=0; int amount=0; double cash; double change; char again; char another; int a, x; int cq=0; do …

Member Avatar
1
7,437
Member Avatar

Develop a java program for a grading system tha satisfies the ff requirement:\ 1. for passing an exam, a student must pass by a score of 30 or more and assessment of 20 or more to be issued a certificate 2. if a student score a total grade of 49 for both exam and assessment, the student is condoned 3. if a student satisfy both requirement 1 or 2 and paid their fees in full (thus $100), they're issued with certificate 4. the student is deemed to have failed if he doesnt meet requirement 1 or 2 5. however, the …

Member Avatar
0
4,792
Member Avatar

I run Python 3.x on a Windows 10 laptop and I have a daily routine that involves opening three Python scripts in succession, and running them all concurrently, each one in its own, separate instance of Idle. I have been wondering whether I could automate the entire process. I imagine this might need to involve some sort of Windows batch file initially to open each Idle instance and, within each instance, to open and run a Python script. I don't even know whether such a sequence of actions, stepping between Windows batch file programming and Idle application programming, is possible; …

Member Avatar
0
96
Member Avatar

Hi. I have a little problem with my code. I want to cast a complete arrayList to a different type, but java wont let me... Here is a compressed version of what is happening: [CODE] //The interface I use. public abstract interface Drawable{ //some methods } //A class that is supposed to be drawable public abstract class pObject implements Drawable{ //Methods } //A class that works magic on the objects public class engine{ ArrayList<pObject> obs = new...; //Method returning the pObjecs, that is drawable public ArrayList<pObject> getList(){ return obs; } } //The rendering work horse public class drawer{ arrayList<Drawable> draw …

Member Avatar
0
5,186
Member Avatar

For those who are afraid of lycanthropes and full moons, here is a way to figure out the phase of the moon.

Member Avatar
2
3,809
Member Avatar

Hi! I have been developing and distributing Standalone Java Products in my local market for 4 years. My products include, POS Softwares for Retail and whole Sale Businesses and for Food Businesses such as Restaurants and cafes. I use Apache Derby Database which is also known as 'JavaDB' as database and it works perfectly. I have also used JavaDB in a Cient Server Architecture (e.g if my customer has 3 PCs, and he wants to centralized database on his one Physical Server). For database in Local Machine I used following Connections Strings: String dbdriver = "org.apache.derby.jdbc.EmbeddedDriver"; Class.forName(dbdriver).newInstance(); con = DriverManager.getConnection("jdbc:derby:C:\\QuintexDB; …

Member Avatar
0
56
Member Avatar

Can someone please tell me how to send data from my program to excel. I have a loop which is iteratively printing values to the console: [code=c]printf("16 Bit:\n\n"); for (n=0;n<numberOfValues;n++){ printf("%.4x\n",rand16()); }[/code] but i need to send them to excel for analysis!! Please help

Member Avatar
0
2,916
Member Avatar

Hello. I'm new to the whole Linux thing and I have something for a topic. In Windows you can produce characters with accents via a shortcut. For example: " followed by e brings forth ë. I miss this in Linux. Somebody told me that I should ask for help writing software by myself to make this possible. That's why I opened this topic. I'm not very experienced with programming. The only thing I ever did is creating a game. It's not even finished. I have a Github account. I'm hoping to meet someone who gets me through this. Thanks, Leon

Member Avatar
0
88
Member Avatar

I'm looking for a .NET tool/component I can use in WinForms that works like [mermaid](https://mermaid-js.github.io/mermaid/#/) but does not require a browser component. Something that generates an image is preferred.

Member Avatar
0
138
Member Avatar

I'm trying to learn how to do some simple things with MFC - I'm not used to the toolkit. I want to load a png image from disk and display it at a chosen location in the program's window, but am getting a debug assertion error: atlimage.h Line: 1624 Expression: hBitmap == m_hBitmap ----- The only initialization is: CImage genericImage; genericImage.Load(fName); (it returns normally, with no errors) Inside the WM_PAINT routine, the code is a simple: genericImage.Draw( hdc, 0, 0); Any ideas? It fails to paint anything if I ignore the debug error, and I can't find any suggestions in …

Member Avatar
0
76
Member Avatar

Unable to open file with fstream. it always seems to jump to the else statement and gives me the error message "Error: can't open input file ". I have included in the header file [CODE]#include <iostream> #include <fstream> #include <sstream>[/CODE] and in the class file i have the following code and yes i do have a txt file called studentFileName.txt in the same directory. [CODE]void StudentRecord::addFile(const string& studentFileName){ ifstream infile; infile.open ("studentFileName.txt"); if (infile.is_open()){ string line, word, StudentName, ProgramCode; while(getline(cin, line)){ istringstream stream(line); while (stream >> word) { int i = 0; if (i % 2 == 0) { StudentName …

Member Avatar
0
3,583
Member Avatar

Having problem in pin code if the user will input less than 4 digit number and a character type..could some1 help me from this.. (@@, #include<stdio.h> #include<conio.h> #include<iostream.h> float choice2(); float choice3(); float ball[11]={1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,1000}; float mypin; float withdraw, deposit; int transaction, myaccount; char transaction1; main() { pin:{ system("cls"); printf("Enter pin code: "); scanf("%f",&mypin); } if (mypin==1234) { myaccount=0; } else if(mypin==2345) { myaccount=1; } else if(mypin==3456) { myaccount=2; } else if(mypin==4567) { myaccount=3; } else if(mypin==5678) { myaccount=4; } else if(mypin==6789) { myaccount=5; } else if(mypin==7890) { myaccount=6; } else if(mypin==8901) { myaccount=7; } else if(mypin==9012) { myaccount=8; } else …

Member Avatar
0
5,158
Member Avatar

I am very new to VB.NET. That said, I have developed a windows form that utilizes an SQL Server back end. I am developing using Visual Studio 2008 and the 3.5 Framework. The SQL server is 2005. I do not have any warnings or errors, and the project compiles without error. When I run the install package on another computer, everything appears to install correctly, and the shortcut is placed on the desktop. However, when opened, the cursor goes into wait mode for a few seconds then returns to normal and the form does not open. I am using windows …

Member Avatar
0
891
Member Avatar

Now I am going through a project with colors. And then I think that if I try to display color values with their names in a simple combobox, it could be amazing. I tried and did it and it is looking like ![Capture3.png](/attachments/small/4/4473f7608016edcb5981090cccc80593.png "align-left") And ![Capture4.png](/attachments/small/4/87a5e5686d66033648a3e0ab787d6778.png "align-left") And finally the project looks like ![Capture2.PNG](/attachments/large/4/28adcd5b3021552683dc4fd791d2f813.PNG "align-center") In that codes, firstly I tried to bind combobox with colors. Private Sub BindWebColors() 'binding combobox with color vaues 'assign combobox drawmode cmbWebColor.DrawMode = DrawMode.OwnerDrawFixed cmbWebColor.ItemHeight = 20 Dim colType As Type = GetType(System.Drawing.Color) For Each prop As PropertyInfo In colType.GetProperties() If prop.PropertyType Is GetType(System.Drawing.Color) …

Member Avatar
0
3,797
Member Avatar

If you run the following code (on Windows 7, Python 2.6.5), you should see a light border around a black square and some text below it. How do I get rid of that border? Thanks! [code=python] from Tkinter import * class App: def __init__(self, master): #background frame self.bgFrame = Frame(master, bg="black", bd=0) self.bgFrame.grid() #image area self.canvas = Canvas(self.bgFrame, width=200, height=200, bd=0, bg="black") self.canvas.grid() #some filler text self.title = Label(self.bgFrame, text="Hi there.", bg="black", fg="white") self.title.grid() root = Tk() app = App(root) root.mainloop() [/code]

Member Avatar
0
5,282
Member Avatar

What's the best cloud accounting software for small businesses that handle multiple sales tax rates? Or is there an affordable web-based small business accounting software?

Member Avatar
1
197
Member Avatar

So i have to create a programm that reads 7-49 numbers and makes all posible combinations (6 number each) from the given numbers. Do you know how can i do this? I dont ask for the code ready but i cant think of a way i can create the combinations.

Member Avatar
0
121
Member Avatar

classification of a text in a corpus with five themes and each theme contains 10 items in perl for exemple: i have: 1 theme food 10 articles about food 2 theme politic 10 articles about politic ...etc and i give him a new text and he classify this text on the appropriate theme using: - K-means or - decision tree or - segmentation or -naive bayesien Pleeeeease help me

Member Avatar
1
568
Member Avatar

Hello clever people, Completely new to VB.NET (only installed Visual Studio 2019 in the past couple of days). To start all I want to do is open Excel (office 365) from a button on a userform. The location of the file is on a network, lets say: - \\file-svr01\Rozel\Design\Parts\PNG.xlsx OR R:\Design\Parts\PNG.xlsx I don't need to read in any information from the spread sheet, just open it so thgat i can edit it. Please bear in mind I am completely new to VB.NET, so if I have to initialise anything in the code before trying to open excel, it would be …

Member Avatar
0
242
Member Avatar

Hi! I'm trying to improve a code shown below. My idea is to add multiple images to JPanel. It sounds like an easy task, but all my attempts failed so far. I tried to create [ICODE]Image image2 = getToolkit().getImage(Drag1.class.getResource("cross_cursor.gif"));[/ICODE] and then [ICODE]bi2 = new BufferedImage(image2.getWidth(this), image2.getHeight(this)...);[/ICODE]. But I can see only one image on the JPanel. Could anybody help please? Thanks a lot! [CODE] import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.MediaTracker; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionAdapter; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import javax.swing.JFrame; import javax.swing.JPanel; public class Drag1 extends JFrame { DisplayCanvas canvas; public Drag1() …

Member Avatar
0
1,460
Member Avatar

What "Hello World" is to the console, the "Bouncing Ball" is to the Graphical User Interface. Nothing fancy, the ball is created via a call to the API function ellipse() and then bounced within the confines of the windows form. For the DEV C++ crowd: Let me know if you find these snippets somewhat helpful in your learning process in the comments section at the end.

Member Avatar
2
21,969
Member Avatar

The printer seems to be a much ignored computer peripheral when it comes to programming. This little code snippet explores one way to send text to the default printer. It actually draws the text into an imaginary box on the paper. You can specify the upper left and lower right corners of this box.

Member Avatar
2
2,902

The End.