199,114 Archived Topics
Remove Filter ![]() | |
Working on the maze program, with '*' indicating a wall, ' ' indicating a corridor, and '#' indicating a solution path, where I must use a recursive backtracking algorithm, I cannot seem to print the '#' symbol for the solved maze. Here is my new code: #include<iostream> #include<fstream> using namespace … | |
import java.util.*; import java.io.*; import java.text.*; import java.lang.*; public class Pascals_Triangle public static void main(String[] args) throws IntegerEntryFailException { new Pascals_Triangle(); } public Pascals_Triangle() { int lines = 0, index = 0; char q = ';'; String string = null; Triangle myTriangle = new Triangle(); Scanner scan = new Scanner(System.in); … | |
Hi guys I've never worked with script before and I'm not sure but I think the solution around my problem will be in script but don't take in mind that yet as I said I've never worked with script. I have a DVD+RW I want to burn or embed a … | |
How can I see the data that I passed through the following script? $('#btn_update').click(function(){ $.post("../inc/set_session.php", { key: "phone_mode", value: "update" }); var data = $('addform').serializeArray(); $.post('phones_post.php', data); }); | |
Hello, I am just starting out with Java. But I had a big puzzle when I am in the first chapter. It says that we have to "initialize" the handle when we are creating one, like String s = "asdf", And later it says we have create a new object … | |
I have these tables and I want to show the percantege of customer with deliverd to pending and the in another sql statment show the number of customer with deliverd to pending I'm not sure how to calulate these two. I tried the build query on APEX , but it … | |
I need to read in sentence and then put each letter into an arraylist. When I'm done I need to out put the letter that were in the sentence and how many times they appeared. ex: hello how are you h2 e2 l2 o3 w1 r1 y1 u1 So, I … | |
I try to run a script which has #!/bin/bash but i am getting error as "Illegal option --" /bin/sh is not bash , aborting . i try to change the first line to #!/bin/sh this time it is saying x: unexpected operator i tried runnigscript with ./ and sh, but … | |
a set will be represented by the list of its components, writing a difference function set list i don't how how i do it in c++ please can u help me | |
Hey Daniweb, I have recently started working with threads in the c++11 library. I started with a simple dispatch mechanism where I have a queue and that would get passed to the threads and the threads would take turns emptying the queue. Since each thread needs to share the queue … | |
how to code a program using c++ so that a customer can rent upto 3 books and how to ban that user if not returned the books. Please help. | |
What is the difference between fscanf and fgetc? I have a few people arguing with me on the differences. I thought fgetc reads character by character of a file. I thought fscanf reads the whole file. Is that corrrect? Can someone elaborate on what I forgot? | |
So for my homework i needa write a code that requires me to look up on a T key and adding stuff to T values. Could someone help me plz? (ie can i set both the key and value to template type) p.s. sorry not being able to expain the … | |
I am trying to create stored procedure which will insert one row in the first table and identity of inserted row in other two tables. For some reason I am receiving error "Procedure or function expects parameter '@id', which was not supplied.". My code is as follows: ALTER PROCEDURE InsertProf … | |
def main(): p =input("Enter your sentence: ") words = p.split() wordCount = len(words) print ("The word count is:", wordCount) main() I get the read out: Enter your sentence: Hello world Traceback (most recent call last): File "C:/Python27/idk.py", line 11, in <module> main() File "C:/Python27/idk.py", line 3, in main p =input("Enter … | |
how do i backspace from last number and also clear th? last equation and add a quit button????????? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): ft = Font(family=('Verdana'), size=14) return Button(frame, text=text, font=ft, width=3, command=command) def frame(frame, side=LEFT, bg="black"): f = Frame(frame, background=bg, padx=5, pady=5) … | |
I have multiple jcomboboxes spread throughout my program. Most of these boxes get their data from names or text strings found in databases. Normally when adding a new item, it is added to the bottom of this list. What I want to do is when I add an element to … | |
Please help me, I want to make a quiz in python (And a game, if I get the time), can someone help me? I saw the topic projects for beginners, but it was a .dat file (which I opened using notepad 2), I don't know how to use a dat … | |
![]() | I found a script online to have a div stick to the top of the window once you scroll to it, and I got it working fine in Firefox and Opera but in Chrome and Safari the sticky div stops before it gets to the bottom of the page. It's … ![]() |
HI I'm working with a php script and connecting via PDO to a database My php file retrieves all data from datebase when I selected one radio button for example 2GB usb driver. This is my html code <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>form php pdo</title> </head> <body> … | |
Rewrite the following piece of code using only if() and while() statements: case'a': p = one(q); break; case'b': p = p %2; case'c': do { r += p*q; p *=2; } while (p < 20); break; case 'd': case 'e': for(i=0;i<4;i++) { p += q+r; q = q/2; r = … ![]() | |
HI. I'm new at programing in Java and I made a little program that: 1. Show current date 2. Show curent time 3. When button about pressed pop up about 4. When button setalarm pressed set Alarm(for begining in minutes) The problem is when i run the program everything works … | |
My teacher give me this, write this in C++, but I have a lot of project, please help me Write a program "computer". The program allows the user to enter an expression, then print the results to the screen. Note: - Expressions parentheses, brackets can nest - Expressions will have … | |
I have another problem this time if anyone can help with random files i am writting and displaying records from the while but i want to display all records in the file that has data say i have 100 records but only 15 contain user data i want to display … | |
Hey All! kindly please tell me how to get user input right after the outtextxy function in graphics mode. Compiler : Turbo C , Win XP here is my program: [CODE]#include<stdio.h> #include<conio.h> #include<graphics.h> void main() { int gd=detect,gm,s; initgraph(&gd,&gm,"c:\\tc\\bgi"); cleardevice(); outtextxy(100,120,"enter number here : "); scanf("%d",&s); getch(); }[/CODE] now here … | |
I want to develop a web application. In that I need to implement that the user can't open it in more than one instance in any system. I want to restrict it based on the user and machine. ie. a single user name should be used to login to the … | |
Write a program that displays the frequencies of sales commissions. The commission for each salesperson is calculated as $200 plus 9% of gross sales. For example a salesperson who grosses $5000 in a week makes 200 + .09 *5000 = 200 + 450 = $650 The program will input a … | |
hi everyone im doing small vbproject that must auto generate id using the current date format in vb.net-(VISUAL STUDIO 2012) with Ms access database. When the button1 click the autonumber should be displayed in text. And when it save, it should be saved in the database access. The id number … | |
Hello, I would like to create a macro. I have two worksheets, both containing an ID. Would like to update the price from the second worksheet corresponding to the ID. Any ideas? I am quite new to this so a bit of guidance will be appreciated. | |
#include <time.h> #include <math.h> #include <stdio.h> #include <conio.h> #include <string.h> #include <stdlib.h> #define ROW 9 #define COL 9 int printboard(int grid[ROW][COL]){ int x,y,n,chk; srand(time(NULL)); for(x=0;x<ROW;x++){ for(y=0;y<COL;y++){ do{ n=rand()%7+2; grid[x][y]=n; if (((grid[x][y]==grid[x-1][y]) && (grid[x][y]==grid[x-2][y])) || ((grid[x][y]==grid[x][y-1]) && (grid[x][y]==grid[x][y-2]))){ chk=1; continue; }else{ chk=0; printf("%d ", n); } }while(chk==1); } printf("\n\n"); } } … | |
Hi all, I have created a simple servlet with one one JSP. The files are, index.jsp [code] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Login Page</title> <link rel="stylesheet" type="text/css" href="css/style1.css" /> </head> <body> <div style="background: LightBlue "> <h1 align="center">Sample Application</h1> </div> <FORM action="/myServlet" method="GET"> What's your name? <INPUT TYPE=TEXT NAME="name"><P> <INPUT … | |
write a template for a function called total . the function should keep a running total of values entered by the user , then return the total . the argument sent into the function should be the number of values the function is to read . Test the template in … | |
When doing a linked list of chars with just a single character do you think it's better to use pointers in your struct like this? Typedef struct String_Node { Struct String_Node* next; Struct String_Node* prev; int id; char* c; } String_Node_t; Or better to not use a pointer with the … | |
Tryin to get this project to open on the server but before i can even see the php file inside i am getting errors. Solved a few but cannot see the error here hopefully ye can help. Error 1 = SCREAM: Error suppression ignored for Error 2 : Parse error: … | |
navigation.php <div id="navigation"> <div id="logo"><img src="images/logo2.png" width="160" height="60"></div> <?php include('include/con_database.php'); $result2 = mysql_query("SELECT menu_name FROM menu_order WHERE menu_id='1'"); while ($data2 = mysql_fetch_array($result2)){ echo '<td>'.$data2['menu_name'].'</td>'.'<br>'; } ?> <div id='cssmenu'> <ul> <li class='active'><a href='index.php'>|    Home    |</a></li> <li class='has-sub'><a href='index.php'>    Product & Services    |</a> <ul> <li class='onelayer'><a href='connection.php'>    Connection       <img src="images/arrow.png"></a> <ul> <li class='onelayer'><a href='vsat.php'>    VSAT</a></li> <li class='onelayer'><a … | |
Dear Sir, I have following codes <!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><title>My Contacts</title> <style type="text/css"> body{ margin-top:200px; font-family:Georgia, "Times New Roman", Times, serif; } </style> </head> <body> <center> <img src="Photo96.png"><br/> <a href="">Get Photo</a> </center> </body> </html> It shows this image [IMG]http://i40.tinypic.com/141saa0.jpg[/IMG] I want to upload … ![]() | |
Hi - I am having an issue and can't seem to get my head around it. I am trying to calculate GBP from EUR - which should be easy but for some reason my returned value is always a few GBP more than it should be, yet I do the … | |
I would like to replace ".city1{background:red;}" with ".city1 with http://city1.example.com" so that when user selects a city1 the page goes to the city1 url page. Since I don't need the color box with a message, can I remove the code: var cityChosen = getCookie('citychosen'); if(cityChosen!=null && cityChosen!=''){ var chosen = … ![]() | |
The cookie is not holding and the domain example.com cannot redirect to a.example.com when I type on the address bar. Anyone good at cookies? Any help will be very much appreciated. $(function(){ var city = getCookie('city'); if(city !=null && city !=''){ window.location.href = 'http://' + city + '.example.com'; } $('#citygo').change(function(){ … ![]() | |
I need to create two public static void mains, however when trying to create "mainfunction", I run into the illegal start of expression. Please help. import java.io.*; import java.util.Scanner; public class guessinggame { public static void main (String []args) { Scanner scanner = new Scanner(System.in); System.out.println ("Guessing Game"); System.out.println ("Do … | |
So I was asked to solve this question...however when i compile it, it doesn't work...could somebody tell me what's wrong and how to solve it (im guessing it's something to do with overloading since my lecturer was talking abt it just before this was given)? thanks a lot! #include <iostream> … | |
Hi all, Iam using [B]vb.net and WPF[/B] In a wpf window im showing a datagrid in the load event while in the load event itself,i need to count grand total amount from a single datagrid column and add it to a textbox in same page . My page looks like … | |
For the maze program, with '*' indicating a wall, ' ' indicating a corridor, and '#' indicating a solution path, where I have to use a recursive backtracking algorithm, I am still having trouble print the maze solution. Here is the unsolved maze: 8 12 ********** * * * * … | |
I have a code which add extra memcache instance at run time, but this makes my keys lost. I know there are several libraries available like consistent_hash, hash_ring but I am unable to use them in my code. I know there is ketama available but couldn't find python code sample … | |
Hi guys I need help on adding a value from 1 row to other column 1 row below. I know it's kinda confusing so here's what I want to do: Column_A Column_B Column_C 1 25% 25% 2 15% 40% 3 25% 65% 4 35% 100% So far I don't have … | |
We get the co-ordinates of a projectile at t1, (a,b) at t2 (c,d) at t3, (e,f) and so on as required. Write a program in C++ to calculate equation of trajectory of projectile.. ![]() | |
Hi Everyone I am developing a website. In that i used Gridview with a lot number of column with header text manually using boundfield.I put the Horizontal and Vertical scrollbar using css code. But I would like constant header when i scroll vertically but the header will be scroll horizontally … | |
Dear friends pl help me I want to select data from a data base table Tran with two selection criteria one is number and the other one is text When i use one criteria it works well But i am failed to use the two criteria my code is here … | |
I am having difficulties with the binarysearch function. I managed to get sorting and binary search done. However when I search a name it has to be the entire name for example Allison, Jeff. However, I want to know how to search just the first or last name of the … | |
This is a function that generates a string of random characters to the length that you specify. |
The End.