64,152 Solved Topics
Remove Filter ![]() | |
[CODE] #include <iostream> #include <vector> #include <string> using namespace std; class Member { public: string Name,Vorname; //prototypes vector<Member>*generateAVector(); void SaveElementsInTheVector(vector<Member>*pAVec,Member *obj); void DisplayTheVector(vector<Member>*pTheVec); void test(); }; int main() { Member Neu; //new object //creates a vector on the heap, here with no sense,only experimentally vector<Member>*pAVec=Neu.generateAVector(); //puts data in the elements … | |
I'm writing a program to ask the user for 6 points for a triangle and then calculate the length of the 3 sides, the perimeter, and the area. Then the tester will have to display the properties of the triangle, length of sides, the area, the perimeter, and if the … | |
Iam Using This Code [CODE]$result = mysql_query("SELECT games.*, console.name AS gconsole , genre.name AS ggenre , company.name as gcompany, status.name as gstatus from games as games left join console on (games.console = console.id) left join genre on (games.genre = genre.id) left join company on (games.company = company.id) left join status … | |
Good Morning, I am recently new to php development and have come across an issue that I can't quite get my head around and need some assistance if possible. I have been tasked to build a Task Logger in php which I have successfully done and is working fine, the … | |
Hello, I have a PHP file that lists a Post Code variable ($thisPostcode). Using simpleXML I need to compare the value of the Post Code variable to the Post Code attribute in an xml document, if there is a match I need it to echo the statement below if not … | |
The following code contain some errors which im unable to locate. The problem is.....Im doing search and update. Im able to search the database and update Animal_Type and Animal_Breed BUT cannot update Premium_Habitat and Age...... Can some one locate that fatal error please Thanks [code]<?php include("svrconfig.php"); $svr_connect = mysql_connect("localhost","root","magicpass"); if(!$svr_connect) … | |
what does an array contain when it is declared? For example, when i declare an int array numbers like: int[] numbers=new int[5]; now without intializing any values, i tried to print that array.So it showed me that all elements inside that array were 0. Now if 0 means empty, then … | |
Hey, I'm a beginner at compiling (or interpreting) Haskell and some of the basic things are hard to do especially when theres not a lot of info out there for me to use. My question is, how do I run a test file after I have compiled? I compiler with: … | |
Im new to java and trying to get buttons to work. My next button works as intended however the first and last do not and the previous one only takes me back one space if i'm on the second item. I need the prev button to rotate backwards through the … | |
Hi all, I have a database which I would like to use to power an HTML list. I'm struggling to get the loop to print out more than one line. This is the script: [CODE] <?php $query = "SELECT * FROM `table` ORDER BY `year` ASC"; $resultID = mysql_query($query, $conn) … | |
Hey guys I keep getting the "no return statement error in two places, I have commented them for you [CODE] /** * A WordsCompare object stores Strings. It is used to determine if the first word * should be placed before or after the second word in the dictionary */ … | |
Hi, Is there a way to stop a function from returning a value if a condition evaluates to true. For example my function returns the sum of two integers. How can I stop it from returning anything if one of the integers is negative [CODE] Class C1 { ... public … | |
I want to add a Lable in a JComponent when a button will be clicked. I have added a actionlistner on that button. I've added this.add(label) in the JComponent. but the location, which is set by label.setLocation(...) is not maintained in the JComponent. If i use FlowLayout() in the JComponent … | |
Hey, I've been trying to get this to work for most of the day. Basically I have an array of strings and I'm adding to them using strcat in a loop. It works fine for the first few loops but then the strings start to go all out of whack. … | |
I've created a class called Piece, which I used to create a 2D array in my main program. This is the class: [CODE]namespace GG { class Piece { public int rank; public int player; } }[/CODE] And is instantiated in my main program like so: [CODE] namespace GG { public … | |
[CODE]import java.util.Scanner; public class Bakery { private static String flavors; private static String weight; private static int quantity; public Bakery(){ this("Chocolate Moist", "1(KG)", 1); } public Bakery(String flavors, String weight, int quantity) { this.flavors = flavors; this.weight = weight; this.quantity = quantity; } public void setFlavors(String flavors){ this.flavors = flavors; … | |
[CODE]import java.util.Scanner; public class Course { private String courseTitle; private double feesPerStudent; private int noOfStudents; private String[] studentName = new String[100]; private int courseCount; public Course(String courseTitle, double feesPerStudent) { this.courseTitle = courseTitle; this.feesPerStudent = feesPerStudent; } public void setCourseTitle(String courseTitle){ this.courseTitle = courseTitle; } public String getCourseTitle(){ return courseTitle; … | |
MY bad this should below to C#... ignore this one please, sorry about that... --------------------------------------------------------------------------------------------- Hi people I found I can only reset the values in the array but I can resize it in a new method and return it back to main method, [CODE] static void Main() { int[] … | |
I am trying to add a data(string) to a url in javascript and pass to java controller. In server side i am using spring mvc. The javascript code below redirects to the save.htm with the data concatenated. I couldnt figure out how to catch. Is there any way to pass … | |
Hello All, Can everyone help me to solve this problem ? Im doing an assignment about downloading a file and write it to a new file. My problem is the file that I was trying to download is very large, so everytime I compile my Download class and the main … | |
Hi, I have been learning PHP/Mysql for only a few moths and am working on my own dynamic web-site. Stuck on what is probably very simple. User inputs name($name)in form. Table containing it has 15 fields - $name could be in any or none How do I put $name into … | |
Hi, im new here and also new to C++ (pretty much new to programming anyways) I have been working in an assignment and got stuck trying to store information into a 3x3 array, and then retrieving the data. [CODE] #include <iostream> #include <iomanip> using namespace std; int main() { float … | |
i knew every thing about it in couple of days, and when i thought i finished the project (ASP project), i forgot about the deployment part and needed to use the database as local database (SQL server database file) the problem is i cant get the report wizard to connect … | |
i knew every thing about it in couple of days, and when i thought i finished the project (ASP project), i forgot about the deployment part and needed to use the database as local database (SQL server database file) the problem is i cant get the report wizard to connect … | |
i want this animation to start from the beginning but i dont know how to do it. im using scriptaculous framework. here is my animation: [url]http://silviadwomoh.com/loop/[/url] and here is my code: [CODE] <script type="text/javascript" language="javascript"> //fade div 1 new Effect.Fade('anim1', {duration: 1, from: 0, to: 1, afterFinish: function (one){ //after … | |
Hi again guys. I currently have a class named [B]ElementSet[/B] which houses an array of objects as well as an array of boolean values which pertain to two function tasked with flagging or unflagging an individual object. I also have an abstract class, [B]Element[/B], and two inheriting classes named [B]Subscriber[/B] … | |
Hi, In brief, I have written a program in C++ that reads data from a text file, does 'stuff' with that data and then writes the results to a number of separate file. Separately I've written a simple GUI for this program using Visual Basic (allows the user to select … | |
[CODE]public class Fan { final int SLOW = 1; final int MEDIUM = 2; final int FAST = 3; private int speed; private boolean on; private double radius; private String color; public Fan(){ speed = SLOW; on = false; radius = 5; color = "Blue"; } public Fan(int speed, boolean … | |
Hi .. I have this program, its reding correctly but its not doing what i want i.e. it suppose to read the input file and call the functions according to the action saved in the file this is the problem : [CODE] #include <iostream> #include <Fstream> using namespace std; void … | |
The below query is updating all the rows in the table1 eventhough the inner query only selects few of the rows. Any help. Appreciate it. Thanks, UPDATE table1 out SET (col1, col2, col3) = (SELECT col1, col2, col3 FROM (SELECT col1, col2, col3 FROM table1 in, table2 a, table3 b … ![]() | |
Hey everyone, Is this the right way how to make a trigger in Oracle? [CODE] CREATE OR REPLACE TRIGGER "TRI_AMOUNT_REDUCTION" BEFORE INSERT ON "PURCHASE" FOR EACH ROW BEGIN IF (:NEW.CLIENTNO =SELECT C.CNAME, T.CLIENTNO, T.TOTAL FROM CLIENT C, ( SELECT A.* FROM (SELECT CLIENTNO, SUM(AMOUNT) AS TOTAL FROM PURCHASE GROUP BY … ![]() | |
Hey everyone, I'm trying to count all Purchases and find ReceiptNo the ones that start with '434'.. [CODE] Select count(p.purchaseNo) from purchase p (select INSTR(TO_CHAR(p.recceiptNo), "434") >= 10; [/CODE] But this line doesn't only select all receipt number starting with 434.. it selects all receipt no that has 434 in … ![]() | |
Howdy! I've searched the forums and Google for ideas but all the information/advice I found was either not helpful or inaccurate. So, perhaps someone here can help point me in the right direction. I'm heading off to University next year but, before I do that, I'd like to study some … | |
In high school I learned Pascal and C++. Everything from hello world to search trees, to graphical battleship with AI. Now I'm a freshman in college and in my CS1 class we are using Java, but after 2 months we are just now on arrays. Basically I was just hoping … | |
I've been looking, and there seams to be a lack of Ron Paul (for president 2012) Wordpress Themes. So I think I'm going to have to make my own...but then I remembered I suck as design. So I was wondering if anyone might know of a good resource where I … | |
Hello, I have a weird problem while running my project. I use netbeans and here's my code and the problem is explained after the code. [CODE]/* * NetworkingView.java */ package networking; import org.jdesktop.application.Action; import org.jdesktop.application.ResourceMap; import org.jdesktop.application.SingleFrameApplication; import org.jdesktop.application.FrameView; import org.jdesktop.application.TaskMonitor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Timer; import javax.swing.Icon; import … | |
I am making a quick program to get basic database functions working before i create a larger app but my application keeps force closing when i try and read from the database. I am an amature at android programming and im just starting out. Does anyone know what is wrong? … | |
[CODE]<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>XYZ Travels Pvt Ltd.</title> <script type="text/javascript" language="javascript"> function a(){ var x = document.forms.frm1.UserID.value; var y = document.forms.frm1.Pass.value; if(x=="" || y=="") { alert("Required Field cannot be left Blank"); if(x!="") { document.forms.frm1.Pass.focus(); } else{document.forms.frm1.UserID.focus();} } … | |
In an earlier post, Tech-B stated that, other then dialogs, there wasn't 'any "real" GUI support' in Python that uses the Android SDK or SL4A/SAE. Has anyone tried Jython with the Android SDK? | |
hi plz help me how to simple displaying 1 to 20 prime numbers with for loop plz help me | |
hi i started coding battle ship when i was done i noticed that the user and computer always misses, even if they hit, i dont know what i did wrong [CODE]import java.util.Scanner; public class Battleship { public final static String USER = "user"; public final static String COMPUTER ="computer"; public … | |
I have two forms Login and Main Menu. I want to retrieve the username from the textbox1 from login and put it in the status strip in the main menu. However, when i change the modifier of textbox1 with this code [CODE]TextBox textBox1; public Login(TextBox txtBox);[/CODE] or any other code … | |
can anybody share, the best encryption and decryption technique in PHP. here i just found 3 ways. are that any better technique? [QUOTE][ICODE]<?php //1 $password = 'mothafucka'; $sSalt = '8*S&AsEc4qUs'; $sHash = hash( 'whirlpool', $password . $sSalt ); echo $sHash."<br><br>"; //2 $password = "palancau87"; $password = sha1($password); $password = md5($password); … | |
I'm a C++ student, and I'm almost there on this assignment, except I can't get the search function to work correctly. The search function should accept a search input from the user, then list all the items related to that input. In this case, its all the tasks related to … | |
Hi, I don't understand how to write unix shell commands in python. I have this txt file were I want to delete duplicates. It looks something like this: RTGR.txt FRTO.txt RTGR.txt SDOP.txt QWJL.txt SDOP.txt FRTO.txt FRTO.txt ...etcetc... I think I'm suppose to import os and then I want to use … | |
[CODE]private void rbWeek_CheckedChanged(object sender, EventArgs e) { if (rbWeek.Enabled == true) { DialogResult dChangeCycle = MessageBox.Show("Yes to start new billing cycle from today's date. No will make no changes to next billing Date.", "Next Billing Date Change", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dChangeCycle == DialogResult.No) { } else if (dChangeCycle == DialogResult.Yes) … | |
i have this code for adding a node after the previous node, but valgrind is saying that there is a memory leak of 16 bytes, can someone please help me identify where the leak is? i think i didnt assign a null pointer somewhere but im not sure exactly where … | |
In writing a logging program for a SDK Engine, I have come across some problems. The logging function works fine when called with test programs, but when I run it in a full test of the SDK Engine, no file is ever created. I added some testing lines to make … | |
Please take a look at the following code. When I do not put my pointers in an array the code works. See the commented out section. I thought it would be nice to do an array as I could then have more control over my output. I could also add … ![]() | |
Hey, Is there a way to get the keycode from a char? I tried using KeyEvent.getKeyCode() but the KeyEvent class didn't have a constructor so it was freaking out. I've been searching for 2+ hours already and nothing. My goal is to have a char, convert it to keycode, and … |
The End.