199,114 Archived Topics
Remove Filter ![]() | |
Once again, I found some code that seems to be doing something that I would like to try, but I get a Static Error when I try to run the code (apparently, I may be the only one). By the way, the code comes from the book, "Swing Hacks" By … | |
did this means na sa pdng mag'search or add or delete at the same time dito sa form na 'to? such that yung entry ng user sa mga field dito is pdng ma'search din? | |
Could someone please verify. Is it proper to have pointers to containers(vectors in this example) where you allocate memory for them and then free them. I googled and found a posting that stated its considered poor coding style to do this...I doesn't seem like it should be poor programming style … | |
[B]Please help... I need an algorithm for generate sudokus. i searched in the web, but there´s only algorithms in action scrip, java, c, c# or c++, i need it in scheme... why is so difficult find help for scheme expressions ´n algorithms?? if there someone who can give me a … | |
I need to check for floating point numbers inside my class but it doesn't seem to be working. Any suggestions? [CODE] class Rectangle: def __init__(self, length = 1, width = 1): self.__length = length self.__width = width ##Setters to float def set_length(self, length): self.__length = float(length) try: #self.__length = float(length) … | |
How can I resize 2d array. I want to create a bool. My new map should measure 10 height and 5 width. [bool msize(int Height,int Width){ return true; }] | |
[code] def index_dir(self, base_path): num_files_indexed = 0 allfiles = os.listdir(base_path) #print allfiles num_files_indexed = len(allfiles) #print num_files_indexed docnumber = 0 self._inverted_index = {} #dictionary for file in allfiles: self.documents = [base_path+file] #list of all text files f = open(base_path+file, 'r') lines = f.read() # Tokenize the file into words tokens … | |
Hi all. I'm having some difficulty getting some hardware info I can get the Hdd serial, and CPUID. [code] string cpuInfo = string.Empty; ManagementClass managementClass = new ManagementClass("win32_processor"); ManagementObjectCollection managementObjectCollection = managementClass.GetInstances(); foreach (ManagementObject managementObject in managementObjectCollection) { if (cpuInfo == "") { //Get only the first CPU's ID cpuInfo … | |
Hello, I'm a bit new here, and also quite new to java. I'm wondering how I would insert a print statement into the do while loop, if the while is false. [CODE] do { System.out.println("Enter number of years for the loan an in integer: "); numberOfYears = input.nextDouble(); System.out.println("Enter the … | |
Hi. I've seen this same question in another thread, but I'm actually trying to figure out how to make this work and I keep getting hung up. Here is what I'm trying to do: You are developing a database of measured meteorological data for use in weather and climate research. … | |
Every once in a while I run into this problem and finally decided to consult the experts. :) I insert foreign characters (Czech letters) into my MySQL database and see them there. They look fine. But when I try to retrieve them using PHP they come out with question marks … | |
Can someone please fill in the missing line of code in OnPageChange? I have a notebook control and on a page change event, I want to retrieve the label of the tab that was just selected. GetLabel and GetLabelText both return '' [CODE] import wx import wx.lib.mixins.inspection class Frame(wx.Frame): def … | |
Having problem getting code to even compile. Instructor insists array be in addDays and no adding of extra data members or methods to the class. "Use an array of strings in addDays. It needs to be local to the method since that is the only place that it is needed. … | |
Hello to all, I did not know how to entitle this post,since it is more of a logical problem,but it's connected to the writing of my objects to a file. So, my server expects connections from multiple clients. The clients vote for the candidates offered to them by a menu, … | |
Hey, I keep getting this error, but from its description, I can't really tell how to fix it besides from what I've already tried, so any explanation would be great. The error I get is: clientrectlib.cpp(32) : error C2664: 'calcMinMaxValue' :cannot convert parameter 1 from 'overloaded-function' to 'float &'. The … | |
I have a javascript test function to determine if items have been entered but it appears that the function never completes, it runs the for loop but not the items after it??? I can produce a screen capture video of the events that happen, contact me and I will send … | |
I have viewed some source that contained an identifier with a scope operator preceding it. Ex: [code=c++] ::var[/code] What does that mean/do? | |
i made a browser with Favorites and the Favorites save in XML file. when i open the program and i put there some favorites its open the program realy slow like after 9 - 15 seconds/ and i delete the all favorites its open like its should (1, 2 seconds) … | |
i need help making an add function for an array. i know how to initialize it and have it started. when i add content into the array, i need to add it as a linked list. i have my function for the linked list completed alrady. if anyone can help … | |
hello everyone .... i want to make an atm which is used in tailoring shop and withdrawing the suits(dress) the we have given to tailor... the tailor has to issue the card with the measurements of our dress next time we want to make that dress and directly go to … | |
Seeing we can do it with structs, why do we need classes? See the code and quote from [URL="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/cplr054.htm"]Link[/URL] [QUOTE="IBM Developer"]The C++ class is an extension of the C language structure. Because the only difference between a structure and a class is that structure members have public access by default … | |
[code] #include <iostream> #include <cstring> void rev(const char* str) { char* p = new char[strlen(str) + 1]; for(int i = 0; str[i] != '\0'; i++) { p[i] = str[strlen(str) - i]; } p[strlen(p) + 1] = '\0'; std::cout << p; } int main() { const char* s = "vBx"; rev(s); … | |
Hi, I'm a newbie to C++ so please be patient. I have to create program that outputs a simple moire pattern or a graph of y-values from a .csv file depending on which one is called. The code below is what I have before main and is where I am … | |
Okay, so I've got a TCP Asynchronous Multithreaded server running which interacts with multiple clients at the same time. It works fine unless a client sends many messages in a short peroid of time, for example five messages within about half a second. For some reason it only recieves the … | |
Hey guys this is kind of a JavaScript question but the script works elsewhere so I have a feeling it's got something to do with the fact it's being echoed by php. Can anyone tell me why this isn't working: [CODE] if (($_SESSION['count'] % 5 == 0) && ($_SESSION['countView'])) { … ![]() | |
I got run-time error for the following code. I am just starting to get familiar with linked list. Can any one point out what's the problem here? thanks [CODE] #include "stdafx.h" #include<iostream> using namespace std; struct node { int data; node * next; }; node* buildonetwothree() { node* head=NULL; node* … | |
Hi there! I need help with my assignment. The point if it is to make an array table that will hold various linked lists that hold other items. I already have my code to add and retrieve information from a linked list. I need help making an array that will … | |
I am trying to build a very quick invoice type program, and I can't seem to get the final total to print. I am calling the function for it, but it's not printing anything to the screen...any suggestions? [code] public class Invoice { private double Total; //Constructor public Invoice( double … | |
Hi people, i was wondering If you could help me. I have a personal project as a java program, and I wish to develop my own Look and Feel. It will be rather simplistic (like a metro ui). Is a Look and Feel the right way to be going about … | |
Hi, I am kind of new to C++ and really stuck with a problem. Here I am trying to parse a string and after comparing to a pre-declared array save the tokens in a vector of vectors. It is giving a number of errors and I'm not sure what to … | |
Please help with this problem... I'm still learning java and i got stuck with a problem posted through our school campus... this is the one....and it's supposed to be the sequential structure.. Write a program that classifies a given amount of money in dollars. The program outputs a report listing … | |
[CODE] import java.util.*; public class Employee{ private String emplo []; private int count; private int size=10; private String emp; public Employee(int size){ String [] emplo=new String [10]; count=0; } public Employee(){ this(10); } public boolean isFull(){ return count== emplo.length; } public boolean isEmpty(){ return count==0; } public void add(int x){ … | |
i read this on the net. and i cant understand why i have this mistake? [QUOTE]Thrown when an application attempts to use null in a case where an object is required. These include: * Calling the instance method of a null object. * Accessing or modifying the field of a … | |
Hi! I've spent 4 hours trying to read the data from file to ArrayList and then to JTable, but still cannot solve one problem. I have the following class UserDataRow, where the data about a user is described. [CODE] public class UserDataRow { public String regnumber; public String firstname; public … | |
Show the details of sales orders which are paid more than 14 days after the date of the sales order. SQL: SELECT SO.OrderID, D.DistributorID, D.FirstName, D.SurName, SO.OrderDate, P.PaymentDate, P.PaymentAmount FROM SalesOrder AS SO, Distributor AS D, Payment AS P WHERE D.DistributorID=SO.DistributorID AND SO.OrderID=P.OrderID AND DateDiff('yyyy',PaymentDate,Date( ) ) - DateDiff('yyyy',OrderDate,Date( )) … | |
I am a newbie. I am using validating procedures to validate user input from 4 text boxes. I am experiencing an issue using the 'x' button to close my form if invalid or no data is present in the textbox with focus when I click the 'x' button. Validating triggers … | |
hello i am having a little problem, I cant convert a double to one decimal place: here is my code [code=c]for(int i=0; i<marklist.size();i++) { double result=floor((marklist.at(i) /maxmark)); cout<< result<<endl; } [/code] I want result to be one decimal place | |
Unicode: I would like to use the radical symbol (U + 221A) in my script. How do you print the Unicode without an error? Super/Subscript: Is it possible to make a variable superscripted (and subscripted, for that matter)? | |
Hello, I am supposed to write a statement for a Codelab review test that asks: [I]"Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than … | |
Dear Friend, I am new in ASP.Net with c#. I want date in a dd/mm/yyyy format with validation in TextBox . Is anybody guide me how shall ? As I got date with dd/mm/yyyy but it will also accept 32/02/2005. Though Feb has less 30 days. Also when I compare … | |
Hi I'm trying to develop a site that users can log into. It's all standard enough the details are being kept on a mysql database. I can add the details to the db but my code for logging in isn't working. here is my login script [CODE]function user_login($username, $password) { … | |
I am writing a model economy in which corporations (class BCorp) and persons (class BPrsn) act as agents buying and selling goods and services. I have a pool of contacts (class BContact) in which contact information is retained about each contact between agents. In a contact object I store a … | |
![]() | Hi i have finished my web browser program and i want to be able to set it as the default web browser. I was just wondering how this was possible? Please can you post some links or code examples. I was thinking that this would be done with registry values? … |
I made a config.php file which contains MySQL connection info. [CODE]$con = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Cannnot connect!'); mysql_select_db(DB_NAME, $con) or die(mysql_error());[/CODE] My question is how do I add it into a class? [CODE]<?php require_once('config.php'); class users { private $id; public function __construct($id) { global $con; $sql = "MySQL script'"; … | |
Hi, My webserver code is trying to send an image file over a TCP connection. However, the send() function is returning a -1 value with the error: Connection Reset by peer. I am using a web-browser to access the server so my guess is that the server is somehow sending … | |
![]() | I'm working on a tasklist program to brush up on my C before I take a class. I have two structs, task and tasklist. Here is the task struct: [CODE] typedef struct task { char name[100]; bool completed; /* bool is described as an enum in an included header file … |
this is the coding of 4cups(paper fold game) game that we played in schoolings... [code=c] #include<stdio.h> #include<conio.h> void even(); void odd(); void cal1(); void cal2(); void job(); char z[]="one",y[]="two",x[]="three",w[]="four",v[]="five",u[]="six",t[]="seven",s[]="eight"; void main() { char a[10],b[]="red",c[]="green",d[]="blue",e[]="yellow"; clrscr(); printf("enter your favourite color from given choice:\n"); printf("red\nblue\ngreen\nyellow\n"); scanf("%s",&a); if(strcmp(a,b)==0||strcmp(a,c)==0) { printf("good luck .you have … | |
i need automata program in c language...... | |
[code] #include <stdio.h> #include <iomanip> int main() { int binary1[8] = {0,1,1,1,1,0,1,1}; //8 element array int binary2[8] = {1,0,1,0,1,1,1,1}; //8 element array int binarySum[9]; int overflow [9]; int i; for (i=0; i<9; i++) overflow[i] = 0; for (i=9; i >= 0; i--) { binarySum[i] = binary1[i] + binary2[i] + overflow[i]; … | |
Hi Everyone! I have a problem with reading data from the txt file into the 2d array. In general, the above code is workable. The only thing that doesn't work is: userdata[row][j] = tokens[j]; The problem is that my array "userdata" gets values "null". However, if I replace this code … |
The End.