637 Topics

Member Avatar for
Member Avatar for dreadyteddy

I am TRYING to write a program that finds restriction sites in a DNA file and returns a picture and information box of the enzyme which cuts it. My problems are; a) I have no idea if my program works past opening the file directory. b) I dont know how …

Member Avatar for dreadyteddy
0
845
Member Avatar for ziyakhan10

the program runs successfully but the final output comes out in the form of an infinite loop...please help [CODE] #include<iostream.h> #include<fstream.h> #include<conio.h> #include<stdio.h> struct emp { int eno; char name[20],desig[20]; float sal; }e; void main() { clrscr(); ofstream f1; f1.open("emp.dat",ios::app|ios::binary); char ch='y'; while(f1) { if(ch=='y'||ch=='Y') { cout<<"Enter the name"<<endl; gets(e.desig); …

Member Avatar for ziyakhan10
0
189
Member Avatar for Mestika

Hi, I’m currently trying to develop a method to get a overview of all my different web templates I’ve created and (legally) downloaded over the years. I thought about a displaying them like Wordpress is previewing it’s templates view a small preview windows, displaying the concrete file with styles and …

Member Avatar for mschroeder
0
309
Member Avatar for bharatk

I have 2 lists: a=[0,1,5,7] b=[2,10,6,3] I need to get this list : c=[(b[0]+a[0]),(b[0]+b[1]),(b[0]+b[1]+b[2]),(b[0]+b[1]+b[2]+b[3])] I tried doing this using a for loop: [CODE] c=[(b[0]+a[0])] for i in range(0,(len(b)-1)): for p in range(i+1,len(b)): if i==0: c.append((b[i]+b[p])) else: c.append((c[i]+b[p]))[/CODE] I am supposed to get [2,12,18,21] but I am getting [2, 12, 12, …

Member Avatar for bharatk
0
108
Member Avatar for ilkeamasya

As you see at below I used "-1" as my sentinel value but my program wants the other 6 values i asked for in scanf too. How can i solve this problem? I just want the user to enter -1 and exit my loop. I would greatly appreciate for your …

Member Avatar for ilkeamasya
0
245
Member Avatar for seven11

I need help in determining,using Big-O notation, the upper-bound for these two algorithms i wrote. They both do the same thing but are coded differently. They both look for all the prime numbers up to some limit, N. This first algorithm: [CODE] public static void algo1(){ primes = new int[n]; …

Member Avatar for Rashakil Fol
0
121
Member Avatar for bajanpoet

I've created an SSIS package where I have an FTP Task inside a ForEach Loop container. I am trying to loop through each file in the particular folder and send it to the FTP site. I am sure that I got the For Each Loop working, as the error message …

0
146
Member Avatar for daniss

I fear from loop statements that's why I cannot figure this thing out. I understand the concept put I do not have bigger picture. Here I would like to close the application after the person try 3 times putting the wrong password. [CODE]Public Class MainForm Private Sub exitButton_Click(ByVal sender As …

Member Avatar for Oxiegen
0
145
Member Avatar for innocentkid

Hi everyone, I am doing a program here to ask question about alphabet, and i am only in the middle of it and i face some problem that i really cant solve, need some help here... ok the problem is, for(int j =0; j<20;j++), in output, the 1st jlabel.setText(j) is …

Member Avatar for innocentkid
0
162
Member Avatar for AdventDeo

OK I'm not really sure how to put it but I will try my best to explain my question. Basically I am really lost when it comes to arrays and for loops, so I need help badly. I have in my HTML Form about 20 checkboxes like this: [CODE]echo "<input …

Member Avatar for AdventDeo
0
182
Member Avatar for Ecliptical210

Hey guys, I'm creating a Maze class along with a client class where it allows the user to input a direction (U/L/R/D), and then the validity of the move will be returned as well as the new position of the maze. So far, I've got this, but when I try …

Member Avatar for rue64ja
0
236
Member Avatar for musikluver4

The code below is the file for the constructor method and the get methods [code] //Date: 3/18/2010 public class Taxpayer { private int socSec; private double yearlyGross; public Taxpayer(int taxPayer, double income) { socSec = taxPayer; yearlyGross = income; } public int getSocSec() { return socSec; } public double getYearlyGross() …

Member Avatar for javaAddict
0
175
Member Avatar for musikluver4

[code] //Date: 3/17/2010 import java.util.Random; public class Bingo { public static void main(String[] args) { Random bingo = new Random(); for (int i = 1; i <= 50; i++) { System.out.println("Card #" + i + "\n********"); System.out.println(); for (int j = 1; j <= 24; j++ ) { int bingoNum; …

Member Avatar for BestJewSinceJC
0
5K
Member Avatar for musikluver4

[code] //Date: 3/16/2010 import javax.swing.*; class PizzaChoice { public static void main(String[] args) throws Exception { char[] whatSize = { 'S', 'M', 'L', 'X'}; char size; double[] sizePrice = {6.99, 8.99, 12.50, 15.00}; int s; System.out.println("What size do you want?"); size = Character.toUpperCase((char)System.in.read()); for (s = 0; s < whatSize.length; …

Member Avatar for musikluver4
0
953
Member Avatar for arafat_alam

this is my code for a simple link list...i cant solve the problem of the while loop.it is only working for "1".and i cant swap two nodes in the list and cant insert nodes in a given position...how can i do those???plz help....[CODE]//Pirate™ #include<stdio.h> #include<string.h> #include<stdlib.h> struct list_element { char …

Member Avatar for Ancient Dragon
0
207
Member Avatar for Jerreke

I'm trying to populate the items of a foreach-element in a JSP page. [code]<c:forEach var="request" items="${manageSchedulesBean.userController.getRequestsBySchedule[schedule.scheduleId]}">[/code] Gives me: org.apache.jasper.el.JspPropertyNotFoundException: /secure/manageSchedules.jsp(40,36) '${manageSchedulesBean.userController.getRequestsBySchedule[schedule.scheduleId]}' Property 'getRequestsBySchedule' not found on type $Proxy8 the called function exists, and when i cann manageSchedulesBean or userController, there is no error. Someone got a clue?

Member Avatar for Jerreke
0
106
Member Avatar for mimsc

Hello..Im trying to read the HTML from a URL and I threw in yahoo.com as a test...for some reason, "n.readLine()" is coming back as NULL and the while loop fails...and ideas?? thanx [code] <%@ page import="java.io.*" %> <%@ page import="java.net.*" %> <%@ page language="java" %> <%@ page import="trader.webservices.util.Utils" %> <%@ …

Member Avatar for kk4real
-1
107
Member Avatar for Katsurou

Heyah Does anyone know how can I change the bacground color of my textfield by using : the commands if & else It's for one of my school assignments but I really can't get to solve it by myself i searched through web but nothing :S We must use the …

Member Avatar for ddanbe
0
223
Member Avatar for aakaashjois

Hello, Can anyone help me solve the error in this program?? I get the following error: [COLOR="Red"] Exception in thread "main" java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at converter.main(basic_convert.java:20)[/COLOR] The whole program runs properly. The error come after asking if I want …

Member Avatar for aakaashjois
-1
202
Member Avatar for Mr. Blank

Hi I'm currently stuck in an infinite loop because of the code I've written and i can't stop the code, close excel etc. Basically the code runs after a cell change, displays a msgbox and then causes itself to run again, and while this is happening i can't do anything …

Member Avatar for tipsen
0
224
Member Avatar for ddanbe

Whenever you hear the word recursion, factorials or Towers of Hanoi are never far away. Well here they get mentioned, because we are not going to talk about these guys at all! Iteration and recursion are in fact quite similar: they both loop until a certain condition is met. As …

2
3K
Member Avatar for jcanaway

Hello Every on i have wrote some scripts for my website and i am getting Undefined variable Notices on a couple Variables like exampled below [CODE] $i = 0; foreach($value as $row) { $content .= "<option value=\"".$i."\" ".$selected.">".$row."</option>\n"; $i++; } [/CODE] now every time i view the page with the …

Member Avatar for ko ko
0
224
Member Avatar for rzhaley

hi im trying to create a C# program that'll display * ** *** **** *** ** * type pattern but i can only get mine to look like this when i try to add on to the code * ** *** **** and then it stops. can anyone help on …

Member Avatar for Geekitygeek
0
147
Member Avatar for darkagn

Hi all, I have seen code of the form: [code=php] if(file_exists("foo.php") include("foo.php"); else include("blah.php"); [/code] As far as I know, this is perfectly legal in php. What I was wondering was is it possible to do the following in in-line code in PHP? [code=php] if(file_exists("foo.php") // contains a specialised version …

Member Avatar for darkagn
0
221
Member Avatar for choosenalpha

Hello Guys, I am trying to code this assignment below but I can't seem to get the running total stored for each user that I have listed below(A, B, E). Can someone guide me on how I can store the running total for each user so that I can have …

Member Avatar for choosenalpha
0
413
Member Avatar for CyberPirate1

Okey, so what I'm trying to do is to set about 5 labels to visible using a for loop. [CODE] int nr_bokstaver = slutt_losning.Length; for (int index = 0; index <= nr_bokstaver; index++) { label+index.Visible = true; }[/CODE] I want the name of the label to change according to the …

Member Avatar for Geekitygeek
0
148
Member Avatar for gcardonav

Hi guys: The following code is supposed to the following: 1 - Receive a random number and divide the number by 1000 2 - Then it needs to check if the number is greater than the series number and the cut point and convert the divided random number to either …

Member Avatar for VernonDozier
0
135
Member Avatar for vandna

hey i tried to make a program to find an item in an integer array using binary search technique n by iteration with the help of functions...but i am getting errors....so plz help me out..

Member Avatar for Grn Xtrm
-2
130
Member Avatar for vandna

hey m a new user so didnt knw it... nywyas here's the program i made.. /*A PROGRAM TO SEARCH AN ELEMENT IN 1D ARRAY USING BINARY SEARCH USING ITERATION*/ #include<stdio.h> #include<conio.h> void binary(int array[],int n,int ele) { int beg=0; int end=n-1; int mid; mid=(beg+end)/2; while((beg<=end)&&(array[mid]!=ele)) { if(ele>array[mid]) beg=mid+1; else end=mid-1; …

Member Avatar for Ancient Dragon
-1
137
Member Avatar for xxunknown321

My teacher wrote this code. i am having trouble understanding what is going on in the code. can someone please help me by commenting in the program if you can tell me the importance of the functions and how everything works. please help me.... i'm a noob programmer #include <iostream> …

Member Avatar for Lerner
0
199

The End.