199,114 Archived Topics
Remove Filter ![]() | |
I'm looking for a snippet of code that would let me generate testimonials, quotes or any string value randomly on a webpage. I would like for it be standards compliant, XML based(meaning I would store the testimonials in an xml file), and the less obtrusive it is, the better. Where … | |
This code shows an example of using recursion to simply solve a problem. Note though, it can take a long time to do larger numbers such as the 50th fibonacci numbers this way. Hope this helps! :) | |
My unit doesn't teach this so I am unaware about the correct syntax to go about what I want to do. I have hit google but have produced no answers to my specific problem. So here we go. I have a series of nested structs. Is this possible that instead … | |
Hi guys, could anyone tell me why my code cannot input contents into the file, thanks in advance.[code]import java.io.*; import java.util.Scanner; public class FileIO { /** * @param args */ public static void main(String[] args) { // public void writeToFile(){ try { File outFile = new File(args[0] + ".txt"); PrintWriter … | |
Hi all, I'm a completely new user of python (and by new I mean I started using it yesterday) but I've been programming for a couple of years now in other languages such as Java. I have a question to ask you all. So what I want to do is … | |
Hi to al :)l, Hope all will be fine. I want to include a link in the alert method.I tried this [code=JavaScript] alert("Please enable your java to experience this enhanced page." + '<a href="http://www.java.com/en/download/index.jsp" target="_blank">Free Download Java</a>'); [/code] But this will not made a link it shows all as it … | |
I was given an assignment to create a high/low program (well, the first part anyway) that fulfills the following pseudocode: • Print instructions to the user • Start with the variables high = 1000, low = 1, and tries = 1 • While high is greater than low ◦ Guess … | |
My app works fine when its a .py file, however as soon as I compile it with py2exe 0.6.9 I get LookupErrors when using the email MIME library. I tried including the "packages": ["encodings"] option in py2exe but to no avail. I'll post the relevant code and traceback. (note: not … | |
I have been trying to create a program that outputs four arrays created with random ints doubles chars and booleans. It will compile but when I run still gives me the same variables which have nothing to do with my input at all, but my char array works perfectly. [CODE]import … | |
Hi everyone, So I need to find out if a date entered is a Sunday. If it is, I gotta do something special with this data. I'm not sure if Datepart will help or how to use it effectively to extract if it's a Sunday or if it's 1st day … | |
Hello everyone, I'm having a bit of an issue here. I'm doing a Knight's Tour program for class, and thought I just about had it until this problem popped up. While I was writing my code, I had some simple cout test statements after some of the function calls just … | |
I'm trying to learn how to add and move objects in VB6 through the code module. SO far i've figured out how to insert an object but have no idea how to change the position. This is what i have so far: Option Explicit Private WithEvents cmdOk As CommandButton Private … | |
I have a function like this: [code] bool MyFunction(dist) { if(dist < 1.2) { std::cout << "Passed test!" << std::endl; return true; } else { std::cout << "Failed test!" << std::endl; return false; } std::cout << std::endl; } [/code] gcc tells me "warning- control reaches end of non-void function". However, … | |
i am tryin to make a c++ program to play tic tac toe.........there are some errors hope u guys can help me out......... [CODE]#include<iostream.h> #include<conio.h> #include<stdlib.h> char matrix[3][3]; void cou(void); int main() { int m,n; char ch='y'; while(ch=='Y'||ch=='y') { for(m=0;m<3;m++) { for(n=0;n<3;n++) { matrix[m][n]='\0'; int i,j,sum=0; while(sum<10) { if(sum==0) { … | |
Hi, I'm writing an application which is intended to run as a service. Everything works fine except if I try to read a file. When running the app as a normal application I can read the file content. As soon I start the app as a service I got the … | |
The following is the randomized Binary search tree insertion algorithm mentioned in sedgewick's book. "This function makes a randomized decision whether to use the root insertion method of Program 12.13 or the standard insertion method of Program 12.8. In a random BST, each of the nodes is at the root … | |
Hello, This is Gokul Rangarajan. I need a suggestion or code in JavaScript which reads the MS Word document page settings and number of pages. I know how to open and read a MS Word document, but i couldn't able to get page properties. Some one please help me with … | |
I have a challenge. I need to provide a solution that would enable me capture images of occupants of several motor vehicles scattered around a geographical area. These images could be still images or video transmitted over the web to my server in my headquaters. I can program in JSP, … | |
Hello friends... I am Jasdeep Singh. I am pursuing my B.Tech in civil engineering from DAVIET, Jalandhar.. I require some help urgently. Actually, we have freshers on 4th September. In freshers, we have one event in which we choose Mr. Turbunator from boys and Ms. Smile from girls. I need … | |
i need help with this C++ array excercise.... it seem quite simple but im not sure what code i need to put where. help is greatly appreciated... Excerise:: [url]http://www.lhs.logan.k12.ut.us/~rweeks/cp1/array.htm[/url] | |
Ok, this is actually very simple I just can't figure it out... first of all I'm a complete beginner in C++ and I was given this assignment to do a dice game (yes assignment, please note that I'm not looking for a code, just help on how to do it). … | |
can i use statements like: int num; fread(&num,sizeof(num),1,stdin); fwrite(&num,sizeof(num),1,stdout); i tried this and debugged the code the variable is having the correct value. but that is not getting displayed. can't i use stdin , stdout in fread and fwrite. | |
Topic The topic of this question is: db_Connect does not connect. Hello and Thank you in advance for any assistance. [b] System info:netbeans project,database attached or provided at: [url]http://cid-b5cb457363230793.skydrive.live.com/self.aspx/.Public/school.zip[/url] [/b] [b] The purpose of this post is: Try to get a sql statement to work [/b] [b] The functionality of … | |
I have a Form A that is displayed on a thread that also contains a heartbeat monitor. When an error occurs, we need the new form, Form B to be displayed until the close button is depressed and for Form A to be non-functional until that time; however, we need … | |
I had a code written long time ago which was working fine for small records but as the number of records begin to increase it completely failed. I am attaching the file with comments which will help you understand the problem. For fewer records you can see it working at … | |
Hi, I have made a little custom control which has collection of inner properties. I've also successfully tested a custom control which accepted "literal content" (innertext) into a default property. I have both models working separately, but I'd like to combine the two into one control. That is, I want … | |
I know just little enough about building macros in Excel with VB to be dangerous and currently have the following situation. I've created a macro for use with log files that generally contain the same information. The macro was recorded using the Ctrl+F action to find text string 1, go … | |
i am tryin to make a c++ program to play tic tac toe.........there are some errors hope u guys can help me out......... #include<iostream.h> #include<conio.h> #include<stdlib.h> char matrix[3][3]; void cou(void); int main() { int m,n; char ch='y'; while(ch=='Y'||ch=='y') { for(m=0;m<3;m++) { for(n=0;n<3;n++) { matrix[m][n]='\0'; int i,j,sum=0; while(sum<10) { if(sum==0) { … | |
could somebody help me creating a program through which i can control utorrent via bluetooth.. as in startin pausing or updating trackers and stuff.. could u please create 1 and explain me? plz | |
i am doing a project in class that you have to type in a password and have the password given back to you with astrixs which i did but the second part is i have to write an event handler that repeats the password back without the astriks here is … | |
The assignment is to design a savings account program. The program has to include: a constructor that accepts an argument of type double and uses it to set savingsBalance. If the value is passed is less than 0, set savingsBalance to 0. Add a public member function named calaculateMonthlyInterest that … | |
This program I wrote has the following error: (33,5):Declaration syntax error (64,2):Declaration missing ; [CODE]#include <stdio.h> #include <conio.h> int range1(int a); int range2(int b); int range3(int c); int range4(int d); int main() { int in, ctr, ctr1=0, ctr2=0, ctr3=0, ctr4=0, ctr5=30; for(ctr=1;ctr<=30;ctr++) { printf("Enter %d integer values within 1-200: ", … | |
[code] <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:TextBox ID="TxtPassword" runat="server" TextMode="Password" ontextchanged="TxtPassword_TextChanged1"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text="Password"></asp:Label> <br /> <asp:Label ID="Label2" runat="server"></asp:Label> </div> <p> </p> </form> </body> </html> [/code] here is … | |
Hey Guys, sorry but i guess I posted a code snippet when I shouldnt've. That was my first daniweb thread. The program I'm trying to run checks to see if a number is perfect, abundant or deficient. It's perfect if its factors add up to the number(ie 6 = 3+2+1), … | |
pdf_download.php ........................................................................ <?php $file_name=$row['tcb_pdf']; header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=\"$file_name\""); $data=readfile("../new_books/".$file_name); echo $data; ?> home.php ............................................................................... <td align="center" valign="middle" bgcolor="#FFFFFF"><img src="images/rar.gif"><a href="pdf_download.php?name=<?php echo $row['tcb_pdf'] ?>"><img src="images/button_buy.jpg"></a></td> <td align="center" valign="middle" bgcolor="#FFFFFF"><img src="images/rar.gif"><a href="uploads/<?php echo $row['tcb_pdf'] ?>"><img src="images/untitled.bmp" width="43" height="17"></a></td> </tr>[code]hi, I need a help from anybody. I have a page with pdf … | |
Hi folks. I inherited an FTP program from a colleague that left the team so i have to do C++ programming now. The problem is that the FTP program throws up winsock errors. the FTP skips these errors but after a while it terminates the program. So I writing another … | |
Hi All :) A 2003 word document has a ContentType "application/msword", but what is the ContentType of a 2007 Word document? Thanks :) | |
Hello guys, is there a way to detect whether JS is enabled or not, using PHP codes? Thanks in advance. =) | |
Hey guys, I am new to C++ coding. Can anyone help me and tell me how can I get a C++ Compiler free for study purpose. | |
Hello all, I could finally save my array to the textfile but how can I format the textfile so that i will have 9 rows and 9 columns [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click Dim cellValue As String, i As Integer Dim returnValue … | |
If I have a vector v={1,2,4,6,8} and I find my maximum element of this vector using this: " vector<int>::iterator iter_max = max_element(v.begin(), v.end()); cout<<"Largest element is "<< *iter_max; " which works fine. But I need to know the position of this max element. Is it second, third or fourth in … | |
Hi, I have just downloaded the sql server 2008 version. I am currently developing a web application which is to be uploaded on the internet Now the web application and the database both will be uploaded on the same site .To be precise I am new sql server, whenever i … | |
Im trying to create a listview showing images with text so how exactly can i do this? (im using visual studio if it helps) Heres the code that isn't working now [code] // adding images ... imageList1.Images.Add("Unique key", Image.FromFile("...")); listView1.Items.Add("text for image", "Unique key"); /* * more * images * … | |
Using \x I can specify hexadecimal numbers in strings in C, but if I put \x00 then it interprets it as an instruction to terminate the string. As a result I can't express a hexadecimal number with 00 in it using a string! Is there some way around this? | |
I need help with a query. Looking though the forum and other online resources I can usually figure out what I need, but I'm drawing a blank on this one. I have a clients table which has client info in it, and a receipts table with receipt info. what I … | |
When a CALL instruction is executed, the address of the current instruction is pushed into the stack. Then, the execution makes an unconditional JMP to the address specified as the parameter of the call instruction. [CODE].code Test: call delta delta: pop ebp sub ebp,offset delta mov esi,[esp] and esi,0ffff0000h push … | |
I'm trying to understand the sql connection a little better. I have some code that returns data via a stored procedure on the sql server. Here is the code to execute the procedure and put the data in a data grid: [code]Dim tblSteps As DataTable = New DataTable Dim cnPMSQL … | |
Hello every one. I coded a program to seperate words from a file and want to input each seperated part to an array.But it doesnot work.Please help me!! Here is the code [code]#include<stdio.h> #include <string.h> #define max 100 int main() { FILE *f; char data[128]; char *p; int host=0; int … | |
hi... im trying to insert a row into the database... but the query is not run successfully.. [CODE]$sql = "INSERT INTO temp_db (fname,mname,lname,dob,gender,email,country,phno,mobile,userid,password,mti,rtime) VALUES ('$fname','$mname','$lname','$dob','$gen','$mail','$country','$phno','$mob','$uid','$pass','$mt','$rtime')"; $res = mysql_query($sql) or die("cud not add record"); echo mysql_error();[/CODE] this is the code..... im gettin the error from the Die part of the query.. … | |
Hi all.Am new to this forum so cut me some slack if I don't articulate my problem with utmost clarity.My problem is that I have a javascript function such as: function modReg(x,y) { <!-- var answer = confirm ("Do you really want to deregister user" +x+"?") if (answer) { document.leo["id"].value=x; … |
The End.