199,114 Archived Topics
Remove Filter ![]() | |
I've been working on a side project of Tic Tac Toe, it works fine, but I'd like to change the winner function to be dynamic and work for any size board. For example, say I want a 4x3 or a 10x10 board how could I make the one function work … | |
my default in my switch case statement doesn't seem to work, so if i type in a non integer, it will exit, and follow case 0. there are no signs of the default working.. how to solve, i've tried alot! :( bool isFinished = false; while(!isFinished) { ....... .... .... … | |
i = 1 while i < 10000 and i > 0 and 1 : print " still going ..." i = 2 * i Hi i am new to Python and completley useless at it. Can somebody please explain to me why this code prints "Still going" 14 times. I … | |
Hi all. I need to code an offline crawler that acts like a web crawler on a set of given html pages. I know how to read the a=href tag and output those links to the screen. My plan is to modify my code to add more functionality. Instead of … | |
How do you draw a star in Python, I am really confused over it now This is the program I have so far import helper *helper checks if input is valid or not import ecs10graphics07 as gr * ecs10graphics07 is almost the same as the program Tkinter import math starPoints … | |
Basics are: Another area of my program takes in strokes and then uses the recogniser to interpret those strokes into a recognise result. The result of this conversion is saved and is accessible. This is the string part of my question. On another screen I have a panel which takes … | |
Hello! (Spelled polymorphism wrong in title, I know... it's late!) Now, I understand the concepts of both just fine, but implementing them is where I really run into trouble; this is especially when I'm given a specific problem to solve by using them (i.e. my current assignment). Okay so here's … | |
I am designing a Tetris game and am having trouble adding in the array for the bucket, I have it commented out in the code below (the nested for loop) but it seems to drag the game so I know there is something wrong with the for loop. When I … | |
Hi All, I have a sub and trap the error with: ------------------------------------------ private sub mySub(mydoc as string) On error goto goto handlemyerror kill app.path & "\" & mydoc handlemyerror: msgbox "I cannot kill it" end sub ------------------------------------------ mydoc is word document with 2-3 pages length. It works fine to avoid … | |
Hi, I have 2 text box, Text1 is to display the week no and Text2 is to display start date of the week. Do anyone know what function I should use in VB6? Thanks, Annie | |
I was wondering if there is a global matching flag, considering there is a global replacement flag (/g) I'm using this workaround to make multiple matches in a string [CODE] while(!$stop_var) { if($source =~ /(PATTERN)/i) { push(@matches, $1); $source = $'; } else { $stop_var =1; } } [/CODE] is … | |
I have a database of questions for some tests. They will be uploaded on a website so that the users can browse them but I would like to make it hard for the users to copy them. I am using php to interface with the database. I have thought of … | |
Hi i need a good vector video tutorial please give the link in the discription | |
Hi guys, currently im creating a script to view summary report for each student and their assignments.. my database look like this: [CODE]Assignment Title | Group Member | Submit Date Title 1 John, Sue, Amir 2010-10-10 Title 2 John, Sue, Bob 2010-10-09 Title 3 Bob, Sue, Amir 2010-10-06[/CODE] I've created … | |
Hi everybody! Please,help! My problem is as following: in a file XXX1.php we have a form with checkboxes: { echo '<form action ="XXX2.php" method= "post"> What you are looking for: <br /> <p><input type="checkbox" name = "wordprop[]" value ="Option1" >Option1<br/> <p><input type="checkbox" name = "wordprop[]" value ="Option2" >Option2<br/> <p><input type="checkbox" … | |
Quick question From main thread [CODE]double[] ascore; int i; imax=high.highestScore(ascore[],i); [/CODE] From method highestScore [CODE] public class highestScore { // This method checks which number is higher. public static double highestScore(double[] score,int arraySize) { int index; double maxScore=0; for (index=0; index<arraySize; index++) { if (maxScore < score [index]) maxScore= score[index]; … | |
I have an xml file, structure like so: [CODE] <people> <person.1> <fname>brian</fname> <lname>smith</lname> </person.1> <person.11> <fname>joe</fname> <lname>carey</lname> </person.11> </people> [/CODE] I am using openxml to read this file and insert names (and other person information) into a table. [CODE] DECLARE @person xml, @idoc int EXEC sp_xml_preparedocument @idoc OUTPUT, @person INSERT … | |
[CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> int getNumWords(char *name) { int i,numofwords=0; for(i=0;i<strlen(name);i++) { while (name[i]==' ') { i++; //pernaei ta kena osa k an einai. akoma k an einai stin arxi k sto telos } if (((i==0)&&(name[i]!=' '))||(i>=1)&&((name[i-1]==' ')&&(name[i]!=' ')&&(name[i]!='\0'))) { //i 1i sun8iki einai gt an to i … | |
I have an C++ games project due in about 2 weeks i have no former knowledge of C++ and feel like ive leapt in at the deep end our lecturer just kinda put it on us and told us to do it as an self research task and gave us … | |
i trying to to open a text-file in read mode and passing that file pointer to a function which will extract the text from that file pointer .... but every time i build and run the program i get the segmentation fault error at the start of the "loadtoFile" definition … | |
Hi all, I'm relatively new to JS and I have an issue which I can't seem to get my head around... I have a perl script which iterates through an array and populates a table with its values. Within the created table I have a link in each row which … | |
I can't get this to generate random shapes, etc. Basically what I need to do is randomly generate similar lists consisting of: combinations of 'square', 'triangle', 'circle' and 'left'. And random numbers from 1 to 10 for physical dimensions and 10 to 90 for angles Have the program use 'split' … | |
I have a PHP page opened directly from a URL with params in it: http://subdomain.domain.com/phppage.php?id=123456 The PHP page is [I]supposed to [/I]execute a very simple SQL statement to retrieve a single data row based on the id variable. The SQL execution is done this way: [CODE] $id = $_REQUEST['id']; $sql … | |
I'm fairly new to java, but I'm sure I've done this before and now it's not working right. What am I forgetting here? LeftPanel class [CODE]Inventory inventory; JTextField txtMoney = new JFormattedTextField([COLOR="Red"]inventory.getInvWallet()[/COLOR]);[/CODE] Inventory class [CODE] public class Inventory { public int invId = 0; public int invPrice = 0; public … | |
I'm making a shop for my game, I opened a Fresh thing of code for this so this is the only code I'm running, I just want to get this to work before I put it into my actual game. anyway what the problem is, is that no matter what … | |
Hi guys. I have an ASP.Net assignment to do and need some assistance if possible. I previously read a post from a person with the same assignment but this is for ASP.Net LINQ to SQL not windows form. The following is my code forthe batting average. Code-Behind [code] private void … | |
i dont have any experince of software making...i know c ,c++ and web designing lanuguages....how should i start it..to do what i have asked...i have to decide a project | |
I am at the end of my quarter and have two programs to write and need help. I dont even know where to begin. I have decided to change my major to something else, but I dont want to fail this class and hurt my GPA. I have a programming … | |
Call me a noob, but is there a way to use [B][I][U]just[/U][/I][/B] PHP to create a photo slideshow? Or do you need to use flash? I have code that will display images in a random sequence, which is fine. [CODE=php]<?php $pic = rand(1,15); print "<img src=\"images/$pic.jpg\" height=\"100\" width=\"140\" />"; ?>[/CODE] … | |
can someone help me with why this code is not inserting into the database [CODE] Dim MyConnection As SqlConnection Dim sqlstring As String = "INSERT INTO Workers (FName, LName, FullName) VALUES ('" & Me.txtName.Text & "', '" & Me.txtSurname.Text & "', '" & Me.txtFullName.Text & "')" 'Dim data_base As String … | |
I am working on exporting some data to a DataGrid (with no luck). So far I have: [CODE] Private Sub SaveDoc() Dim MyConn As System.Data.OleDb.OleDbConnection Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Try MyConn = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source='c:\book2.xls'; Extended Properties=Excel 8.0;") MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet]", … | |
I keep getting this error on my else. Anyone have any ideas? I don't quit understand this error as the the if works just fine, and it is same thing. it just sends it to a different array. [code] catch ( NoSuchElementException e ) //Error { System.err.println( "Invalid input62" ); … | |
This is a request for some 'best practices' comments from experienced OOP practitioners. I have been in IT from the days of punched cards and have had considerable experience with legacy languages like 370 ASM, SAS, and REXX. For fun, I've taken a college class in C++ and am now … | |
see the link [URL="http://www.gfln.org/Regsiteration.aspx"]http://www.gfln.org/Regsiteration.aspx[/URL] and click on radio button from 1 to 7 IE produces div (as many as clicked) but in forefox it got some how hang .please post back me if i need explain any thing else in my problem any urgent reply is highly appreciated | |
A simple physics graph... [code=python]import pylab a_time = range(0,141,10) a_R = [3.0,2.8,2.56,2.36,2.2,2.0,1.86,1.7,1.6,1.43,1.3,1.2,1.1,1.06,0.96] for i in range(0,15): pylab.plot(a_time[i],a_R[i], 'x') pylab.errorbar(a_time[i], a_R[i], 0.5, 0.05) pylab.show() [/code] I'm guessing the [icode]pylab.plot[/icode] line isn't needed, but even with this there is nothing connecting the plots together. I'm pretty sure there wasn't anything extra needed … | |
Hello, I want to give alert on click of button my codes is [CODE] Protected Sub BTN_SAVE_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SAVE.Click Response.Write("<script>alert('hello')</script>") End Sub [/CODE] But after clicking it is giving alert message. why? Alok Shrivastava | |
In my form there are two anchor tags [B]Add[/B] and [B]Clear[/B] having same class called button. What I am trying is submit the form data to another page(post) using ajax & clear is for clearing the data using javascript.The problem is that as both buttons having the class the same … | |
If I write 1 letter, I get the error message once. If I write 3 letters, I get the error message three times...... How can I fix this :S? [CODE] #include <iostream> #include <stdio.h> #include <math.h> #include <cmath> #include <stdlib.h> using namespace std; int main() { //vars char user_numberr; //int … | |
What is a transaction and how transaction is managed in DBMS? | |
Helew! I just wana know if someone might have an idea of how I can go about doing this: So attached I have a little example I whiped up. Say you have 3 buttons, button1, button2, button3. What I wana do, is when you click [B]button1[/B], it will magicly turn … | |
here is the code ....plz help [code] IplImage *cur_frame = NULL; IplImage* background=NULL; IplImage*temp1=NULL; //IplImage*difference=NULL; cur_frame=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1); background=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1); temp1=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1); cur_frame=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\frame.jpg",CV_LOAD_IMAGE_COLOR); background=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\background.jpg", CV_LOAD_IMAGE_COLOR); cvRunningAvg(cur_frame,background,0.005,NULL); cvConvertScale(background,cur_frame,1,0); cvNamedWindow("back",CV_WINDOW_AUTOSIZE); cvShowImage("back",background);[/code] | |
Hey guys - I'm working on a new website template. It works great, except for a little bug with the Contact panel. It should slide into the screen from the right side into the center, but fails to do so. I believe it is because of the CSS property "display" … | |
Hi Experts :) I am battling with some small logical error and I need some help.. I want to enable access levels in my windows form application. I have a database with a column named 'UserType'. In this column I have data from 1 to 5. This represents the access … | |
[CODE]// 1. Find the frequencies of individual letters in a sample // text file. // 2. Display this information both numerically and graphically. // a) In A..Z sequence // b) In decreasing frequency sequence // Programming concepts and C++ Language elements used // a) vector of structs, b) sorting #include … | |
Hi, I have two sites [url]www.abc.com[/url] and [url]www.xyz.com[/url], both are using [B]phpproads[/B]. I just want one database for those two websites. PHPPROADS uses database table to redirect site url, but not found how and where it redirects code lies. If anybody knows anything about that then please share with me. … | |
Hi.. This is my first time posting here, so i hope u can assist me. I have this code [CODE]<% '======================= 'Define the names of your functions '======================= Dim Stream Dim Contents Dim FileName Dim FileExt 'Const adTypeBinary = 1 '======================= 'Get the actual file name from the URL that … | |
Hi I'm trying to query the following tables to find out the Resource Companyname and Project Title for any Recruiters who have worked on more than/less than 6 projects within a specified period. These are the tables: dbo.tblResources ResourceID Company Name dbo.tblRecruiters RecruiterID ResourceID dbo.tblProjects ProjectID Datecreated dbo.tblProfiles ProfileID ProjectID … | |
Hi, [COLOR="Red"]Page 1[/COLOR] [CODE] <td width="68"><a href="directory_update.php?updateid=<?php echo $row_Directory['Sno']; ?>"><img src="images/btns/delete.png" width="36" height="36" border="0" /></a></td>[/CODE] [COLOR="red"]Page 2[/COLOR] [CODE]mysql_select_db($database_Connection, $Connection); $query_Directory_update = "update directory set Sno=<?php $Directory_update['Sno']; ?>where Sno='$_GET[updateid]'"; $Directory_update = mysql_query($query_Directory_update, $Connection) or die(mysql_error()); $row_Directory_update = mysql_fetch_assoc($Directory_update); $totalRows_Directory_update = mysql_num_rows($Directory_update);[/CODE] [COLOR="red"]Error[/COLOR] [COLOR="Green"]Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or … | |
Hi everyone... I am developing this student management system which has one form that saves student data( including student image). Now w.r.t saving student image I want that the user should insert image from the folder where he has saved student images. On the save button the image path of … | |
why the following things cannot be : 1.why i cannot extend the non static variable from static method or something ? 2.why i cannot use a variable directly in the class as : [ICODE] class abc{ int i=4; } class xyz extends abc{ int j=7; i=9; /*this should be valid … |
The End.