43,549 Solved Topics
Remove Filter ![]() | |
Hi Guys, Can anyone help me redo this, so it'll be a list comprehension instead? def parseAnnotation(annotation): ExonStartAndStop = [] d = annotation.split(',') for i in d: removeparenteses = i[1:-1] numbers = removeparenteses.split('..') ExonStartAndStop.append((int(numbers[0]),int(numbers[1]))) return ExonStartAndStop example usage: print parseAnnotation('(1834..2736)') ---> [(1834, 2736)) Software Development python | |
Hi, do you know why my output does not working properly.. Actually my output should looping,but it straightly ending the program.. [CODE]#include<conio.h> #include<stdio.h> int main () { int choice = 0 ; while ((choice>=1)&&(choice<=5)) { printf ("\nPlease Choose No 1 , 2 , 3 , 4 , 5\n"); printf ("Enter … Software Development c | |
Hi everyone. I am currently working on a small project, where I have to interface an ERP (OpenERP) with another system (SugarCRM). For that, I am going to make use of the middle-ware Mule ESB, and to retrieve the ERP data, I will make use of a Java EE 6 … Software Development ide java java-netbeans queue user-interface | |
Hello do you know why my output not looping ? Even I already use "do" to make this code for looping.. [CODE]#include <stdio.h> #include <conio.h> int main () { int hari; double duit; do { printf ("Mari rent kerete..."); printf ("\nkalau 1 hari = 100"); printf ("\nkalau 2-4 hari = … Software Development c | |
Hey guys, I am trying to learn single linked lists and at first I was having some trouble but now my code works perfectly. At first my program would crash, and when I tried to debug it, it would always crash where ever I had a 'delete' operator within the … Software Development c++ | |
Hey guys, I'm making a little pokemon game in java and i've come across a problem. The basic algorithm i use for movement is as follows: - if the player has pressed a particular key set the speed(float) accordingly (if key stroke was up, X speed should drop (since i'm … | |
Please i want to end a program in a function outside function main. also want to end executing a function of type void without allowing it to end but don't know how. please help me out. Software Development c++ | |
I am experiencing a similar problem everytime I stay too long in coding. here is the problem: When I EDIT a code, or move a position of a button or textbox or anything, or any other changes is done, and i debug it, the changes I made won't appear. (the … Software Development vb.net visual-studio | |
hi I have successfuly created an access database with vb.net accept it is not password protected. Can someone help me to password protect this DB. Here is the code I use. Thank you [CODE] Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Try Dim cat As New ADOX.Catalog … Software Development microsoft-access vb.net | |
Alright, so basically I have this program going, it reads the text file perfectly, I also have some arrays created. Now I need it to store each team's rebounds, assists, and points separately. From there I need to get the mean, median, mode for each section (which will be completed … Software Development java | |
Is there any way to extend gaps between jmenuitem? Software Development java | |
Hi everybody I'm trying to write such a code: [CODE] import pps.PPSFrame; public class X extends PPSFrame{ ..... } [/CODE] Of course there's no such pps package in java. Where can i find it ? or at least PPSFrame.class ? Regards, | |
Hi, I have written a program which reads the text from the text file cleans it for some specific letters or phrases and then saves it in another text file. I am having a problem in rewriting the processed or cleaned data (after it has removed some phrases and characters)onto … Software Development file-stream file-system vb.net | |
I have a function that takes a reference to an interface class as a parameter. I have created a derived class from the interface class, but when I try to call the function with an instance of my derived class as an argument I get a compiler error saying "error: … | |
I create one web application in vb.net then tell me can i run this web application on another computer where visual-studio not installed. please reply as soon as possible..... Software Development vb.net visual-studio | |
[B]Background:[/B] An application that opens a file, searches the file for the old password, replace the old password, and then saves an closes the file. The file is used by another process. [B]Servers [/B] I have two environments one for dev and prd. [B]The Issue[/B] * On prod the files … Software Development file-stream file-system regex | |
I'm trying to make a cllient-server chat that only needs to be able to handle 1 connection. First, I have a data-type question: 1. At the moment I am using this code to get messages [CODE] BufferedReader ins = new BufferedReader(new InputStreamReader(sock.getInputStream()));[/CODE] And this code to send messages [CODE] PrintStream … Software Development client-server ios java | |
Basically I am reformatting a list that looks like this ko10101 K01392 K09134 ko34231 K05789 ko13452 K04665 K07881 into a csv file that looks like this: ko10101\tK01392 ko10101\tK01392 ko10101\tK09134 ko34231\tK05789 ko13452\tK04665 ko13452\tK07881 [code]while (<OUT>) { my $line = $_; chomp; if ($line =~ /^$/) { next; } elsif ($line =~ … Software Development perl | |
So here it is, this is my new problem, we were assigned to create a simple ATM Machine: Automatic Teller Machine [B] Balance Machine [D] Deposit [W] Withdrawal [Q] Quit Select you option: (input letter here) when i choose balance this window should pop out: Your Balance is 0.00 OK … Software Development java | |
Hello, I'm having a problem with finding and printing an element in a vector. I want to search my vector to see if an element starts with a sub-string, and if it does, I want to write the whole string to a file. The first part is done, I just … Software Development c++ | |
Is there anyway we can clear only a selected part of the console window? clrscr() from conio.h & system("CLS") clears the whole screen. So how to clear screen selectively? For example, one of my old code prints this, [ICODE]Enter the limit for the array size (Max: 20) 10 Enter the … | |
How to display data in datagridview starting from the record which we pass at runtime? In C# For example, there is 10 rows in a table. When i run the app i'll pass 5th record's value so it should show all data of table starting from 5th row. | |
Guys I have this kind of problem where in I have a listbox and two buttons. Each of my button is labeled UP and DOWN. When I press UP, the current item in my listbox will be moved one level (or index) up and when I press DOWN button the … Software Development vb.net | |
hey everyone in daniweb. i have a problem here. let say i have 2 arrays one is a and second is b. how do i compare each of them and insert to new array c? i do it like this [CODE] Dim a As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Dim i As … Software Development vb.net | |
I am creating a library database application. I created a custom Book class to hold data from the database. My library class lets me access the data and some methods return Book objects. The problem is when I need to return more then one Book. I want the method to … Software Development | |
Hello people in daniweb.... i was stucked in doing my project here.. i nid to create a program that assigns a student to the available section. So.. i want to populate my data in datagridview using mySql as database.. while populating these data.. the datagridview should create a new checkbox … Software Development vb.net | |
Interface: [CODE]import java.awt.Rectangle; public interface Doubler { public void makeDouble(Rectangle newRectangle); }[/CODE] [CODE]import java.awt.Rectangle; public class RectangleDoubler implements Doubler { private double x, y, width, height; RectangleDoubler() { x = 0.0; y = 0.0; width = 0.0; height = 0.0; }//end of default constructor public void makeDouble(Rectangle newRectangle) { x … Software Development java | |
Hi everyone, I am trying to find a way to highlight the active button appearance on my winform.Here I have a simple Text Editor with a richTextBox and a btnBold button located at ToolStrip which can change the font Style to be bold or not.Now I want to change the … Software Development | |
Hi I have a small problem with with my bubble sort. Everything else in my program works fine if I remove my bubble sort. This is the part of code for the bubble sort. [CODE] //bubble sort based on animal breed if (numberofanimals > 1)//making sure there is more than … Software Development java java-swing | |
I have a field in my tables where the guidance counselor would have to type in Notes about the student. For example, Alex is in Grade 1 and he have an offense wherein he pushed his classmate, that note will be saved in the database. And then when he turned … Software Development vb.net visual-basic | |
Well... im making some kind of graphic engine for console in [B]c++[/B], ASCII based, just for exercise... anyways, i was wandering, can i print text [B]faster[/B]? Right now i'm printing the whole map of characters (pix[160][120]) in a [B]single line[/B], so it is fast, however i need it faster cause … Software Development c++ | |
Hi everyone, I'm trying to pass data to managed object arrays. In this case i got no errors also no correct output. So what's wrong in the code below ? Please help. PS. This code writes " MyDataType" on textBox1 ??! [CODE] ******************* * MyDataType.h * ******************* using namespace System; … Software Development c++ | |
I am running trough the [url]www.winprog.org[/url] tutorial, I have run into yet another error. [CODE] #ifndef __BORLANDC__ #include "winres.h" #endif [/CODE] it says it cannot open "winres.h", which I would agree with because it is not located on my computer at all! Is this file part of some other program, … Software Development c++ | |
ive been working on this script as a project, and when i run it and click on the button to sleep(its going to be an rpg game) it loops and sends the command a bunch of times through the function. [CODE] import sys, random, time, pygame from pygame.locals import * … Software Development pc-peripheral python | |
[CODE]# 619480 import time from random import * def main(): lst = [] result, length = 0, 500000 while result <= 0.50: for i in range(length): lst.append(randint(1, length)) value = randint(1, length) t0 = time.clock() linearSearch(value, lst) result = time.clock() - t0 print("This LINEAR SEARCH took {0:4.2f}seconds with a length … Software Development python | |
Application coding Project Name: PhoneProblem Write a program which allows the user to input information to solve the following problem: “Sometimes it’s difficult to decide which phone to use – my mobile phone or my home phone. If I’ve got free minutes left on my mobile phone, then I use … Software Development java | |
Problem: I'm having trouble in this part of my code [CODE] if (sexCode[ctr] == 'F') totalF++; else totalM++;[/CODE] I want my program to determine how many females and males in the list but whenever I execute my program I always get an output with an error that looks like this: … Software Development java | |
Need help, I need to know on how can VB.net validates the format of each cell on the excel file that it opens, for example, the first row should only be numeric, or cannot be null, is it possible that vb.net can check it before it inserts it in the … Software Development dataset microsoft-office vb.net | |
Just what is wrong with this simple code of mine? [CODE]#include<stdio.h> #include<string.h> #include<stdlib.h> main() { int i=0, num; char a[8]; char keyword[8]; system("cls"); while(i<8) { num = rand()%3; if ( num == 0 ) a[i] = 65 + rand()%26; /* 65 is the ascii value of A */ else if … Software Development c | |
Can someone tell me, step by step, how python interprets this code? [CODE] Numbers = [1,2,3,4,5,6,7,8,9,10] Numbers[8:3:-1] [/CODE] I know that the "-1" is the counting bit of it, and it goes in the negative direction, but I'm lost on everything else... :( Software Development python | |
hi all, I am creating a basic threaded server and chat client... so far everything is going to plan however i am confused as to how i will make two clients(which ever they maybe) connect and send their data to each other. My idea is in the server app i … Software Development asp.net client-server | |
In a program i have to calculate pow(2,N) where 0<N<=1000. which data type is suitable for this? I have used unsigned long long int but its range is also limited. Software Development c | |
Hi, I'm doing an app that adds info to a MySQL BD [CODE] Imports MySql.Data.MySqlClient Public Class curso_add Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.Filter = "Ficheiros de Imagem |*.jpg;*.bmp;*.png;*.gif" OpenFileDialog1.FilterIndex = "2" OpenFileDialog1.Title = "Escolha uma imagem..." OpenFileDialog1.InitialDirectory = "C:\" OpenFileDialog1.ShowDialog() End Sub … | |
Hi, I’m having difficulty with the GetForegroundWindow() API function and the .hWnd property. I want to check whether my application has the focus in the Windows environment and if it does, prevent an automatic time-out. I’m trying to do this by comparing the handle of the window that has the … Software Development api visual-basic windows-api | |
Hello :) i am an aerospace engineer that has a dream to become a programmer. and after that i wanna to specialize in game development. my strategy is to learn C# in .NET by doing big projects, and i am doing it ok i guess. suddenly i saw the XNA … Software Development | |
Hello daniweb, I've been having problems with a program I'm trying to make, in my function definitions, I'm trying to reference the output of one function in the other's definition, but not sure how to, I'm guessing pointers could help me but I'm not sure how to use them: These … Software Development c++ | |
Hey friends, I want to compile a C program using Command prompt. I have the turbo C compiler. Please show me the way with a simple example. Software Development c | |
Title says all. I need to make a code that gives the prime factorization of a number and put them in a (this is important) a list. Software Development python | |
Hi everybody, I wrote a game in which you have to guess a number generated randomly,but when i try to assign a random number to the variable, it just doesn't work but it compiles fine. The code : [CODE]#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () … Software Development c++ | |
Im trying to put current system time in YYMMDD format but having problem with day function. is Day() which returned day of month in VB6 not available in VB.Net? If I want to get the current day of month, how would I do that? [CODE] Dim dt As Date Dim … Software Development vb.net |
The End.