64,152 Solved Topics
Remove Filter ![]() | |
Simmilar problem again using a vector of length 4 [CODE] vector <char> something; something += '1','2','3','4'; somefunction(something,4); [/CODE] some function takes in a [CODE]char* ptr, unsigned int size[/CODE] at the moment i am getting "error C2664: 'something' : cannot convert parameter 1 from 'char' to 'char *" any help would … | |
My Jquery function goes like this <script language="javascript" src="jquery.js"> function TestJQ() { alert("Inside a JQ Function"); } </script> I also added jquery.js file to project. When i try to call this function from Silverlight project it throws an error Failed to Invoke My Silver light code: void MainPage_Loaded(object sender, RoutedEventArgs … | |
I have been working on a text based adventure game as a project for school. I have become very well acquainted with functions, loops, arrays, etc. I now have to begin thinking on a senior project utilizing something we worked with this year and I love to code but I … | |
Hi, I'm trying to write a script that allows me to insert a file into MySql. I would like it to work under the user's session. I am getting error:(You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right … | |
I'm trying to get my Captcha to work. It works, but if the user does it correctly I want them to go to my thanks.html page, and I'm doing something wrong. Help? [CODE] <? require_once('recaptchalib.php'); $privatekey = "Private Key numbers"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); $to = 'myemail@myemail.com'; … | |
Hello all, i want to know some textbox case. I want to make my textbox (example textbox1) only can be written by numeral, if there was non numeral input, textbox1 not allow or just being ignored. Thanks for attention or help :) | |
When testing the output of a variable of type double, with [B]expected results = 48.66573405[/B], I am getting an [B]actual result = 48.6657[/B]. Why is the expected result being rounded when the whole idea of using type double is to increase the precision of your calculations? Thanks FWD | |
Do I understand that by using the following code [CODE] a = getchar(); b = getchar();[/CODE] , after pressing "1" and "Enter" keys ( Enter - to continue programs work), we can derive the following variables - [CODE]a = '1'; b= '\n';[/CODE] thanks in advance)) | |
I'm supposed to define a function that removes all nodes with a specified value from a linked list. I have to use this structure: [CODE=c] typedef struct LIST { int Object; struct LIST *Next; } LIST; [/CODE] and here is the function I wrote [CODE=c]void LDeleteElem(LIST **List, int Elem) { … | |
I know you can, [CODE]frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[/CODE] but is there a way to get it to execute a method and then exit? example.. [CODE]frame.setDefaultCloseOperation(saveData, JFrame.EXIT_ON_CLOSE);[/CODE] just a guess? thanks all | |
Hi, I am pretty sure there is a more effective way of achieving this. Would love for some input from you guys. Basically, I have a class called GamePanel and it contains this: [CODE] SpaceShip spaceship = new SpaceShip("Galatar"); public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.drawImage(bgI,0,0,null); … | |
ok, below is the code that i have tried and still not working; #include <stdio.h> int main () { char Name; int Age; int Date_Of_Birth; float Place_Of_Birth; float Email_Address; printf ("Name:"); scanf ("%c",&Name); printf ("Age:\n"); scanf ("%d",&Age); printf ("Date Of Birth:\n"); scanf ("%d",&Date_Of_Birth); printf ("Place Of Birth:\n"); scanf ("%s",&Place_Of_Birth); printf … | |
/*1st - What I want to do is have the user input 2 numbers. Program should determine which is lowest and highest, then spit it out. Then I’m trying to have the user input a 3rd number that is equal to or in between the lowest number and highest number. … | |
The program below is executing fine but when I enter the last of 10 numbers and the final output(shows the average of the 10 numbers) is displayed, I get the following error message: Run-Time Check Failure #2 - Stack around the variable 'numbers' was corrupted. If someone could explain what … | |
I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] … | |
Using VbScript:: I have a list of several different prices and I'm trying to figure out how to round these 5 decimals adding zeros if necessary. For example: I want 2.84 3.1 4.896 to look like 2.84000 3.10000 4.89600 Can somebody please help me? Thanks! | |
What is the difference between int and unsigned int? | |
So i've been working on this code that i got online and it is a chat server code. This is the code- [CODE]# import needed modules: from socket import * # get sockets, for well, sockets import string # string functions import time # for sleep(1) function # define global … | |
A - an interface. B,C,D - implement A. in an other class, say X, i have an array of A, that will hold some B, C, D. i have a method that get (int i, A a) and put the a in the i place of the array. ->>>> how … | |
I'm developing an ordering system relying on PHP and MySQL; the problem I have is essentially HTML, though, and specifically with Google Chrome (no issue with Firefox or IE). If an order already exists for a customer, items are listed with input boxes but with the maxlength attribute (a variable … | |
Hi Guys, As the title says really... Sounds simple, it is. But....! I'm dealing with huge numbers here. I'm dragging bandwidth from a logging system I am developing for a client and it returns it in BYTES... Very accurate :| This is the sort of number I'm dealing with here... … | |
Hi, If I run the following mysql_query: [ICODE]SELECT * FROM products WHERE product_name LIKE '%SOM%'[/ICODE] I get the following results: [INDENT]SOM 1 - Coloured option SOM 2 - Magnetic Roof Sign SOM 4 - Magnetic Roof Sign - Centre L SOM 6 - Magnetic Roof Sign - Curved Top SOM … | |
Hello everyone .. Im learning PHP on my own .. I installed Apache on Windows XP and trying install PHP, tried both installer and manual way but its not working :( PHP scrips getting downloaded .. Can any one give me a good link for step by step installation ? | |
Using Borland C++ 3.0 Here's my code: [CODE] #include<iostream.h> #include<conio.h> int main() { int m,d; int i=0; clrscr(); cout<<"\nEnter Birthday month: "; cin>>m; cout<<"\nEnter Birthday day: "; cin>>d; cout<<"\n"; { if(m==3 && d>=21) cout<<"ARIES!"; else if (m==4 && d<=20) cout<<"ARIES!"; else if(m==4 && d>=21) cout<<"TAURUS!"; else if(m==5 && d<=21) cout<<"TAURUS!"; … | |
I have this script and i need some help [CODE]<script type='text/javascript'> numcount=0; t=setTimeout("test()",30000); document.getElementById("incrementBtn").disabled=false; timer_on = 1; function increasecounter() { timer_on = 1; numcount++; document.getElementById('countdiv').innerHTML=numcount; t=setTimeout("test()",30000); } function test() { if(timer_on) { timer_on=0; document.getElementById("incrementBtn").disabled="true"; document.getElementById("score").innerHTML = document.getElementById("countdiv").innerHTML; } } function reset() { timer_on = 0; numcount=0; document.getElementById("incrementBtn").disabled=false; document.getElementById("countdiv").innerHTML = 0; … | |
I am writing a JavaScript program that you click the mouse on a button and it shows how many times you have pressed the button. here is the JavaScript for it [CODE]<script language="javascript"> var numcount=0; function increasecounter(){ numcount++; document.getElementById('countdiv').innerHTML=numcount; } </script>[/CODE] and here is the html: [CODE]<div id='countdiv'>0</div><br/> <input type=submit … | |
Ok I have a little problem.I have a pointer in the struct which I don't know how to use as or move the information into an array on the bottom function. Need an explanation. Anyone please help... [CODE] // This is the minimum functionality for this exercise // Notice that … | |
I'm working on a scientific/algebraic calculator and I have put all of the code that will deal with any of the math in a separate class. However I cannot access any of the controls on the form from this class. I need to write the answer into the box on … | |
Hi everyone! So here's my problem: Given an element, I need to get the index of the array in an array of arrays. For example, I have the following array of arrays: [CODE] my @arrOfArr = ( [ "1023", "1472", "0751651"], [ "1527", "1167", "2496111" ], [ "M167", "1412", "1761683" … | |
EDIT: I found the solution already. I had to malloc() memory for rec_msg. :) Hi, I've got a little problem with my (unix) C program. I'm trying to make a HTTP request to fetch a page from a site. I can resolve the IP, make a socket, connect and send … | |
Alright, so i got this question that im given a group of scores in the file, and i have to make them into a list, sort the list, and find the median. I got the sorting and the median done.. But I just got one problem that I can't seem … | |
Can anyone see where im going wrong with this code I keep hitting a brick wall with it. Its doing my head in. I think its more the sql code, It keeps showing all data instead of just showing the data based on the user_id which should be limited to … | |
![]() | I want to have a live clock in the statusbar. When I put SetWindowText before the switch in the callback, like this: [CODE]BOOL CALLBACK MainDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam) { time_t rawtime; struct tm *timeinfo; time(&rawtime); timeinfo = localtime(&rawtime); strftime(thetimeis,79,"Current Date and Time: %A, %B %d, %Y … |
so i know how to add the numbers in a list recursively [CODE] def ListSum(list): if list = []: return 0 else: return list[0] + ListSum(list[1:]) [/CODE] but how would i go about subtracting a list from a list using recursion? does anyone know how/ where i could go to … | |
Hello all, I am writing a WPF application and used pages for navigation, The thing I want to know is that , [B] [COLOR="Red"][COLOR="red"]How can I get the Relative Uri`s of pages from the assembly dynamically[/COLOR][/COLOR][/B]. I don`t know what to do with this. I know how to get a … | |
I was reading a post somewhere on this site about making a type-dynamic list and came up with this. The issue is I'm thinking it's leaking memory when the list grows. Finally, are there any ways to improve this code? [CODE]#include <iostream> using namespace std; class DynamicType { public: union … | |
Hi everyone, I have a very large CSV file. 51427 lines to be exact. I need to import the entire file into a MySQL database, however, the script times out due to server settings and slow connection (and maybe other reasons that I am not aware of). So - I … | |
Hi, I have a script that uploads images into MySQL but I am have trouble resizing the image on upload. Can anyone help? Here is my code so far: [CODE]<?php require_once('Connections/connAdmin.php'); ?> <?php //file properties $file = $_FILES['content']['tmp_name']; if (!isset($file)) echo "please select an image."; else { $content = addslashes … | |
Hi All, I have a crystal report with DrAmt, CrAmt, DrBankAmt, CrBankAmt fields. While displaying the report i want to display.. the records whose following condition satisfied... [B]((sum(DrAmt)+sum(CrAmt)) - (sum(DrBankAmt)+sum(CrBankAmt))) <> 0[/B] how can i check for this condition in selection formula.... I have used following line of code... but … | |
i have a notepad that i made into a database. i want to know if a username and a password are valid combination. but if i run it, the 10th entry, for example, gives 10 different outputs until it finds the perfect match. suggestions would be nice. <?php $user=$_POST['user']; $pass=$_POST['pass']; … | |
Is this decent code, hacks, or somewhere in between? :) | |
Hi everyone, So I tried making my program here, and I got an error that I can't figure out. I have a class for a Binary Tree, "Stree", with a few methods defined publicly, and a "Node" class defined privately, within "Stree". These methods use "Nodes" as parameters. Now when … | |
the errors are commented in the code: help??? [code]import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import java.lang.*; public class Kol2_1 extends Applet implements ActionListener { Button plus = new Button("+"); Button minus = new Button("-"); Button times = new Button("*"); Button div = new Button("/"); Button eq = new … | |
Hi, I have a question regarding navigating to a listbox item in C#. I have written code which populates a listbox from an xml file in xaml (thus bound to it). However I want to navigate to the selected item in the listbox using code in c#. I can navigate … | |
i have this function and it is giving me this warning. and i have many similar functions so by the time i'll be done i'll have a thousand warnings how can i get rid of the warnings Function 'SelectRows_local' doesn't return a value on all code paths. A null reference … ![]() | |
Not sure if its the sql query or what, but I have a pagination class and a function I am trying to put together if some one would be able to point be in the wright direction it will be very appreciated. :) The following is the function which I … | |
Hi, I was just wondering if there was anyway to create some sort of stopwatch, that doesnt include labels signifing, milli seconds etc? Thanks | |
hi guys, I am working on a project for my school, and I was wondering whether I can get some guidance and tips on how to tackle it. Here’s the problem in brief: I was asked to develop a program so that users can input the data values of 2 … | |
[url]http://cgi.ebay.co.uk/Pre-order-Nexus-S-Google-phone-android-2-3-get-it-early_W0QQitemZ120658553467QQcategoryZ171955QQcmdZViewItemQQ_trksidZp5197.m7QQ_trkparmsZalgo%3DLVI%26itu%3DUCI%26otn%3D1%26po%3DLVI%26ps%3D63%26clkid%3D5646332619241648877[/url] sorry, i mean phone | |
Hi All, I've looked everywhere and cannot find a reason for this. I'm essentially try ing to loop through every row in a datagridview, and trying to remove the entire row, if a certain cell's value matches another value. Please find the code below. This is working, however is skipping … |
The End.