199,114 Archived Topics
Remove Filter ![]() | |
Hello Guys, I'm considerably Newbie to any programming whatsoever, and i'm having to take Java for my computer Science requirement. I'm currently working on an homework assignment to write an application that reads the (X,Y) coordinates for two points. I also need to compute the distance between them using the … | |
Can someone help me to make a program in java: 1. Generate 2 rows of 50 random numbers (int) from 0 to 99. 2. Search the numbers that appear in the first row, but not in the second, and numbers that appear in the second row but not in the … | |
How to dynamically get the login name after logging in so that i can use it to extract values on myaccount.jsp?? Please help.. | |
HI I have three tables 1. Categorys (ID, Name) 2. Definitions (ID, Name, CategoryID) 3. Versions( ID, Name, DefinitionID) I have generated three objects using EDM 1 Cagegorys Navigation (Definition) 2. Definitions Navigation (Category, Version) 3. Versions Navigation (Definition) I have following problems 1. I want to update the category … | |
hi sir, i have a textbox and loginbutton in first form and wen i click on a valid id in 1st textbox wch is in the database and click on loginbutton it should show the details of that id in the next form which consists of textboxes and a modify … | |
I've got code sections which write and read binary files. But when I print data reading from file. It appears unnecessary characters. [code=cplusplus] int WriteFile(const char* file_name) { fstream file(file_name,ios.out|ios.binary); if(file.is_open()) { string data_block="I don't understand!\nAdd one line"; file.write(data_block.c_str(),data_block.length()); file.close(); cout << data_block << "(" << data_block.length() << ")" << … | |
Hey i'm new here and i need help with a slot machine game that i want to make. So far i have three labels that should be generating random numbers but they won't appear. I also have a label which will total the players money. I have taken so ideas … | |
Hi I'm working on a program that compares the users response to an answer like a quiz. At first I wasn't sure how to do this using cin because the answer was two words. Someone helped me out and showed me the getline command. The only problem is if i … | |
For my script, I am trying to open a text file and print out the information in the console window. However, I am having trouble finding the right way to load it. To start, I need to figure out how to load something in the same directory as the script, … | |
I'm trying to create a Monopoly - style game in C++ using the Dev-C++ IDE, MinGW compiler. I actually wrote this game in BASIC on a TRS-80 back in the early '80s and it worked fine! I've attached a .txt of the code in question with the error codes given. … | |
I made figures with * and when i display it once it works fine but if i try to display it again and again it, the botton of the figure is the only thing that shows I am not sure what is wrong with the loops? maybe someone can see … | |
I have a whole bunch of files (file0000,file0001....file5000), and want to read them all at once in C. Anybody knows? Thanks!! | |
Hi, I have a program, which has some worker threads that are performing tasks. The main thread assigns work to the worker threads. The worker threads wait for a message from the main thread (with data) and start to work. After completion of work, working threads again wait for more … | |
Hi guys, i am a problem when i doing my coding about format a number for normal number with 4 digit , i have idea which is e.g: Dim a As double a = 1/ 2946.33 ' its return is 0.00033940529 If i use format number function with 4digits, the … | |
I must be getting soft.... How the heck to do I programmatically add new rows to a datagrid / flexgrid or whatever grid using VBA? It's not bound to anything and I'm trying to add data on the fly. Any ideas? | |
Hi, I am very new to Python and computer programming language. I have been working on a text file where I want to find the average length of words in a text file. Well, to start with: Let's say I have only one sentence in my text file (we can … | |
anyone know of a free ANSI lisp compiler for download? I want to learn some lisp but I don't want to use REPL in emacs anymore... I want to write source code and compile it haha. | |
Hi! I am new to Scheme and I need help with this problem. Split and return a list of two lists at a given element; call it (split List Element). The given element should be the head of the second list. (split ‘(2 3 4 6) 4) => ((2 3) … | |
i am using netbeans for displaying my midlet, and am using sun wireless toolkit emulator, and one knows how to change the emulator to nokia or samsung for example? lets says samsung D900 or nokia 5300 for example. thank u all! | |
No errors when compiling and I can comment out most of the main function and it still frezzes. Remove the SDL parts and it won't freeze up but then again the SDL is most of the program. CODE: [code] //Main.cpp #include <SDL.h> #include <iostream> #include "Socket.h" #include <fstream> #include <string> … | |
Well i have script that inserts text a user submits into a database. I want to add a section that lets other users view the text submitted but others in a sort of paged gallery. Im completely stumped on how to make paged content. For example, it goes into the … | |
Hi all, Please have a look at the left menu in this link [url]http://kuwaiteshop.com/index.php?lang=en[/url] I want a similar menu in any language wither its free or I have to buy I want it to be easy to add categories & subcategories Kind regards & thanks in advance ('',) | |
Hi all, I'm quite new to C++!! I'm also having a bit of a problem with a for loop Its that I have an if statement inside a for loop [code]if (cuno == customers[i].custno)[/code] when I try to add an else within the for, it repeats the message 3 times … | |
Hello.. i've this HW.. i did what i can do.. but there were some errors that i couldn't fix.. and one point i dunnu how to do it which is change negative variables to positive ones?? can someone tell me how to code that? here is my code: [CODE]#include <iostream> … | |
Hi, in my program, I need at one moment to set a window on the top of the others created by my program but not of all the windows (so that it does not popup randomly when I'm doing something else) how can I do it? | |
Hi! I would like to print a text file having some records onto the screen while running my program. Can sumone suggest me the easiest way to do it. I know I have to open the file using fopen() then what... | |
i am not geting the correct output can anybody help me whats the pmistake i have done [code=c] # include<stdio.h> # include<conio.h> void main() { int color; clrscr(); printf("enter any number"); scanf("%d",&color); if(color ==1) printf("violet"); if(color==2) printf("indigo"); if(color==4) printf("blue"); if(color==8) printf("green"); if(color==16) printf("yellow"); if(color==32) printf("orange"); if(color==64) printf("red"); getch(); } [/code] | |
How do you pass a structure array to another class? For example, I want to pass the structure array point[150] to a function in another class/source file. [CODE]#include... struct Points { int xCoordinate; int yCoordinate; int zCoordinate; } point[150]; int main(int argc, char **argv) { ... void DisplayPoints(); [/CODE] The … | |
I have created Table in SQL server with visual studio 2005 Table name Student and table data ID,name, surname, indeks, years, I have this code in C# [CODE]protected void Button1_Click(object sender, EventArgs e) { // try //{ SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=\"|DataDirectory|\\db_lab8.mdf\";Integrated Security=True;Connect Timeout=30;User Instance=True"); // ("Data Source=.\\SQLEXPRESS;AttachDbFilename=\"|DataDirectory|\\db_lab8.mdf\";Integrated Security=True;Connect … | |
Just started working on a project that is using Python to drive C API's. When the C API's take an unhandled event they terminate using a C exit(3). How can I monitor for these exit conditions with in my Python code and handle and process the error code used in … | |
i want to run some .exe in pocket pc using c++. how do i do that? thanks | |
I want to send a string through a socket. So, i convert string into array of bytes. System::String ^st = "Ă¿Ă¿Ă¿Ă¿details\x00"; array<Byte>^ msg = Encoding::ASCII->GetBytes(st); And when i convert back the array bytes to a string , i get a different string. System::String ^t = Encoding::ASCII->GetString(msg); MessageBox::Show(t,"asd"); The string t … | |
I have this bit of code that I am using in a project which I got working on a test webpage, and then when I tried to implement it on the real webpage, it all works, except for the jQuery effects. Here is the code: [code=Javascript] $(function(){ $("a.vote_up").click(function(){ //get the … | |
Hi, I have a question a bout a data bound data grid. The grid has 5 columns, the first of which is read only. I thought that setting the column to read only would prevent the user from being able to alter the cell value. However, it apears that I … | |
Hi guys, I want to paint multiple layers of images onto one image. I'm going to be using BufferedImage for this. How would I go about painting these multiple images onto one (in essence creating a new image. sort of like a collage)? Would i get the graphics context and … | |
Hello guys, I was making a website, all looked great, untill I started IE7. there, it really looked like crap. Now I'd like to just make another css file for IE6 and/or IE7 but not for IE 8, because it does look wel at that browser. How can I detect … | |
I'm trying to get this countdown to work. I'm trying to get it to countdown from 10 down to "Blast off", with Blast off being 0. Each output replaces the one before it. I'm very confused. 10 does not print, but 9 to Blast off do. When when it Blast … | |
hi... this is code for txt speech in my program private void btcitaj_Click(object sender, EventArgs e) { SpVoice voice = new SpVoice(); voice.Speak(rtb1.Text, SpeechVoiceSpeakFlags.SVSFDefault); } that is one part of the program...the other one is, word that is being spoken at the moment should be underlined...you know...it's like karaoke. i … | |
I am having a problem with some of this code: [code=php]<?php $q = "SELECT * FROM entries"; $r = mysql_query($q); if(mysql_num_rows($r)>0): while($row = mysql_fetch_assoc($r)): $net_vote = $row['votes_up'] - $row['votes_down']; $row_id = $row['id']; ?> <div class='entry'> <span class='link'> <a href='<?php echo $row['link']; ?>'> <?php echo $row['title']; ?> </a> </span> <span class='votes_count' … | |
So far the move to wxPython has been going fairly smoothly. However, it's crucial that I be able to display items in the center of the screen (images, buttons, and radioboxes). I read about wx.ALIGN_CENTER_VERTICAL and wx.ALIGN_CENTER_HORIZONTAL, but the vertical option just doesn't seem to be working for me. Below … | |
I working on part of a code for a much larger project. I understand how to write a program for a password in the simplest form, but I want to have it let the user guess the password up to 5 times and then not let them run a command. … | |
hi, [code] $array = array("amit", "hello", "amit", "world", "hello"); print_r(array_count_values($array)); [/code] out put Array ( [amit] => 2 [hello] => 2 [world] => 1 ) i want to find the index of amit i.e amit -> 0 and 2 hello -> 1 and 4 world -> 3 How to do … | |
I am encountering a problem while reading config files. The scenario is like this, I have two programs. Program A reads its configuration from a config file and program B is only used to modify the contents of the config file which A reads. The name of the config file … | |
Okay what I've got is a form and an array with a list of courses. The array populates a drop down list, I also have on the form a cost text box. What I would like is when the user chooses a course the cost field to automatically bring the … | |
I want that table be refresh after deleting data i have tried it but it’s not working. Can you pls help me how can I do it using protype.js? this is my code [code]<?php require_once("common.php"); $row=getDetails(); //print_r($row); function getDetails () { $objLogs = new Logs(); $fields = 'id,link,filename,pageid,position,orderid'; $row = … | |
Hello there, Im new in JSP Just want to ask, how I can force web browser to popup download box to download the .prn file that was generated by server? Assume that [CODE]fileName.getAbsolutePath()[/CODE] is the variable that hold the path for .prn file *** Im using pure JSP | |
What is difference between include action and include directive? | |
[code]#include <stdio.h> #include <conio.h> int main(){ printf("*\n**\n***\n**\n*"); getch(); return 0; }[/code] i want help to write this program segment using loop statements to produce the following output * ** *** ** * | |
i am working on c++ server client example using sockets.... whenever i tried to run server 2nd time on the same port it fails !! ok... i know that port is not free and still opened for my previous program but i have used [icode]SO_REUSEADDR[/icode] but still it's not working … ![]() | |
Hello, I am currently attempting to write some code in Matlab which will allow me to output information to a USB port (which is changed into a PPM signal however this part is already accomplished by some hardware). I have an example of how to use the PCTx-PC to transmitter … |
The End.