199,114 Archived Topics
Remove Filter ![]() | |
Here is an example I was thinking of ... [code=python]import random import time def delay(seconds): time.sleep(seconds) def shuffle_hitlists(my_hitlist, mo_hitlist): """shuffle the two lists and return the result""" random.shuffle(my_hitlist) random.shuffle(mo_hitlist) return my_hitlist, mo_hitlist def battle(my_hitlist, mo_hitlist, my_strength, mo_strength): # player starts swinging first for k in range(len(my_hitlist)): my_hit = my_hitlist[k] mo_hit … | |
The code below runs fine but I want some help how can I get output of my original input and reverse of that i.e. ABCDE Z. WXYZ ---> EDCBA .Z ZYXW The below is the code for this. [CODE] #include <iostream> #include <cstring> using namespace std; void swap(char& a, char& … | |
Hi all, This is me again ,I want to learn programming in ASP.NET using C++ I've installed the IIS ,and made an .aspx file with the following code: [CODE]<%@ Page Language="C++"%> <html> <head><title>Welcome!</title></head> <body> <p align="center"><font color="RED" face="Snap ITC" size="12pt">Welcome to your New ASP.NET Page <br> "Using C++"</font></p> </body> </html>[/CODE] … | |
Dear friends, Could somebody please help me make a gridview that can be resized with a mouse? Thank you in advance, Dmitriy | |
Hey, getting a new error in my code... Its almost done, cant figure out what is wrong with this. ERROR: non-static method isPrime(int) cannot be referenced from a static context [CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int x){ int divisor = 1; do{ divisor += 1; } … | |
so i guess there must be some sort of an error in my logic but on line 119 i started a counter that only goes up when a pair is made in the game. Since there are a total of 8 pairs, i set that when the counter is 8 … | |
[url]http://www.d-scribe.de/webtools/jquery-pagination/demo/demo_options.htm[/url] these type of jquery pagination are riable for large data...??? where query doesnt need 'limit' in it..!!! thanks | |
Greetings all! I'm facing a problem that's been throwing me for a loop for a while now. I'm implementing an old VB application that someone else wrote a long time ago onto a VM. I've gotten past a few different issues/errors just to get new ones (that's the name of … | |
Hello everyone; I did a program using arrays -for the first time- I've got errors, I fixed some and there are others left that I couldn't straighten any help is highly appreciated here is the code : [CODE]# include <iostream> # include <iomanip> using namespace std; int read_car (int cars[], … | |
Hello guys and gals of the DaniWeb community, this time I need help in how to save text to a file in the text editing application I created. Well, I tried using the code below but it didn't do the work: [CODE]If (RichTextBox1.Text Is Nothing) Then MessageBox.Show("No text to save!") … | |
[CODE] for(Iterator it2 = tries.iterator();it2.hasNext();) { tobedeleted2 = (FpiRightTree) it2.next(); tobedeleted2.setIndex(f); f = f+1; }[/CODE] I want to that in thread function.can someone give me help in creating thread? Tries is global. so in all threads it will be shared. i want to call thread. to do a for loop … | |
I have a script for renaming files, but can not seem to iron out the bugs. I am trying to rename a list of files: File1.File1 File2.File2 etc I need them to be renamed to: File1 File2 etc This is the code so far: [code] import os import sys import … | |
Hi guyz... Can you help me in my problem??? I cant figure out the scheduling grid for hotel system,.. What i mean is "it is a grid that you can drag and assign a date to a particular room to reserved or book a room...." can you help me guyz??? … | |
Hey guys, I'm modifying a classified site, it's written in PHP. What I'm trying to do is when a user comes in the website for the first time (aka no cookies created) the value of the variable would be -1, when they click on a state to browse in, it … | |
The program runs perfectly, however I am having an issue adding a discounted price. Another thing I noticed when I run the program is that the switch statement doesn't calculate the discounts at all. [CODE]// DiscountPrices.java - This program calculates total cost for discounted items. // Input: Interactive. // Output: … | |
Hai I have some html files and i would like to display them in a random manner using the php. can any one help me out..I have been trying this one.. but it is not working.. [CODE]<?php $dir="./clock/"; $nimg="10"; $itype="html"; $rnumb=rand(1,$nimg); echo "<a href=".$dir."clock".$rnumb.".".$itype."></a>"; ?> [/CODE] | |
I have a button that activates a script to create a new radio button. I want the radio button to be of the class draggable. However, my code isn't quite working. Any thoughts on this are appreciated. [code] <head> <script Language="JavaScript"> function modify(){ var newElem= document.createElement("radio") newElem.id = "newradio" newElem.appendChild(newElem) … | |
Just because there is no help for this online that i could find, I'm posting this for all the other coders... This makes use of a third part class downloaded from code project... AWESOME FTP class this , i owe the creators a huge thank you ... [CODE] using System; … | |
how can i get only value of 'v' from the following url [url]http://www.youtube.com/watch?v=NMAYr709-9Y&feature=dir[/url] i.e NMAYr709-9Y with php | |
Hi, i need some help, i need to delete some data in DBF file, and i have this code... but when i execute it .. nothing happends? Dim connectionString As String connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=D:\Documents and Settings\dmarinkovic\Desktop\Data1\FP550_EO022450;Extended Properties=dBase IV" Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(connectionString) Dim cmmd As … | |
[CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Collections; namespace CoinsExercise12StephenBarDev { public partial class FrmStephensCoinage : Form { Array ValueOfCoins = Array.CreateInstance(typeof(String), 101); double CoinInput; public FrmStephensCoinage() { InitializeComponent(); ValueOfCoins.SetValue("0.00", 0); ValueOfCoins.SetValue("0.01",1); ValueOfCoins.SetValue("0.02",2); ValueOfCoins.SetValue("0.03",3); ValueOfCoins.SetValue("0.04", 4); ValueOfCoins.SetValue("0.05", 5); ValueOfCoins.SetValue("0.06", 6); ValueOfCoins.SetValue("0.07", … | |
Can someone please help:(. I have a database with a field Date. I made the datatype to Date. But when I code the date in php I use the date() function to get the current date it donesn't want to insert in the database. Please help. For example my code. … | |
this is my db table content tble name : cars id | make | model | trans | fuel | year | km | vin | regdetails | state | price | features what i want is search the car with this form [CODE] <form id="form1" name="F2" method="post" action="search.php"> <div … | |
hi every body, i am sure its not that much hard but somehow i stuck in situation which look very much unclear to me. in fact i have a table through i am selecting different records each records will be printed with the checkbox what i want to insert checked … | |
I have created an application using C# which makes use of a MSSQL Express database. Now that my project is completed I would like to package the application and database into a single executable which can be run on any machine making use of the .net 3.5 framework. My questions … | |
here is the question: 5. Write a basic program that allows the user to write names to a text file and read from the text file and displaying them on the screen. [CODE] string filename; StreamReader outputFile = new StreamReader("c:\\PriceList.txt"); // Read the first item. filename = outputFile.ReadLine(); // If … | |
Hello Im trying to compile the following code but I get the error "left operand has incompatible type" because of the line: test2_2_U->Out2= test2_2_U->Out3; I have been looking through the forum but I couldnt find a hint what Im doing wrong. Any hint is appreciated. Thanks Thomas [code=c] static BlockIO_test2_2 … | |
I will start out by saying that I have no experience with PHP at all.. sorry. However, since I do some asp.net etc I thought I would throw myself into it.. I have come across a problem though. I've found a mail form using jQuery. What it's supposed to do … | |
[CODE]itemlist[loc] = new product(codes,size,descrip,color,olditem + 1,url)} else // new item {olditem = itemlist[item_num].quan itemlist[item_num] = new product(codes,size,descrip,color,olditem + 1,url); items_ordered = item_num item_num = item_num + 1 }[/CODE] The above code is in javascript. the value of 'itemlist' is set whenever i click on additem in different html pages. I … | |
[code] class MyList(list): def __new__(cls, *p, **k): if not '_the_instance' in cls.__dict__: cls._the_instance = list.__new__(cls) return cls._the_instance def append(self, name): if name not in self: list.append(self, name) def extend(self, names): for name in names: if name in self: continue list.append(self, name) def remove(self, name): if name in self: list.remove(self, name) … | |
Hello all, I would like to make the Tab movement can also pressing the "Enter" Key. I have google and found the code which possible to used. But I found its not running fine with me. When I press "Enter" key,it runs fine for the tab movement. But if I … | |
I have been writing a program using arrays and strings.Here is my question. A class of students takes a 20 question multiple-choice exam;each question has 5 choices(a,b,c,d,e)only one of them are correct.In "tests.dat"Each record of which consists of a student id, followed by a blank, followed by students 20 responses. … | |
I would like to do windows from with would guide the user through the installation of my already done win application. I already did the Setup Project (File > Add > New Project and select Other Project Types > Setup And Deployment > Setup Project. ) but I would like … | |
hai all, i want to refresh particular part of the page ,not whole page. is it possible? . if so, how is it? ......... | |
I'm working on a n-tier solution with VB.Net 2008. In this solution I have 3 projects started (the UI, BLL and DAL). I have the BLL referenced in the UI and the DAL referenced in the BLL. What I cannot do is use a User class in the BLL in … | |
I have a file which is already written till some lines. I have a blank line at the start of the file and I want to write in that line using Java. I thought creating a FileWriter object by using FileWriter(filename, true) and then a BufferedWriter object will start writing … | |
hi all. i want to crop png image. when i am croping the png image i got "Fatal error: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: fatal libpng error: zlib error in C:\wamp\www\taslan\admin\products.php on line 120" error message. at line no 120 shows imagepng($bgim_new,$bgth_file_name,100); this function | |
Hi.I've just begun using delphi 2010.I used to work with 2007 and I had a lot of 3rd party components installed.As an example Infor POwer is a very powerful 3rd party component and I use it almost in all my applications.But now when I install them on 2010 it fails.I … | |
Hello All, I work on PL/SQL web applications with oracle Application Server. I wish to start using some of Ajax features in my applications. Do I need to perform any application/db server side configuration changes to accommodate Ajax implementations? Your suggestions will be of great help to me. Thanks in … | |
I retrieve three pieces of data from my MySQL table and need to pass one of them as a parameter in a link to a dynamically populated .php page and two of them use as the link text. The echo statement below is not working. Could you please see what's … | |
I'm making a project in Visual studio 2008. The details of the project are: - It is a MFC Application - The application type is Dialog based with Use HTML Dialog enabled - The project style is MFC standard and... - The use of the MFC is in a shared … | |
Hey, This is my first post so go easy :) I’m in the middle of designing a website users can download files from. I’ve searched the web and found the perfect example of what I’m trying to achieve which is something clear and simple ([url]http://www.getfreefonts.info/free_fonts.a.html[/url]) From the category’s at the … | |
Hi all, Since its been a while now that i am learning php I undertook a project to develop event calendar in php and mysql. There will be a public calendar published on site which every1 can view. Then as a user logs in he will have his own personal … | |
My ultimate goal is to fill an array with user inputted positive and negative numbers. This script I wrote is very limited, but it should give you an idea of what I am trying to do. Basically, I ask how many numbers and then reserve 3 spaces for each number … | |
Hello everyone!! I have an assignment to create that wonderful mortgage calculator. I have the code working, but when i try to catch an error (No matter is it is left blank, or a letter is typed in) the program crashes. Not sure what i am doing wrong, but any … | |
HI All, can any one help me out in [B]selecting multiple files [/B]for uploading them to the server. The requirement is as follows. 1) SELECTING MULTIPLE FILES ([B]around 50 images[/B]) at a time using Shift/Control keys from keyboard 2) upload them to server . Note: 1) The solution should work … | |
i am trying to make a page that able to search the data that store in the sql database, i would like to have a field search which enable the user to choose the field they wan to search. the problem i facing is i dunno how to submit the … | |
Hi guys, How to load any other document formats other than [ICODE].txt[/ICODE], and [ICODE].rtf[/ICODE] (which naturally supported by LoadFile() function), like [ICODE].java, .c#[/ICODE], and [ICODE].doc[/ICODE] into [COLOR="Red"]richTextBox [/COLOR]object????? any help appreciated. Thanks in advance. | |
hi, I have created 2 tables called "User_Info" & "Auth_Users". In "User_Info" table "ID" is the primary key. In "Auth_Users" table "ID" is the foreign key. I have created a "User Form" through which I am trying to capture the data. Since the primary key is an auto_increment value I … | |
Design a PhoneCall class that holds a phone number to which a call is placed, the length of the call in minutes, and the rate charged per minute. Overload extraction and insertion operations for the class. Overload the == operator to compare two PhoneCalls. Consider one PhoneCall to be equal … |
The End.