43,549 Solved Topics
Remove Filter ![]() | |
hello ; here is a quastion . i understand it until the red senence , i do not know what dose it mean mathematically ? Write a program that prompts the user to input a positive integer. It should then output indicating whether the number is a prime. Note: an … Software Development c++ | |
I have a problem using Media Player to play a number of parts of .wav-files after each other. While one part is being played I don't want the program to wait. If I set Notify := true; and Wait := False; then Play; I get no sound at all. What's … | |
How can I use Mysql for JDBC connection.How to make data source? I can able to done with MS-SQL. | |
I am little bit confuse about this operator. Can any one tell me what does operator -> internally. And what are the importance of -> in pointer? Appreciated in advance for help (all daniweb group). Software Development c++ | |
Hello -- 1. Can you compile C code in Visual Studio.NET ? If so, can you please submit the proper steps in order to do this. Thank You :) Software Development c++ visual-studio | |
My subscription system is now running though with errors here and there.the error that concerns me a lot is a runtime error that says [QUOTE]multiple steps generated an error check value status[/QUOTE] and points to this code....[CODE]r.Fields("companyphone") = txtcphone.Text r.Fields("companywebsite") = txtcwebsite.Text[/CODE] and this code is in my save button. … Software Development visual-basic | |
![]() | Hi, i currently have these 2 files: [code] #!C:\Python26\python.exe #index.py print 'Content-type: text/html\n\n' print '<html><head>' print '<title>My Page</title>' print '</head><body>' print '<h1>Powers of two</h1>\n<ol>' print '<form action="sqr.py" method="post">' print '<label>How many numbers?</label>' print '<input type="text" name="b"/>' print '</ol></body></html>' [/code] and [code] #!C:\Python26\python.exe #sqr.py import cgi a = cgi.FieldStorage() b = … Software Development python ![]() |
I have managed to create a custom sized grid which prints correctly but when I try and print X or 0 a new line is started. Please see the "test" result below. [code] def createBoard(): global rows,columns,board rows = input("How many rows (more than 4)? ") columns = input("How many … Software Development python | |
I need help on an assignment I have. The first part was to write a program that would declare an array with 150 elements, assign the "#" symbol to each element, then print the elements in such a way that it would spell a letter (in this case, "A") within … Software Development java java-swing | |
I wrote this very small program that works fine until I remove the comments for the fprintf function. Basically the program will prompt the user for a numeric value, when the user guesses right(1234) the program exits. When I remove the comments the program never exits...Does anyone have any idea … Software Development c | |
i have 2 forms..when i start my application..form1 loads...then i navigate to form2 and adds some data in database using controls on form2, which should also reflect on form1... My data is not getting reflected on form1, after i hide form2...before giving "form2.hide", i tried giving "form1.show" and "form1.refresh" but … Software Development visual-basic | |
I'm new to this forum and to python in general, so be easy on me please. :icon_smile: I'm making a class to handle all events including mouse events. (I'm using pygame by the way) Heres how it looks so far: [CODE] class Event: #controlls all actions relating to events including … Software Development python | |
[B]hello everybody, im venkat doing my b.e 3rd year... Im currently working on my project of college administration system using vb6. I need help on how to save an image in the access database...i have got the code on how to browse an image. but i'm not able to find … Software Development image visual-basic | |
int fun(int(*)()); int main() { fun(main); cout<<"in main"<<endl; return 0; } fun(int (*p)()) { cout<<"in fun"<<endl; return 0; } the output is.... in fun in main how and in which manner is "main" being passed in the fun function argument in main function. does this way of passing automatically mean … Software Development c++ | |
Hello everyone, I'm learning Python and I have a few questions about Dictionaries and sorting them by a value other than the key. Lets say, for example, I have a Dictionary full of data that needs to be sorted on the 3rd value instead of the key. How would I … Software Development python | |
I was wondering if I can create an arraylist with info already in it... Ex... ArrayList playerinfo = [P0,[[1,2,3],[4,5,6]]] If that makes sense. The info I want in the arraylist will always be the same, as it will be what I am using to test my program. However I need … Software Development java | |
Hi, I am trying to match phone numbers, and want only having format xxx-xxxx. Here is what i have written so far : [CODE]sub OfficePhoneNumber { my @numbers = @_; my $number; my @results; foreach $number (@numbers) { if ($number =~ m/(^\d{3}-\d{4}$)/) { push @results, $number; } } return @results; … Software Development perl | |
I have a file of the following format: a 1 a 2 a 3 b 4 b 5 b 6 c 7 c 8 c 9 Here is my code: [CODE]def file_to_dict(fname): f = open("file.txt") d = {} for line in f: columns = line.split(" ") letters = columns[0] numbers … Software Development python | |
I am trying to determine if a word is a palindrome or not using queues, but I am receiving the wrong results. I have tried several things to get it to work using the boolean variable isPalin. Will someone lead me to the right direction please? I have been trying … | |
Hi all; I am so new in C.I have problem about array .I want to remove same element in array but i dont know how can i do. Can anyone help me example : 1,2,3,5,67,31,13,5,2,1,1,4, the program should produce -->>1,2,3,5,67,13,31 Software Development c | |
i have to write a rock paper scissors program in python, but every time i run my code... [CODE]def rockPaperScissors(): import random computerIndex = random.randint(1,3) if computerIndex == 1: computer = "rock" elif computerIndex == 2: computer = "scissors" else: computer = "paper" player = raw_input("rock, paper or scissors :") … Software Development python | |
Hi, I have a solution set up in .Net with a website. Each page is written in aspx and each code behind file are in the format of aspx.cs. For some reason when I build the solution it builds successfully although does not compile these code behind files to a … | |
Hi all, I want to take this code: [CODE]list_in_list = [[1,5,13,30,-4], [1,5,10,30,-4], [1,5,15,30,-4], [1,5,9,30,-4], [1,5,16,30,-8]][/CODE] and sort it by the 3rd item in each sublist (list_in_list[x][2]) I'd like to do it by the highest number so my output would be: [CODE]sorted_list_in_list = [[1,5,16,30,-8],[1,5,15,30,-4], [1,5,13,30,-4],[1,5,10,30,-4], [1,5,9,30,-4]][/CODE] Any help or suggestions? Software Development python | |
I have a dictionary like {"a":["b", "c", "d"], "b":["h", "i", "j"], "c":["k", "l", "m"]. I need to write a function that returns True if a requested key has requested value. Also, if "a" has "b" and "b" has "h", "i", and "j", then "a" has "b", "c", "d", "h", "i", … Software Development python ![]() | |
Hello. I have a question about Const Int and Points I have this code [code] const int j=18; int *k= (int)&j; *k=110; printf("Data: %d -> %d; %d : %d-> %d\n", &j, j, k, &k, *k); [/code] this well return for me [b]Data: 2280676 -> 18; 2280676 : 2280672-> 110[/b] but … Software Development c | |
Problem: Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: `void getScore()` should ask the user for a test score, store it in a reference parameter variable, and validate it. This … Software Development c++ | |
The line I get an error on is this: [CODE]List accDetails = (List)tm.get(accNo)[/CODE] "tm" is a TreeMap, and "accNo" is a value in it. accNo is a String. I get a build error like this: java.lang.String cannot be cast to java.util.List I have no idea what to do here, I've … Software Development java | |
I've read all the comments on the site on this topic but still can't get this to work. I am using Directx to play video in c#. This is working ok, but I can't work out how to trigger the Video.Ending event. In the `InitialiseComponent` I have `this.MyVideo = new … Software Development video | |
[CODE] #include <gst/gst.h> #include <stdbool.h> static GMainLoop *loop; static gbooleanbus_call (GstBus *bus,GstMessage *msg, gpointer user_data) { switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_EOS: { g_message ("End-of-stream"); g_main_loop_quit (loop); break; } case GST_MESSAGE_ERROR: { gchar *debug; GError *err; gst_message_parse_error (msg, &err, &debug); g_free (debug); g_error ("%s", err->message); g_error_free (err); g_main_loop_quit (loop); break; … | |
I want to add a String to a list, but I get the error [B]Type mismatch: cannot convert from String to List[/B] Initially I did it as follows:[code] List accDetails = tm.get(accNo); [/code] and then like this:[code] String conv = (String)tm.get(accNo); List accDetails = conv; [/code] Both have the same … Software Development java | |
WELL i have five questiosn to answer and use console applciation in c# to answer them in here is the first qeustion: [CODE]2. A telephone company charges its customers 3.5p for each minute they use the phone during the day, 5.4p for each minute during the evening, and 6.25p for … Software Development | |
can someone help me with this problem(factorial) everything is working fine but when I enter a negative number the program crashes somewhere....but n can be any non-negative number Here is da code #include <iostream> #include <string> using namespace std; int fact(int n){ if (n==0) return 1; else return fact(n-1)*n; } … Software Development c++ | |
Hey,everyone.. pls I need a very exhaustive example of a typical linked list for better understanding .Any help will be appreciated..Thanks Software Development c++ linked-list | |
I have been looking for something to make it click in my head on how to get the average of my array and I need help. [CODE]#include <iostream> #include <math.h> using namespace std; int grades[10],a,total; double average; void main(){ cout << "Enter 10 test grades to average:" <<endl <<endl; for … Software Development c++ | |
Well, I just solved the problem I was having. A small and stupid error on my part. If there's a way to delete threads, let me know! Software Development java | |
Can someone please copy/paste the following source and look at the error message? I am receiving too few arguements to function error. Please help! //preprocessor directive #include<iostream> #include<fstream> #include<iomanip> using namespace std; //global variables/constants, function prototypes void headerfn(); // void fn without parameters void namefn(string fname, string lname); // void … Software Development c++ | |
how can i create an database dynamically i.e. my code creating database while running taking an user input?? i have seen code like below working Dim db As Database Dim ReS As Recordset Set db = OpenDatabase(App.Path + "\Data\" + Userinput + "\Memo.dat") Set ReS = db.OpenRecordset("Memo") ReS.AddNew ReS("Title") = … Software Development visual-basic | |
I have a java aplpet in eclipse. How do i get my java applet to load in an html web page. I put the .class file from the bin director in the same directory as my web page. I tried applet tag but it gives me an empty white box. … Software Development java | |
is there a way to caputre the values in a datagrid and bind them to a sql table? I have a datagrid bound to a sql query with some editable cells and I wanted to know if the updates could be sent back to the sql table. is there a … | |
Hello, I'm a C newbie (first time using C at university) and after reading a few books, I still have problem implementing & understanding structures and pointers. I have the following structure: [CODE]typedef struct data { double average; }Tdata; Tdata stat = {0};[/CODE] Now I have two functions which are … Software Development c data-structure | |
Hello all, I'm working with exponentiation and I have an assignment to write a code for loop initialization and loop body but unfortunately, I don't even know what that means. I was given the following information: Input x // can be any float Input y // has to be a … Software Development c++ | |
I am trying to make pygame draw a shape from a list of shapes imported with fileIO but i get a pygame import error please help [CODE]import random import pygame w = 640 h = 480 x = open("shapes.txt") z = x.readlines()[n] n = random.randrange(6) screen = pygame.display.set_mode((w, h)) pygame.draw.z(screen, … Software Development python | |
I'm working on a project for school. Normally I'm a C++ guy, but I have to go through standard C before that, so I'm struggling with certain aspects being different, such as getline. Here's essentially what I'm doing, I have a data file that has a certain about of lines … Software Development c | |
I am doing an app which inclueds richTextBox, for inserting text. I put some text into richTextBox and save it into my sql database (column is varbinary(MAX) data type, with this code: [CODE]byte[] myFile = Encoding.UTF8.GetBytes(richTextBox1.Text);[/CODE] Here the text is changed into binary data, and them I add parameters and … Software Development | |
When I start NetBeans I get a dialog with the following: [QUOTE][B]Cannot locate java installation in specified jdkhome: C:\Sun\SDK\jdk. Do you want to try the default version.[/[/B]QUOTE] I click Yes and everything seems to work ok. Now, I did have the SDK installed but didn't have any need for it, … Software Development java java-netbeans | |
Correction: The subject line was supposed to have said BAR CHARTS, not bar codes. Rather than reinventing the wheel, I'd like to know if something already exists that will get going me in the right direction. I have a program that, among other things, ftp's files to multiple computers in … | |
Oh man, I'm sure you guys are going to have a good time making fun of my newbie self, so enjoy! I have output that looks like this: [' sum\n', '\n', '1257869640: 6.8744400000e-02\n', '1257869660: 6.8744400000e-02\n', '1257869680: 6.8634000000e-02\n', '1257869700: 6.9022750000e-02\n', '1257869720: 7.0189000000e-02\n', '1257869740: 7.0189000000e-02\n', '1257869760: 6.9119800000e-02\n', '1257869780: 6.8245000000e-02\n', '1257869800: 6.8245000000e-02\n', '1257869820: … Software Development python | |
I need to make multiple action listeners for 4 radio buttons and a regular button. They all need to call different methods from another class I currently have [CODE]Import javax.swing.*; import java.awt.*; import java.awt.event.*; public class CardGameCH15 extends JFrame { public CardGameCH15() { super("Card Game"); add(new CardTable()); } public static … Software Development java java-swing | |
Drawing Hello 1. Horizontal Hello 2. Diagonal Hello Enter choice: 1 * * ****** * * **** * * * * * * * ******* **** * * * * * * * * * * * * * ****** ****** ****** **** Drawing Hello 1. Horizontal Hello 2. Diagonal … Software Development c | |
I am creating a gridview dynamically using Itemplate but I have run into an issue where the event handlers I create for my drop down boxes in edititem template are accumulating every time it fires. To be more specific. When I enter edit mode and select a new item in … Software Development session |
The End.