199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for doolali

Hey guys, ive just started learnng c++ after a year or so of java, one issue that has just cropped up for me is repeating input from console. if for example i ask for an input, expecting just 1, and the user inputs 2 with a space inbetween how do …

Member Avatar for doolali
0
561
Member Avatar for pythonlearning

[CODE]list=[] list_start=[[1,2], [2,2], [1,3]] for element in list_start: list.append(element) list[0].append([2,3]) print "list=", list[/CODE] The result is, list= [[1, 2, [2, 3]], [2, 2], [1, 3]] instead of list= [[1, 2], [2, 3]], [2, 2], [1, 3]] If check: >>> list[0] [1, 2, [2, 3]] >>> list[0][0] 1 >>> list[0][2] [2, …

Member Avatar for pythonlearning
0
145
Member Avatar for Klaurac

Hey I have a videorental program and each video object should have an display image. [CODE]private Image VideoPicture;[/CODE] I searched the web for tutorials, but couldn't find any. I know how to use the file input dialog, but how do I assign the image to the CarPicture. I haven't figured …

Member Avatar for Klaurac
0
88
Member Avatar for qingmui

3. How many 3 digit numbers are divisible by 17? Write a function to print them and return the sum. (The sum being the sum of the 3 digit numbers that are divisible by 17). 4. Write a program that does the following to an image: changes black pixels to …

Member Avatar for TrustyTony
0
270
Member Avatar for FatherLen

i am trying to use mscomm in html and javascript to communicate with a device over the serial port but when i run a test of the activex object in a .hta file i get the error "Automation server can't create object". does anybody know why its doing this? it …

Member Avatar for Taywin
0
402
Member Avatar for djcrab

I'm a little lost on these questions of a quiz I just took...Any help is appreciated! 1st question: What is the value of returnValue in the following code segment? returnValue = 17 = = "17"; answer choices: True False 17 NaN *I chose True<--I think that's right, but I'm not …

Member Avatar for Taywin
0
102
Member Avatar for khaled_jawaher

pls,i need help in inserting a date from a text field using java, to mssql database. i am getting incorrect date for example when i insert 13/3/2010,i am getting the date 1/3/2011.i want a solution,i've searched a lot but useless. the code is: [CODE] try{ java.util.Date d; String s; d …

Member Avatar for kramerd
0
2K
Member Avatar for wow.lk

I write some coding i want to get 2 output like Example (1) of object Employee:  Id#  Name :  Age:  Sex:  etc. Example (2) of object Employee:  Id#  Name :  Age:  Sex:  etc. i just dont want a long code.. …

Member Avatar for tenorsax08
0
157
Member Avatar for dustbunny000

[ICODE]import random import itertools def test(number): return random.random()*number [/ICODE] Say I have a function and I want to repeat it x times so that I may calculate the standard deviation. How can I do this? I've tried using itertools.repeat(test(5),3) but it prints repeat(value,3) which I can't calculate the standard deviation. …

Member Avatar for TrustyTony
0
89
Member Avatar for pamdooley

I have the following code:[CODE] if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO inventory_software_request (Software, Name, NISD, Room) VALUES (%s, %s, %s, %s)", GetSQLValueString $_POST['software[]'], "text"), GetSQLValueString($_POST['name'], "text"), GetSQLValueString($_POST['nisd'], "text"), GetSQLValueString($_POST['room'], "text")); [/CODE] to send data to a MySQL database. the form includes a list of software …

Member Avatar for hielo
0
189
Member Avatar for indianscorpion2

hello everyone. i am a student of computer engineering. i was wondering if there are any online tutorials on the basics of algorithms and algorithm design techniques.

Member Avatar for ddanbe
0
212
Member Avatar for Limiter

Hi guys, I am relatively new to Python. I am trying to code a program in Python and part of it involves checking that each input only have the characters 1 to 9 occuring only once. My code are as follow: [CODE] for i in range(1,3): num = str(raw_input("Enter row …

Member Avatar for TrustyTony
0
301
Member Avatar for roachae

I'm a novice when it comes to MySQL so I'm not too sure about how to go about this. I have two tables, and both tables have two fields I need to deal with. Table investors has fields Dealer and Rep. Table advisors has fields dealer and rep. investors.Dealer = …

Member Avatar for roachae
0
183
Member Avatar for bmos31

So I have an assignment to redefine an array-based Stack push() function. The problem itself sounds like it totally defeats the purpose of a stack, but this is what I have been assigned: Rewrite the push function so 'myTop' is always 0 instead of one more than the index of …

Member Avatar for Fbody
0
153
Member Avatar for FALL3N

If I already have a JListBox set up, but the text is too small, how do I make the font of the elements larger?

Member Avatar for fdevanand@gmail
0
219
Member Avatar for nurul_208

hye guys.. i've got a problem on inserting the data from mysql database into the textbox in php.. i dont get any error reply..but im still cant retrieve the data from the mysql database into text box in php.. below are the print screen and my sourcecode: this is the …

Member Avatar for nurul_208
0
763
Member Avatar for vaibhav1983

Hi All, I am trying to implement a directory like url rewriting in php. My URL goes like this [url]www.xyz.com/Parameter1/Parameter2/1[/url] This request is forwarded to a php script, getParams.php Parameter1 and Parameter2 in the URL are GET parameters. "1" in the url indicates the page number. The URL rule that …

Member Avatar for vaibhav1983
0
143
Member Avatar for changeco

I need to make a Registration show hide based on whether you are > 48 hours or =< 48 hours out... I wrote this before based on a start and end time... [CODE]<?php $startdate = $row_product['startdate']; $enddate = $row_product['enddate']; $todays_date = date("Y-m-d"); if ($enddate <= $todays_date) { header('Location: expired.php'); } …

Member Avatar for changeco
0
120
Member Avatar for teedoff

Hi new to php and I'm trying to learn how to set up connections to the database on my remote server. I'm using dreamweaver to create recordsets, then dispaying the results. Dreamweaver creates a connection file(I named student.php) automatically based on your database connections and login info. However, this poses …

Member Avatar for teedoff
0
341
Member Avatar for vikas.kethineed

I have this method to see whether not the year is a leap year or not. heres the code i get the error missing return statement at the end. What can i do , i can't add return true or return false, becuase that screws it up. public boolean isLeapYear() …

Member Avatar for kramerd
0
228
Member Avatar for cableguy31

I need to write code that can determine if an IP address is in a subnet based one the subnet address and mask. I don't even know where to begin with this, so any tips would be appreciated. Thanks.

Member Avatar for cableguy31
0
1K
Member Avatar for rayden150

i have been in a java course it´s kinda expensive but anyways i am thinking that im going to quit cause its not hard but its really overwhelming dont you get that feeling?, theres just to much to learn!, i cant believe people learned more than 1 programming language also …

Member Avatar for ceyesuma
0
161
Member Avatar for ButterFly21

I have given instructions to write some code and i have to follow the comments giving and i get stuck and some point so can anyone tell me what i did wrong /* * Returns the percent change from the original to the desired servings. * The percent is expressed …

Member Avatar for ButterFly21
0
81
Member Avatar for Nidhi S.

[CODE]import java.awt.*; import java.awt.event.*; import java.awt.image.*; import java.io.*; import java.sql.*; class MyCanvas extends Canvas { Image img; public MyCanvas(Image img) { this.img = img; } public void paint (Graphics g) { if (img != null) { g.drawImage(img, 0, 0, 1000, 1000, this); } } public void setImage (Image img) { …

Member Avatar for Nidhi S.
0
1K
Member Avatar for kanna5836

Project Makcik Minah has opened a new children art class. During the Registration Day, 30 children have registered. Makcik Minah’s assistant, Munah has manually obtained information from the children that include name, birth certification number, date of birth and gender. All these information is required in order to divide the …

Member Avatar for packetpirate
0
178
Member Avatar for miturian

So, in the course of a simulation of a neural network I have two classes: neurons and synapses (which are basically the coupling between neurons). Synapses mediate information between neurons, so a neuron has to be able to speak to a synapse, and that synapse has to be able to …

Member Avatar for Fbody
0
125
Member Avatar for ButterFly21

Why a i getting this message after i compile my program c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\libmingw32.a(main.o):main.c|| undefined reference to `WinMain@16'| [CODE]/* * p2.cpp * * Created on: Oct 7, 2010 * Author: saturner */ #include "p2.h" #include <iomanip> #include <string> using namespace std; int main (); /* * Converts an amount measured …

Member Avatar for Nick Evan
0
141
Member Avatar for fidget08

Im having trouble with this program. I attached a picture of what is required. Thanks for any pointers you guys :) p.s. I'm very new to this.

Member Avatar for quila1
0
126
Member Avatar for joshisumitnet

Dear Friends, I am following the bestuff.com's active member session. I am doing the following thing... 1. when user logs in, I update my database's field with value 'O' (means user is logged in and fires query which has flag value 'O') But the problem is how to check user's …

Member Avatar for joshisumitnet
0
418
Member Avatar for canadiancoder

Hello folks, I've got a conundrum that Google was unable to fix, so here's hoping someone here knows how. I've got an application and a Delphi DLL and now what I need to do is write a C# DLL which exposes a number of functions the Delphi DLL will use. …

Member Avatar for canadiancoder
0
222
Member Avatar for rkckjk

I have the following code in which it supposed to remove rows that have the first column checkboxes checked, but it only removes one row at a time. If you have more than one checkbox checked, you have to click the command button each time to remove the row. It …

Member Avatar for MegaSofijanov
0
3K
Member Avatar for hateme_devon
Member Avatar for masijade
0
250
Member Avatar for Dimesh

Hi. ----- Thanks for reading ... I want to write for example: ln 3 Is there is any command or function for it ...!

Member Avatar for sharathg.satya
0
4K
Member Avatar for girl.java

hi everyone this is my code. [CODE] public class Qustion3B{ public static void main (String args[]){ double sinx = Math.sin(0.5236); double cosx = Math.cos(0.5236); sinx = Math.pow(0.5236,2); cosx = Math.pow(0.5236,2); double sum=sinx+cosx; System.out.println("sine: " + sinx+"cosine: " + cosx +"sum: " + sum ); } }[/CODE] it continue to show …

Member Avatar for sharathg.satya
0
143
Member Avatar for SKANK!!!!!

[CODE]<script> function addText(event){ document.getElementById("insertid").value += (event.srcElement || event.target).firstChild.nodeValue.toString(); } </script> <textarea id="inserid"></textarea> <table onclick=addText(event)><tr><td>[bbcode][/bbcode]</td><td>[bbcode2][/bbcode2]</td></tr></table>[/CODE] problem is whe i click on the bbcode or bbcode2 it inserts it at the end of whatever is in the textarea. im looking to insert it into where the user clicks(where the carat is) like …

Member Avatar for lifeh2o
0
172
Member Avatar for debasishgang7

im new to php i have a problem.. i wanna design a website that will have index.php as the Home page. The index.php will include header.php(the universal header) menu.php(unuversal menu) topics.php(topics of my websites like global warming,child labour etc..) content.php(a welcome note for Home page.) ___________________________________________________ header.php ___________________________________________________ | menu.php …

Member Avatar for hielo
0
196
Member Avatar for jamesyrawr

Ok for my uni project im wondering if its possible to make a simple game where by the user must click a button ten times to win. the button has to move after every click to a random point on the screen. Does anyone know if there are any tutorials …

Member Avatar for sharathg.satya
0
137
Member Avatar for snehalj

i have taken one mster page in my project. in that one image is there, that image is not displayed in other pages which are related to that master page. i have tried to change image extension also but it didnt work.

Member Avatar for Borzoi
0
184
Member Avatar for IS_student

[COLOR="Green"]hi; i am doing a homework(due tomorrow) and i have a problem with it; when I compile the program it shows no errors, and it takes input ,but does not show the output using function print(); note :the function of the program is to take elements from user,stores them in …

Member Avatar for IS_student
0
115
Member Avatar for mrinal.s2008

Hi, the code analysis tool we use gives below warning for the functions in which memset / memcpy is used "The function writes outside the bounds of dup on line 303, which could corrupt data, cause the program to crash, or lead to the execution of malicious code." could someone …

Member Avatar for Fbody
0
221
Member Avatar for tonyfingures

Hi! I am trying to create a program that can calculate the cost of a internet package once selected and also give a discount. So far, my code only works with doesn't exactly gove me the correct results. Below is my code. Please assist me in identifying the problem. An …

Member Avatar for lolafuertes
0
613
Member Avatar for slap01

im working on something that will display the title and the author, but i have seperate table for the title and author, my code displays the title but not the author, what should i do? heres my code [CODE]<html> <body> <form method=post action="find.php"> <h2>Search For:</h2> <p> Academic Year : <input …

Member Avatar for slap01
0
105
Member Avatar for Bozog

i'm being able to call my text file from my c program but when coming to count the number of paragraphs in the text i can't find what i have to do so that my c program increments my counter by 1 it has to find and empty line. this …

Member Avatar for Martin B
0
1K
Member Avatar for Intrade

What I want to know is if I can call a function defined in a C++ class in Visual Basic through a .dll generated from VC++2010? Is this possible, or do I need to define the .dll with C++ raw functions outside of a class? For example, my class looks …

Member Avatar for Ancient Dragon
0
264
Member Avatar for cassandracritch

If anyone could explain how to design an applet code for a simple house, then modify it. I wil give details if anyone can help.

Member Avatar for nihal_kiss
0
80
Member Avatar for mihird

I am stuck at one multithreaded app. Basically I am trying to update one control from background thread. There are two forms. 1) frmMain 2) frmLog frmLog has one list box (lstStatus) and one function as following [icode] Public Sub SetStatus(txt as string) as string lstStatus.Items.add(txt) End Sub [/icode] frmMain …

Member Avatar for mihird
0
103
Member Avatar for jennylyn

Will you please help me to solve this problem.. this is the code.. [CODE]Imports System.Data.OleDb Public Class Form6 Dim conn As OleDbConnection Dim cmd As OleDbCommand Dim strSQL As String Dim dr As OleDbDataReader Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data …

Member Avatar for lolafuertes
0
437
Member Avatar for ironbill

Hi i have a problem, i make a form with one button and i want to make in c# (windows Aplication) the follows: when i click in button i need to connect in my SQL Server. How can i do that??:?:

Member Avatar for kumar169
0
240
Member Avatar for Nemo_NIIT

Hi 1) I am using C# window application in that i have use one group box and in that i have put text boxes my first i visible and reset i have enabled to false i have insert one button in group box. [COLOR="Green"] I want that on the click …

Member Avatar for ashishkumar008
0
154
Member Avatar for Anuradha Mandal

The output of this code shows only one student's informations. But I want to display the all students' informations. Please find what is wrong?

Member Avatar for vidit_X
0
90

The End.