199,113 Archived Topics
Remove Filter ![]() | |
#include<stdio.h> int ways(int n,int m) { if(n=0) return m; if(m=0) return n; else ways(n,m)=ways(n-1,m)+ways(n,m-1); //there is an error here.pls explain// return ways(n,m); } int main() { int a,b; printf("give a and b"); scanf("%d %d",&a,&b); ways(a,b); printf("the no of ways from (%d,%d) to (0,0) are %d",a,b,ways(a,b)); return 0; } what is … | |
Database query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 [CODE]<?php ob_start(); require_once("includes/connection.php"); include_once("includes/header.php"); //get category id according to selected record $category_id = $_GET['cat_id']; //fetch data to populate … | |
Hi all, I need my form to automatically select the first entry in the datagrid view when it is loaded. I am having trouble finding the correct way to code it. [CODE] Private Sub CustomersForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim cust = From customers In … | |
Hi guys, i used the query for randomly selecting questions from access but it will give me same result, i try it by passing different different values also passing time in rnd fuction but i will display same result. [CODE] DataSet ds = new DataSet(); string strsel = "select * … | |
I've been looking to secure a site that has many queries involved. I've always known about mysql real escape string for a while but recently i ran across prepared statements. I had a few questions about them. Is it a good idea to use both? is this over kill? When … ![]() | |
1. I did try without trying to read output or trying to read only first line of the output - both of these were successful. 2. However when I try to display full output, it just gets stuck and does nothing. 3. Even more crazy stuff - when I close … | |
In this string "13 12", I like to find if there is an occurrence of '3', but I am not interested in char '3' which is part of "13". In other word I am looking for number 3 not 13. By using the following code in python I always get … | |
I have difficulty to declare the following type of array. 1/36, (one divided 36) 2/36, (two dvided 36) 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36 [CODE]double exptRoll [arraySize] = { 1/36, 2/36, 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36}; [/CODE] This doesn't work. Can someone tell … | |
I use the below code to add or remove a row from a table using javascript. The code works fine on IE however it doesnt work on Firefox, can anybody suggest reasons why this might be doing so? The id "table1" is the ID of the table I am trying … | |
Hello Once again i need help. I have a webbrowser So once webbrowser is completed then it should add the specified value in [TEX]<input type="file"> [/TEX] value in php. Eg: Webbrowser link is [url]http://tinypic.com/[/url] When webbrowser is completed then this [url]http://screensnapr.com/e/LCgzhP.png[/url] value will be our specified value. I tried using … | |
am having trouble with this small java-script problem how can i make a link button clickable after an event lets say clicking a check-box or another button ...example when you want to install a software you see the next button but can not click it until you check the check-box … | |
How can I set the [U]Actual rolls[/U] and [U]Expected rolls[/U] to no decimal, and [U]Actual percentage[/U] and [U]Expected percentage[/U] to 1 decimal plus a % symbol ? [url]http://images.plurk.com/a2f077138ef908ce71f46b08909c998d.jpg[/url] [CODE] cout << "Point" << setw(17) << "Number of Rolls" << setw(17) << "Actual Percent" << setw(17) << "Expected Rolls" << setw(17) … | |
Hi, I have seen in couple of places the code where ToString() method has been overriden. Like : class Employee : IComparable<Employee> { public int Salary { get; set; } public string Name { get; set; } public int CompareTo(Employee other) { if (this.Salary == other.Salary) { return this.Name.CompareTo(other.Name); } … | |
I need advice. I'm writing a calculator; I've got the basic functionality of it down, and have finally moved to having it process functions. In this regard, I find the standard library of mathematical functions provided by Python unsatisfactory. While the more commonly used functions are defined, some of the … | |
Hello, i'm new in JSP, and i already install Apache Tomcat for the server, but after install it and then try it to browser and choose example there was some text like below. HTTP Status 404 - /examples/jsp/ type Status report message /examples/jsp/ description The requested resource (/examples/jsp/) is not … | |
Hi, I created an XML file that will hold the latest news and stories, and trying to display it now in my HTML file using Javscript (I scrapped XSLT, as it altered the CSS styling and alignments compared to the other pages and couldn't work my way around that). So, … | |
ok so im making this console app in which I have to allow the user to enter any number of values then display orignal value , and then the percentage of the original value to the total. [B]My question is how do I initialize my memory locations correctly for a … | |
Hi and Greetings, I am new to these forums, so if I submitted this to the wrong forum, my apologies. Before I get to my question, a little backstory. I was running an application on my laptop that was using Microsoft Vista, with Microsoft Office 32 bit and JRE 1.5. … | |
I'm fairly new to java and need help. I need to show time required to travel somewhere by having the user input Speed and Distance traveled. And the outcome be a floating point value. lets say they put in 60 mph and 148 miles I Can't seem to get the … | |
Hello, newbie here to both this forum and Python, so expect silliness! My first project has been to build a GUI front end for some command line utilities I use regularly. One of them is the utility: eac3to which joins mp3 files together. It's command line is: "eac3to.exe infile1+infile2+infile3 outfile" … | |
Assignment 2-a: Program 1: You are given the task of determining the download speed of an Internet connection. You decide to use two files whose size is known (in Kilobytes-KB). You will download the two different files, and record the time it takes to download each one. You will determine … | |
Hi, I have a Java Final exam after few days. And I am looking for some website that contains [B]SOLVED [/B]programming exercises. Can anyone give me at least one site? Note: what I mean by [B]SOLVED [/B]is that I want the exercises to have solutions with them because I want … ![]() | |
I am looking to encrypt data (preferably XTEA) on my .Net Micro Framework, send it to a webservice in .Net (Azure) and decrypt it there. I found this [URL="http://www.dmcinfo.com/Blog/articleType/ArticleView/articleId/83/Encryption-Compatibility-Between-NET-Micro-Framework-and-the-Full-NET-Framework.aspx"]blog post[/URL] but I am unable to get it to work. The encryption result on .Net differs from the .NetMF. I hope … | |
![]() | I can't seem to figure out how to separate the code I wrote into 3 separate methods. 1. The main method, 2. the method that creates the strings i need and sends em back to the main method, 3. and the method that displays the if statement. [CODE]import java.io.*; import … |
I'm making a dice program that calculates the statistics such as actual percentage, expected rolls and expected percentage and so on. I'm having a difficulty on the Pseudo random number generation. With two dice, the mim. sum of the dice is 2, not 1. There is something wrong with my … | |
Alright so basically i need to create a simple maths game in C. Involving addition subtraction and multiplication of random numbers. But i also need to add a timer to that. So lets say you are given 10 seconds to answer the question and every correct answer adds you 10 … | |
I'm trying to simply match these letters using php, but it's kind-of a complex matching formula... First, I have two arrays and one string. The arrays contain letters and the string is a near match of those letters. $a - [Array] Must be <= 7 $b - [Array] Must be … | |
I was working on a project when I thought that maybe a ::. operator would look funny in some code. Just for fun I typed that into the global scope area like this: [CODE]::. int main() { //etc...[/CODE] and my code completion software said too many results to display. My … | |
i have a given picture and have to create a picture that is twice as wide as the given picture. For each pixel (x, y) in the original picture, the pixels (2 * x, y) and (2 * x + 1, y) in the new picture should be set to … | |
Hi I'm trying to read in actors from a file that I got off IMDB and I wanted it to be searchable to whenever the user enters an actors name, the program would output the movies the actor has starred or been associated with. I've gotten the search function to … | |
#include <stdio.h> int main() { int num, i = 1; printf("\n Enter any Number:"); scanf("%d", &num); printf("Multiplication table of %d: \n", num); while (i <= 10) { printf("\n %d x %d = %d", num, i, num * i); i++; } return 0; } Hi.. Can someone please patiently explain me … | |
Hi guys. I have a table as follows: [ICODE] ID | Data ---------------------- 1 | A 1 | B 1 | C[/ICODE] It is possible to make like this one. [ICODE]ID | Data1 | Data2 | Data3 ------------------------------------------------------- 1 | A | B | C[/ICODE] Thanks. | |
Hi, I'm trying to put sleep action on my program, but I would like program to sleep after I (as user)click and when he changes the picture on the button. and I don't know where to put it. please help this is example of code :) [CODE]import tkinter as tk … | |
What I an wanting to do here is have the script email me when the user count reaches X number of listeners on my RR Scanner Feed. Is This Possible? [CODE]<?php $filename = '<script language="JavaScript" src="http://api.radioreference.com/audio/listeners.php?feedId=10734"></script>'; $fp = fopen( $filename,"r"); if ($filename >= X) { //// ($email Me @ My … | |
Hey I am a student and i am new on the algorithm subject. I have been given a compulsory assignment that is to set up a program that have Liked list with Nodes. The problem is that i dont understand how to do this: - remove the first node - … | |
Am not looking for a specific deleted file. Let me put it another way, and maybe someone can help me in another way.... Am looking for lost info. Files lopng deleted etc. But since this machine has bearely been used, it's posssible the data is sitting in an a now … | |
Dear all, I am certainly not a web developer nor a computer scientist but a little biologist. I developed my tool to analyze some high-throughput biological results and I'd like to make it available online. My prototype : [URL="http://homes.esat.kuleuven.be/~sbrohee/test/new_gsea/php/"]http://homes.esat.kuleuven.be/~sbrohee/test/new_gsea/php/[/URL] Just to make it simple, the user must have the choice … | |
Doing a program that requires 2 web forms, and the program stats "We have elongated the window so you can see that the order information was passed as a set of Request parameters appended to the URL." Can anyone give me an example? I have no idea how to append … | |
HI there, I am having a few problems understanding how drag and drop works in jquery. Say I have this (which is taken from a text book): [url]http://aharrisbooks.net/jad/chap_12/dragDrop.html[/url] In the code you have [CODE] ... //make all drag me elements draggable $(".dragMe").draggable(); //set target as droppable $("#target").droppable(); //bind events to … | |
This code does not update my mysql. [CODE] //the $q is sent from ajax and looks like this thumbsup.546 or thumbsdown.567 //the $q is sent trough a working ajax function and looks like this <a href="#" onclick="thefunction(thumbsup.'.$row['wallid'].');">[+]</a> $q = mysql_real_escape_string($_GET['q']); $findme = 'thumbsup'; $pos = strpos($q, $findme); if($pos == TRUE){ … | |
How can i send a file at my e-mail address? I want to write it in my C program. Is there any simple way to do that? I Use Dev C++ compiler. I am not using C# or VB. Thanks in advance for answering. | |
hi, my name is vic...i got one problem cannot fix....output for the number of times each of the tasks has been invoked...i run 3 times each of the tasks but the output always is this program has run 1 times..... #include<stdio.h> #include<stdlib.h> void doTaskA(){ printf("Start of Task A\n\n"); int input_1, … | |
Hello there.i have to find if elements of a row are equal to elements of another row.this is my code but it wont work. when k becomes 1, i want the for loop at i to start with i=2; can you help ????? int b[][]={ {1,2,23,4,5}, {6,1,8,9,28}, {11,12,13,14,15}, {1,17,18,19,20},}; for(int … | |
Hey I would like to do a ".bat' type of command in Java: Something automated. Im trying to run a program that is sort of shell itself so it just need to input certain words/letters into the command line box. Lets see if I can explain it better with a … | |
hi ... is there a script that make make my v viewers read pdf file online..thanks | |
I need a sample code to retrieve the source code of a page . Ex : I have [url]www.blahblahblah.tld/file.ext?id=blah[/url] I want to retrieve in a char the source code of that site. Thanks | |
Looking for an equivalent container class that matches to C#'s Arraylist collections class. Is there anything that comes close to a container that can provide index based enumeration as well as hold multiple data types. I am trying to create an vector that can hold multiple data types. For example: … | |
hi all, i need to know how to create a thread using pthread_create()? i have never used pthread in c. am i supposed to used function pointer? how to pass arguments in thread function? i need to know everything about pthread_create(). and yes i am using turbo c++ compiler and … | |
Hello every one! i write an implementation for kruskal's algorithm but i think it doesn't work properly! The final tree has loop! this is my problem. Can you tell me how i can solve this problem? here is the code: [CODE] #include <stdio.h> #include <conio.h> #include <iostream> using namespace std; … | |
Hello ,i have problem with code bellow. every data i enter it show me the weight '0'! Can you tell me how can i solve this problem? you should enter number of nods and edges and weight of each edge. [CODE] #include <stdio.h> #include <conio.h> #include <iostream> #include <Windows.h> using … |
The End.