199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for vt2009

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 …

Member Avatar for Kimpl
0
130
Member Avatar for chris evans

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 …

Member Avatar for chris evans
0
142
Member Avatar for Neon_Jesus

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 …

Member Avatar for drkybelk
0
221
Member Avatar for CleanSanchez

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 …

Member Avatar for CleanSanchez
0
150
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
245
Member Avatar for aizel

how to check date expiration? check expire date in mysql database date------->status 10/27/2010->approve 10/28/2010->approve 10/26/2010->approve date now is 10/26/2010 so it will search from the table where date=datenow then update the status to finish

Member Avatar for aizel
0
144
Member Avatar for vishalonne

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 …

Member Avatar for JamesCherrill
0
175
Member Avatar for Craig2231

Having a problem with my login script, earlier, it was working fine, but now its just letting anybody log in, even if the records arent in the database :s i cant seem to think where it is going wrong [code=php] session_start(); mysql_connect("localhost","razorsh1","********"); mysql_select_db("razorsh1_page"); if(isset($_SESSION['loggedin'])) { echo("<center>Dude, youve already logged in, …

Member Avatar for vibhaJ
0
111
Member Avatar for fobos

Good day all, well i have been searching the web and i cannot find an answer to my question. First off i dont know if i should post this here or in the Javascript section because i am a coldfusion user and didnt know if javascript does this. Second my …

Member Avatar for levine
0
114
Member Avatar for ekailan

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 : …

Member Avatar for Momerath
0
194
Member Avatar for rocky2008

can anyone please tell me the function of calloc() and malloc() and the difference between them ... what does (char*)malloc(n) mean ??

Member Avatar for surendra verma
0
177
Member Avatar for BecomingPro

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(); …

Member Avatar for WaltP
0
118
Member Avatar for Web_Sailor

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 …

Member Avatar for Ancient Dragon
0
101
Member Avatar for Unidennn

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 …

Member Avatar for vijaykrishnabor
0
81
Member Avatar for rollercoaster

hi Iam having trouble arranging 3 words in alphabetical order lowest to highest inputted from the keyboard.Help would be appreciated.

Member Avatar for vijaykrishnabor
0
122
Member Avatar for swathys

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.

Member Avatar for swathys
0
101
Member Avatar for tchild

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 …

Member Avatar for ceyesuma
0
126
Member Avatar for JuanKawada

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, …

Member Avatar for JuanKawada
0
168
Member Avatar for harika.k

Hi, I am coding the loginpage, i want know how to code 1.) To check whether the User entered username,pwd matches with any of the rows of database data, if it is so it should navigate to next page like inbox.aspx. As i am new to Asp.net, please help me …

Member Avatar for vijaykrishnabor
0
2K
Member Avatar for asapgyritos

#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 …

Member Avatar for griswolf
0
120
Member Avatar for douglaspr

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); } …

Member Avatar for douglaspr
0
114
Member Avatar for Rahul.menon

[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]= …

Member Avatar for Shift-Stop
0
228
Member Avatar for thejoej

I use a search engine on my web site [url]www.barmirrors.com[/url] I got it from Search Site Pro. It opens the search results in the same window thus making it hard to get back to where you came from. I would like the search results to be dispalyed in a new …

Member Avatar for thejoej
0
206
Member Avatar for digitaldan

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 …

Member Avatar for gerard4143
0
109
Member Avatar for eviah

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 …

Member Avatar for eviah
0
201
Member Avatar for muraj

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), …

Member Avatar for muraj
0
108
Member Avatar for alice06

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 …

Member Avatar for alice06
0
3K
Member Avatar for sariberri

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 …

Member Avatar for SasseMan
0
731
Member Avatar for jae5086

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: + - * …

Member Avatar for jae5086
0
182
Member Avatar for tldorr

I have built what I think is a nice contact form. I want to add a cookie to this form so that if a visitor has already completed this form, the browesr recognizes the user and sends them to a page that states they have already filled out this form. …

Member Avatar for tldorr
0
107
Member Avatar for eikal

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?

Member Avatar for eikal
0
538
Member Avatar for adarshcu

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...

Member Avatar for N1GHTS
0
173
Member Avatar for insanely_sane

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 …

Member Avatar for insanely_sane
0
186
Member Avatar for Bri426

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 …

Member Avatar for NathanOliver
0
193
Member Avatar for iraqi4life

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?

Member Avatar for Zhoot
0
82
Member Avatar for fsjal

Can someone tell me why these two yield totally different results ? [code=php] $key = 'abcdefgh'; echo encrypt('hello'); function encrypt($text) { $text = pkcs5_pad($text, mcrypt_get_block_size('rijndael-128', 'ecb')); return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_ECB))); } [/code] VS. [code=php] echo encrypt('hello'); function encrypt($text) { $text = pkcs5_pad($text, mcrypt_get_block_size('rijndael-128', 'ecb')); return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, 'abcdefgh', $text, MCRYPT_MODE_ECB))); …

Member Avatar for fsjal
0
656
Member Avatar for kafro

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 …

Member Avatar for kafro
0
128
Member Avatar for lauruskamj

[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=" …

Member Avatar for NathanOliver
0
101
Member Avatar for muppet

I have a table that a new line gets added to when the machine stops with reason for stopping, when the machine gets going again I want to add the time lost. So when the machine stops the table will look like this: [CODE]ID | reason | time_lost 1 | …

Member Avatar for Ezzaral
0
9K
Member Avatar for OPTIMUS999

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 …

Member Avatar for NathanOliver
0
2K
Member Avatar for rtdunlap

[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; …

Member Avatar for Tellalca
0
114
Member Avatar for dnmoore

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 …

Member Avatar for princeandzoe
0
448
Member Avatar for hatux

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 …

Member Avatar for hatux
0
177
Member Avatar for lasl0w

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 …

Member Avatar for lasl0w
0
9K
Member Avatar for techie1991

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, …

Member Avatar for techie1991
0
229
Member Avatar for lauruskamj

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, …

Member Avatar for lauruskamj
0
108
Member Avatar for terabyte

I'm trying to create a variable with multiple lines but for some reason the <<<_END operator isn't working this is how the code looks: [CODE] <?php $author = "Anon"; echo <<<_END First Lines Second Line. Third Line. - Written by $author. _END; ?> [/CODE] Why might it be? I'm using …

Member Avatar for terabyte
0
91
Member Avatar for Kerrai

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 …

Member Avatar for JamesCherrill
0
3K
Member Avatar for Triztian

Hello all hope this section isn't abandoned, anyway any help is really appreciated. Heres my problem: So I'm designing this database to hold orders, a customer places an order, which can have up to four accessories, at first I designed this table: [LIST] [*]idOrder[*]Acc1[*]acc2[*]acc3[*]acc4 [/LIST] but then I realized that …

Member Avatar for Triztian
0
136
Member Avatar for xcarbonx

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 …

Member Avatar for xcarbonx
0
116

The End.