132,726 Archived Topics
Remove Filter ![]() | |
hey guys i was wondering if anyone knew of any tutorials on how to get Python to read and open a XML text file? any help would be much appreciated as i cant seem to find anythign!!! kitty | |
Im wondering how do I correctly generate a random number in Java. Sometimes it gives me a negative, positive, very small range ,etc. Id like a simple formula that can give me some examples to control this better. Thank you very much. Software Development java | |
I am trying to use StreamWriter to debug a stock trading application, and my code creates the file but doesnt write anything to it. I know the method is being executed because other stuff is happening but the file remains empty. I think I am missing something when I create … Software Development file-stream | |
Hi guys! Could someone please show me how to declare scope for variables outside their class? Here's what i have in a class known Create_User: [CODE]Public Class Create_User Public conn As New SqlConnection(My.Settings.HotelConnectionString) Public usercmd As SqlCommand Public userstring As String Public userdat As SqlDataAdapter ............ End Sub [/CODE] How … Software Development vb.net | |
Hi, I am new to C and C++. This is my first course on the subject and my instructor handed out a printout in class with code on it to get us started, but he did not go over any other code or teach us any C. I can only … Software Development c++ linked-list | |
My assignment is to make a program that can perform a card trick. You may be familiar with the concept of the trick, but here is a [URL="http://www.youtube.com/watch?v=0LrUy8W5RnQ"]video link[/URL] from my instructor. It is a fairly long program, but everything works as planned EXCEPT for my "PickUp" function, which is … Software Development c video-card | |
Hi! My purpose is to fill the JComboBox from the database. The code shown below is working - it fills the JComboBox. However, the problem is that when I click on JComboBox to select some item, the error occurs. As I understand, String is casted to Object, and this is … Software Development java java-swing | |
Hi Everybody I am trying to write a small game in Java. I have done few things. But now I want to add some more feature in it. I am creating Enemies in Game.java using UI.java and EnemyShip.java. Now I want [B]to determine how many enemies to create[/B] [COLOR="Red"]the number … Software Development java | |
Hello, I am working on aprogram to convert string to hex ..... its working 100% it takes file name as input read it line by line , convert each line to hex character by character, and write it to file. the problem is when the string look like this : … Software Development | |
can anyone please tell me the function of calloc() and malloc() and the difference between them ... what does (char*)malloc(n) mean ?? Software Development c | |
Well, heres a code that I wrote that displays the number of letters in lower case of any sentence that I put into the program. [CODE]#include <iostream> #include <string> using namespace std; int main() { int count[256] = { }; string str; getline(cin,str); for(string::iterator it = str.begin(); it != str.end(); … Software Development c++ | |
Hi, I want to prevent the sorting and preserve the original order in my container. below is the example. How can I do it ? string one = "6"; string two = "7"; string three = "2"; string four = "8"; veck.push_back(one); veck.push_back(two); veck.push_back(three); veck.push_back(four); veck.push_back("9"); veck.push_back("12"); veck.push_back("13"); veck.push_back("5"); I … Software Development c++ | |
Im trying to figure the way and i just cant, any help would be appriciated. [CODE] void main () void abc (int ss[][7]); { int ss [6][7]=blah blah blah blah.... abc (ss); } void abc (int ss[][7]) { for (i=blah.... for (j= blah ss[i][j]=blah... blah blah } [/CODE] error: declaration … Software Development c | |
hi Iam having trouble arranging 3 words in alphabetical order lowest to highest inputted from the keyboard.Help would be appreciated. Software Development c | |
hi, how to read value from xml file. for example i have booth id stored in xml and i want to read the id number in vb.net. how do i do that. | |
Hi, I'm working on a project where I have two classes, Divisions and SalesStats. I need to read in a text file from a method in SalesStats and store that data into two dimensional arrays to Divisions. When I execute, only 0.0 is coming out and not the numbers from … Software Development java | |
I'll first give you a basic overview of my task, I'm working with Deterministic Context Free Languages. It's not really important if you don't know what that is, I've got that covered. I just need help on developing an algorithm. Basically I'm given an Axiom, which is my starting string, … | |
#include <iostream> #include <string> using namespace std; long getBarcode(long code); //Gets the Barcode from the individual. long verifyCode(); //verifys the code and makes the appropriate conversions. void displayCode(long& code); //Dislpays the barcode given by the individual. int main() { long code; displayCode(code); return 0; } long getBarcode(long code) //Gets the … Software Development c++ | |
Good afternoon, I have a problem reading a txt file in my dll Code: bool LeProtect () { char str [255]; FILE * arq; arq = fopen ("protect.ps", "r"); if (arch) { while (! feof (arch)) { fgets (str, 255, arch); printf ("% s", str); } } fclose (arq); } … Software Development c++ | |
[CODE] #include<stdio.h> #include<conio.h> #include<math.h> int a[70]; //src disk array int b[70];//temp disk array int c[70];//tar disk array int val, srcval=1,tempval=0,tarval=0; int es[3] = {1,1,0}; //array to decide iteration of disks from and to int et[3] = {1,0,1}; int etr[3]= {0,1,1}; int os[3] = {1,1,0}; int ot[3] = {0,1,1}; int otr[3]= … | |
Hello All, I've spent a ton of time on this code and am all of a sudden having a strange occurrence. While executing the case1 in my switch, it blasts through without accepting the user keyboard input and just runs the whole code. I put this section of code (the … Software Development c | |
Hi guys, this is my first post here, and I'd love any feedback you guys can give me. I'm writing a basic program that bubble sorts its ints in an array to ascending order, then resorts some of those specific ints to the element of the position they represent. What … Software Development c | |
Hi I'm trying to draw a line in java using g.drawLine g.drawLine (int, int, int, int) || x1, y1, x2, y2 im trying to draw this : g.drawLine (xCenter + 200 * Math.cos(2 * Math.PI * 3 / 7), yCenter + 200 * Math.sin(2 * Math.PI * 3 / 7), … Software Development java | |
Hi all Please help me out. I plot a file [B]output1.txt[/B] in the following way :: [CODE]gnuplot> plot "output1.txt" using 1:2 with lines, \ plot "output1.txt" using 1:3 with lines[/CODE] [B]BUT [/B] now I have [B]many[/B] data files, [CODE]output1.txt, output2.txt, output3.txt, ....,....... ,output1000.txt[/CODE] I need to [B]plot[/B] each one of … Software Development shell-scripting | |
So my assignment is to create a function in Java that takes out duplicate characters from the string. The catch is that it need to be done [B]recursively[/B] (no loops) and it must start like this with one parameter where the string is passed in. Please help guys I've been … Software Development java | |
I am just trying to end this program when the user chooses x or X but without the default "Enter a valid operator." The rest of the program works great (thanks to previous help). Sorry this isn't pasting perfectly. [CODE] do { cout << "Enter an operation: + - * … Software Development c++ | |
is it possible to make a picturebox the acceptbutton? i tried this in form load [code] Dim picturebox1 As New Button Me.AcceptButton = picturebox1 [/code] is there a way i could do this? Software Development vb.net | |
can anyone prvide me certain project topics in c? i guess i noe c well.. but im findin it hard to get topics to work on ? can anyone suggest me any place for projects or topics for the same? [edit] even c++ topics would be helpful... Software Development c | |
Ok... So I have the following program: [CODE]public int seq2 (int n) { if (n <= 0) return 1; else return seq2 (n - 1) + 2 * n - 1; }[/CODE] It gives the following output: 1 2 5 10 17 26 37 50 65 82 So that means … Software Development java | |
Hello everyone :) My C++ class just started learning strings the other day. We were given a simple program that's due tomorrow, but I'm having a bit of trouble with it. I've emailed my teacher, who says I'm on the right track but need to fix something in my while … Software Development c++ file-system | |
I'm calling to a method, from a method And I have this code: [CODE]public int ValidateInfo () { return this.day = 1; this.month = 1; this.year =1900; } [/CODE] However, on the 'Month' line, it is saying that I need to delete it, Why is this? Software Development java | |
I'm importing a .txt list of words into a dictionary and print, "The word seen most was XXXX and it was seen X times." I can import the .txt list into a dictionary and sorted my dictionary by value so my most seen word is at the end of the … Software Development python | |
[code=c++] #include <cmath> #include <iostream> using namespace std; void F2(int, int, int, int&, int&, int&); int main ( void ) { int X=1, Y=2, Z=3, A=4, B=5, C=6, A1=7, A2=8, A3=9; F2(X, Y, Z, A, B, C); cout << "X=" << X << "Y=" << Y <<endl; cout << "Z=" … Software Development c++ | |
I have a payroll program that I been working on for a while and I gotten my code written. Yet, when I compile the program it keep giving me erros and I can't figure out why. I wonder is there anyone out there can tell me why I keep getting … | |
[code] #include <iostream> #include <conio.h> //needed to allow getch() #include <iomanip> using namespace std; int mean(const int [ ], int );//function prototype int main() // initializing the main program { char ch1; cout<<"Please enter the letter M for the mean function or the letter F for the Frequency function"<<endl; cin>>ch1; … Software Development c++ | |
I created a java program to calculate a persons BMI, but we have to convert the weight from pounds to kilos and height from inches to meters using the numbers in my program, but it just doesnt worl the way its suppose to can some PLEASE help me figure it … Software Development java | |
The following code is part of a searchengine the specific piece of code sorts out the different searching options. While running it i get the catch (Exception e) error [CODE] import java.util.*; public class ObtainKey { public static void KeyAnalyzer() { int idx = 0; int tokenCount; String input; String … Software Development java | |
I have a case where I am not allowed to use the string class so I am using a char array. Does anyone have any idea why I am getting all the junk characters after my char array when i print? The input file is a 2 line file containing … Software Development c++ | |
The last time I was making a program, I wanted to input from user a boolean answer (to save space ;)) An input of 0/1 works good (0-false) and (1-true), but if the user inputs the boolean values as "true" and "false", it comes out to be an error. So, … Software Development c++ | |
Hey guys, I'm new here, obviously so if I do anything wrong let me know (gently). This program out puts x = 4 and y = 64 and I'm not sure why? [#include <cmath> #include <iostream> using namespace std; double Square(double); double Cube(double); int main(void) { double x = 2.0, … Software Development c++ | |
Good Evening I have been stuck for a while now while trying to figure out how i can keep my ArrayList sorted when it receives new input. I tried the collections.sort(scores) but i get a error saying "Bound mismatch: The generic method sort(List<T>) of type Collections is not applicable for … Software Development java | |
I am currently trying to develop an algorithm for the following problem: Read data from a text file such as: the driver returns on his glorious day. He's very happy to be safe and.sound at home, with his wife. With that data, i need to print the length of each … Software Development algorithm file-system vb.net | |
Hi, I am new to the perl scripting and need your help regarding one issue. I have a piece in my perl script which looks something like below - if ($rec{user} =~ /Major |Minor |Low |High /oxi ) { print "Reject" . $_ . "\n"; next; } Now the list … Software Development perl | |
Hi, I have to write game Minesweeper in OOP way. I have classes: Square which inherits to mineSquare, emptySquare, digitSquare and class Board which is responsible for initialize and control the game. I have such code: [CODE=c]#include <iostream> #include <typeinfo> #include "time.h" using namespace std; class Square{ public: Square(){ this->isShown … | |
Hello. i had seen in some places, the following piece of code: [CODE](void *)2[/CODE] Can anyone please tell me what exactly this means? What does casting a void pointer onto a constant as in the above case, signify? Thanks. Software Development c | |
Hi, I am a beginner-novice programmer using Python to build custom tools in ESRI's ArcGIS. I have what seems like a simple problem, but I am afraid I'm missing a core concept. Here goes... In this simple example I assign string values to some variables and then change the text … Software Development python | |
hello I am c++ and java programmer and i want to develope user interface for aria2c ( internet download manager ) like IDM( windows internet download manager ) this software( aria2c ) programmed in c++ and i have one problem with this ( i never programmed user interface software with … Software Development c++ gui user-interface | |
I am trying to read in user input which is a file path (riddled with escape characters) into a CString. How can I do this without asking the user to replace '' with '\'? For instance: [code] CString myString; myString = _T("c:\test\file\j\mypath\path\user.bin"); wcout << myString.GetBuffer(myString.GetLength()) << endl;[/code] outputs: c: estQilejmypathpathuser … Software Development c++ | |
i have a very basic c++ problem. this is my problem first i am assigning an integer. int i=000; when i am writing the value of this integer into a file its writing only one "0". How can i write the all four zero in the file. actually i have … Software Development c++ | |
Like it says in the title im having problems with putting a 2D array into a function. Im not sure on the syntax of putting an array into a function and using it, any help is much appreciated! Thanks in advance! [CODE]#include <cstdlib> #include <iostream> #include <string> using namespace std; … Software Development c++ |
The End.