199,114 Archived Topics
Remove Filter ![]() | |
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 … | |
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 … | |
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 = … | |
Find the running time complexity of the following piece of code and show [CODE]your working step by step. y=0; x=0; for (i=n; i>0;i=i-1) { y=y+1;} for (i=1;i<=n;i=i*3) { for (j=1;j<=3n;++j) { for(k=0;k<n; k=k+5) { x=x+5; } } }[/CODE] Please guys help me out solving this question ..... | |
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 … | |
Hello! Can somebody help me. It's got to be quite easy but still I can't solve the problem. I have Form1 then I press the button and create another Form2. If I click the button for example three times there will be three Form2. All the Forms have textBox. What … | |
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 … | |
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 () … | |
Hi all, was wondering if I could get some help with my code. I want to be able to insert a person and details into a database, however i keep getting a syntax error, and not very experienced so was hoping some one here could help. thanks dbConfig.php [code=php]<?php // … | |
![]() | Hi there, I'm trying to do a Username validation with JQuery but I'm not sure how to get a "TRUE" from the first section of code before going to the next section which is an ajax call to the backend. Below is my code. [CODE] $(document).ready(function() { $("#username").change(function() { var … ![]() |
hi there im new to php and im currently building my website .,it's more like an online store and i would like my products to be listed in a gridview., i have a database and my only problem is how to display the images .., i've already displayed some info … | |
[CODE]<a href="javascript:document.apply.submit()" >Submit</a>[/CODE] I use this all over my website. It works great every where but on one page. The error is document.apply.submit is not a function. I would include the code but the page really long. Anyone have any ideas what would cause this error? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Greetings Everyone, The Scenario is, we are incorporating a js calender into a page, as usually, there is a issue with calender clip location, the css of calender is in javascript, i have tried targeting firefox enough with tags like (firefox, -moz-binding:, load-mozilla-css, ff4) in the following code snippet [CODE] … | |
: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); } … | |
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 … | |
I am having a problem in counting the user that visit to a website of mind using php. I want to count those user by day, week, month, in total and store them in MYSQL database. I have been searching through lots of site and still cannot figure it out … | |
Hi all.. I got a problem here on how to handle the form submission. The problem is like this.I got two part of the form which i want to get the data from the user for the events that he/she want to promote. [B](1)[/B]The first part is that I want … | |
I just would like to know how to do this? Just like facebook! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam fermentum posuere arcu lobortis mattis. In eu nisl turpis. Praesent mi dui, dignissim et rhoncus nec, sodales vel sapien. In hac habitasse platea dictumst. Etiam quis felis vitae … | |
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. | |
hi all...i need your help.. i'm using method to count total comment in my application. This is my code : [B]Comment.aspx.cs[/B] [CODE] protected String GetCountComment(string IdTopik) { try { string value = String.Empty; DMSDataAccess db = new DMSDataAccess(); var comment = db.DMSDataContext.Comments.Where(p => Convert.ToString(p.IdTopic) == IdTopic); value = Convert.ToString(comment.Count()); return … | |
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 … | |
Can you check this site? (can you check can you listen to music? [my browser is firefox, and can you check it with other browsers?]) Thanks! ([URL="http://latinus.herobo.com"]click[/URL]) (PS. Glasnoća means volume) | |
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 … | |
[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 … | |
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 = … | |
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 … | |
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 … | |
Hi, I have to retrieve data from database and create a XML file, then i have to parse this file and display output in browser. Creating XML file works fine. But parsing is not working. No errors. But output is not displayed in browser. Have submission tomo. Please Please help. … | |
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. | |
[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" … | |
Hi... I have a fixed size array in my program..... but in order to make the program memory efficient.... i want to make it an ArrayList... can someone please explain how to do this..... i have posted my code below... [CODE] class StaticColumn { public TextBox[] textBoxes = new TextBox[1000]; … | |
Hi this isnt wrking i need help!!!! [code] import javax.swing.*; import java.awt.event.*; import java.awt.*; //used for layout manager import java.util.Random;; class GuessGame extends JFrame { private JButton newButton; private JTextField gField; //stands for guess field private JLabel firstPrompt, enterLabel, userMessageLabel; private int randomNumber, userGuess; private int counter = 0; private … | |
![]() | I am converting seconds to minutes, hours, days. For some reason I have an issue with the days not calculating when running the program. The 'if' statement seems completely ignored by the program. I think this may be caused by the warning I get. Any help would be greatly appreciated … ![]() |
I'm having a couple of problems w/ getting the program to end when the user enters 'Q' after they've been asked if they want to try again. Also, after enter a negative int is entered for employee id then either the program moves to displayEmployeeInfo & shows the info that's … | |
I have this error --------------------Configuration: <Default>-------------------- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1041) at java.awt.Container.add(Container.java:959) at javax.swing.JFrame.addImpl(JFrame.java:540) at java.awt.Container.add(Container.java:365) at ticketReservation.<init>(ticketReservation.java:114) at bookAngels.actionPerformed(bookAngels.java:163) 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:6267) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6032) 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:4577) at … | |
Hi All, I try to make count down timer but. This following is my code but it just decrease one time and stop. [CODE]Dim TCount As Integer Private Sub Form_Load() TCount = 30 Label1.Caption = "30" End Sub Private Sub Timer1_Timer() Label1.Caption = TCount - 1 If TCount = 0 … | |
[B]Trying to install a slideshow and a quote rotator, and can only get one to work at a time. I assume the scripts are conflicting, but is there a way around this? Can I just rename one of the [COLOR="Red"]$(document).ready(function()[/COLOR] to like [COLOR="Green"]$(document).ready(function(2)[/COLOR] or something?[/B] This forum tries to explain … | |
how do you print out to a text file in tabular form like the soccer teams and their info. | |
Hi everybody! i am using joomla 1.5.23 with the templete jvwintro when i try to add a menu then a message just like "Invalid Token" is shown the same problem is shown in the JA-Methys-Joomlart-Template what the problem is? and what is the remady? please reeply me soon. | |
Well, i really don't know, maybe the title would be in appropriate. Here's my problem: Textbox1.text = [CODE]abcd sadsadasdas dsad as das d 1234[/CODE] After parsing between [TEX]abc[/TEX] and [TEX]1234[/TEX] It shows [TEX]sadsadasdasdsadasdasd[/TEX] However it should also contain spaces. Here's my piece of code: [CODE] Dim daniweb As String = … | |
Hi so basically im pretty sure i have all my code right and its compiling but for some reason when i run it the frame will load and then quit on me without saying anything i dont know why here is my code [CODE] import javax.swing.*; import java.awt.event.*; import java.awt.*; … | |
Right now dates might look something like this 04/18/11 or this 04/08/11. Well, what needs to be changed and where to not display preceeding 0's in single digit months / days so 04/18/11 becomes 4/18/11 and 04/08/11 would become 4/8/11.. Ty for your time and help. [code]<?php $ndnews = file_get_contents('http://www.naughtydog.com/index.php/site/tickerData'); … |
The End.