43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for triumphost

I just learned C++ style casting and the 4 types of casts. I'm not sure if I'm abusing it though. Examples: typedef long (*stringFromString)(int, char*) __cdecl; //TO: typedef long static_cast<*stringFromString>((int, char*)) __cdecl; SmartSetup((char*)World.c_str(), (char*)",f5", 765, 503,(char*)""); //TO: SmartSetup(static_cast<char*>(World.c_str()), static_cast<char*>(",f5"), 765, 503, static_cast<char*>("")); memcpy(&INH, (void*)((DWORD)Buffer + IDH.e_lfanew), sizeof(INH)); TO: memcpy(&INH, static_cast<void*>(static_cast<DWORD>(Buffer) …

Software Development c c# c++
Member Avatar for mike_2000_17
0
669
Member Avatar for lj81

Hi I am currently writing a pool game in java and am very close to finishing it. I am having a problem with the rule of the black ball being potted out of sequence. I need all balls to be potted first before the black ball is potted if all …

Software Development java
Member Avatar for lj81
0
153
Member Avatar for triumphost

I have just came across a class for the first time ever that does not have variables in any of it's declarations but has them in the implementation. Why is this class behaviour allowed? What are the benefits of not putting variable names? class Testing { public: Testing(int, int, int); …

Software Development c++
Member Avatar for deceptikon
0
130
Member Avatar for hisan

below is mycode though i have set keepalive, socket connection gets closed after sometime. sb_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM,socket.SOL_TCP) sb_sock.setsockopt( socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sb_sock.connect((msg_host, host_port)) reg_msg="REG 0000 "+finder_id+"\r" sb_sock.send(reg_msg)

Software Development python
Member Avatar for hisan
0
525
Member Avatar for poojavb

Hello Friends, I need help to disable the parent window form as soon as the user will open the child form.... for eg...consider daniweb...when we click on member login the background form gets grayed out.... Disabling the form is not the option cause it will just disable all the controls …

Software Development vb.net
Member Avatar for poojavb
0
7K
Member Avatar for phorce

Hello, I'm currently working on a project that basically reads some text and then performs basic Lexical Analysis on the text. I'm having a slight problem with overloading methods. So for example, I have a method that can read in the words from a txt file and another method which …

Software Development c++
Member Avatar for phorce
0
187
Member Avatar for godzab

I have two differnt classes' that extend from the JFrame class. I have a button on one frame that should go to the next Frame, but how would I do that?

Software Development java
Member Avatar for NormR1
0
690
Member Avatar for codeblock

Hi all, I'd like to know if it is possible to create a perl script that would take the names of image files with its extension of say 10,000 images from out of a folder and place them into a database table in separate rows to use as sample data? …

Software Development mysql perl
Member Avatar for codeblock
0
188
Member Avatar for poloblue

Good Afternoon, I'm having problems with my school assignment that is about a loan program. Here are the details what the program needs to do. You are required to write a loan program for the Rio Grande Bank. This program will print an amortization table for a loan, given the …

Software Development c++
Member Avatar for poloblue
0
7K
Member Avatar for Monster99d

I have an error called Unexpected Token 'class', did you forget a ;? I have no clue what is going on. Maybe you guys can help me out. The codes name is Player.h. The error is on line 9. #ifndef PLAYER_H #define PLAYER_H #include "Weapon.h" #include "Armor.h" #include "Monster.h" #include …

Software Development c++
Member Avatar for Monster99d
0
4K
Member Avatar for leyla

Hi, I have been given the task of basically reading and writing to and from files. Below is the code from one sub: If btnSaveRecipe.Enabled = True Then FileName = "C:\Users\Leyla\Documents\Recipe Task\Recipe.txt" FileWriter = New IO.StreamWriter(FileName) For index = 0 To lstRecipe.Items.Count - 1 'For the number of ingredients in …

Software Development vb.net
Member Avatar for Branickiod
0
221
Member Avatar for TrustyTony

I am trying to write safyfied evaluator class, and get unexpected `__builtins__` added to dictionary after evaluation. Can somebody explain why/how it happens? import math def echo(n): print n return n def nothing(n): return n debug = nothing class MathParser(object): ''' Mathematical Expression Evaluator class. call evaluate() function that will …

Software Development os-x python
Member Avatar for HiHe
0
308
Member Avatar for deepthought

Hi ALL, I am completely new to python and when i was playing with a while loop in the Python SHELL the code works but when I then put it into a file and saved and then tried to run it I got the error "NameError: name 'b' is not …

Software Development python
Member Avatar for deepthought
0
8K
Member Avatar for speakon

Hello! I am very new to Java and programming theory and desperately trying to improve my knowledge. This is the first program I've made without help and really would appreciate some feedback. I know there must be 1,000,000 better ways to do what I did. Notes: - I want to …

Software Development java oop
Member Avatar for JamesCherrill
0
3K
Member Avatar for 47pirates

I am trying to update database by editing cell values in jtable. my table looks like ![a](/attachments/large/2/a.JPG "a") When i edit the value in particular cell and without clicking anywhere if i click on Update button the database is not updated as like this ! ![b1](/attachments/large/2/b1.JPG "b1") but if i …

Software Development java java-swing
Member Avatar for dougWill
0
3K
Member Avatar for Cameronsmith63

Ok so here's the thing, I used to read in data from an excel file and bulk copy this data into a SQL table and everything worked fine. But now, my source file changed, so now i get data from a other excel file. Both file look exactly the same, …

Software Development gui
Member Avatar for Cameronsmith63
0
117
Member Avatar for silvercats

(1)Are DOS and Windows assembly different? (2)How many registers do both 32bit and a 64 bit processors have speparetl? what is the size of them? (3)To emulate a 16bit or 32bit program under a 64bit processor, does that processor have to physically support those old 16 and 32 bit versions? …

Software Development assembly
Member Avatar for brunoccs
0
195
Member Avatar for thanh_cong

//Application Forms import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.GridLayout; import java.awt.HeadlessException; import java.awt.Panel; import java.awt.Rectangle; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Vector; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.table.TableCellRenderer; …

Software Development java java-swing oracle
Member Avatar for Dani
-1
218
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* Hey you guys! ive got a problem with a 'test' program i have made for saveing strings. heres the code: #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> #include <fstream> using namespace std; int main() { ofstream myfile ("savefile.txt", …

Software Development c++ file-system ios
Member Avatar for Dudearoo
0
141
Member Avatar for lewashby

I'M working my way through a C++ book and now I'M doing a card deck program. Here's the line I'M having trouble with. r = card % 13; // r = random 0 to 12 card in this case is just a random int number from 0 to 51. 52 …

Software Development c++
Member Avatar for TrustyTony
0
175
Member Avatar for Commando123

Hey Guys i am doing a small project and i am using vb.net with MS access database. i am facing a Concurrency issue sometimes when i try to save data in the datagried view. i have added the datagried view by draging and drop the table from the data source. …

Software Development multithreading vb.net
Member Avatar for Commando123
0
129
Member Avatar for nikolaos

I want to write a version of the SAND GAME. I want to examine the color of every pixel in a Jframe window. I use something like this. Toolkit toolkit = Toolkit.getDefaultToolkit (); Dimension dim = toolkit.getScreenSize(); int height = dim.height; int width = dim.width; GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice …

Software Development display image java
Member Avatar for nikolaos
0
247
Member Avatar for evandana

I need help getting the Apache POI set up correctly. I downloaded this file: [url]http://mirrors.devlib.org/apache/poi/release/bin/poi-bin-3.2-FINAL-20081019.tar.gz[/url] from poi.apache.org, and don't know what to do next? Where do I put this file? Are there other files I need to download? I hear talk of setting a "Classpath". What is this, and how …

Software Development apache java
Member Avatar for peter_budo
0
679
Member Avatar for RonKevin

Okay, its been a while since my last visit here..and yes I need your help with C++ Programming... My grades were fine so that's all thanks to you guys....so here's my next question.... What is wrong with my code? My exponent displays a wrong number... I used a for loop …

Software Development c++
Member Avatar for RonKevin
0
319
Member Avatar for lewashby

#include <Stdafx.h> #include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand( static_cast<unsigned int>(time(NULL))); // set seed for random numbers cout<< "Enter number of trials to run "; cout<< "and press ENTER: "; cin>> …

Software Development c++
Member Avatar for VernonDozier
0
169
Member Avatar for Krokcy

EDIT: Im an idiot. The hand-shake like mechanic i put in where the server waits for the client to respond was the reason it was so slow, removed it and it worked. I misunderstood/forgot how streams work.. Ok. So i just started learning how to use the network utility there …

Software Development client-server file-stream java
0
428
Member Avatar for reddsoxy

I am self teaching myself python and I have hit a question that I can't seem to figure out dealing with raw_input. This is the code that is confusing me: print "How tall are you?", height = raw_input() print "So, you're %r tall ." % (height) I input my height …

Software Development python
Member Avatar for reddsoxy
1
186
Member Avatar for VasquezPL

I have a small problem, maybe you guys know how to avoid it. system.IO.StreamReader text = new System.IO.StreamReader(to the html path); while ((line = text.ReadLine()) != null) { newMail.HTMLBody += line } When I open html file directly from its folder where html file is,byclicking 2 times on it, All …

Software Development html-css
Member Avatar for VasquezPL
0
237
Member Avatar for new_developer

hi everyone, I am trying to initialize array in main method, and insert value in array in another method named "popArr()", in last print array in "printArr()" method. But its not working and i am getting errors. The environment i am using borland c++. The code is as follows. #include …

Software Development c++
Member Avatar for Lucaci Andrew
0
167
Member Avatar for riztra

I created a simple program for animation direction in visual basic. but as I can is clockwise. then how do I make it in the counter clockwise ? this my listing program : Private Sub Command3_Click() 'animasi searah jarum jam Cls Form1.DrawWidth = 30 For i = 1 To 5 …

Software Development visual-basic
Member Avatar for Nitesh Katia
1
211
Member Avatar for delta_frost

I have designed a sender-reciever type program where the sender sends a file and the reciever recieves it automatically. The problem is that though I am using byte-based streams,the output in ceratin cases as follows are getting distorted: [A]: Bitmap images are getting color-inverted. [B]: Files other than text files …

Software Development java
Member Avatar for delta_frost
0
372
Member Avatar for loserspearl

I am working on a math problem generator and for the current context I'm trying to check if both of the boxes are unchecked, a user can choose 1 or both of the check boxes but I want to display an error stating that at least 1 must be chosen …

Software Development
Member Avatar for loserspearl
0
90
Member Avatar for bhagawatshinde

Hi guys, how to get textbox leave event in wpf. I want select next textbox when one textbox leave focus. How to use lostfocus event?

Software Development
Member Avatar for bhagawatshinde
0
299
Member Avatar for Mike Bishop

i am having real issues trying to build a sql string Dim SelectQry = "SELECT * FROM TblSupplierQuotes where TenderNo='" & Me.txtTenderRef.Text & "' AND KMBPartNo=" & " " & Me.lbKMBPartNo.Text & " " in SQL the TenderNo is varchar(50) = L003141T75-2012JANTEN KMBPartNO is text = 442 019 115 1 …

Software Development sql vb.net
Member Avatar for poojavb
0
97
Member Avatar for godzab

Here is the code first: People.cpp #include "People.h" #include "Birthday.h" #include<string> #include<iostream> using namespace std; People::People(string x, Birthday bo) : name(x), birth(bo) { } void People::People() { cout << name << "was born on" << birth.printDate(); } People.h #ifndef PEOPLE_H #define PEOPLE_H #include<string> #include "Birthday.h" class People { public: People(string …

Software Development c++
Member Avatar for triumphost
0
132
Member Avatar for mr3army

Hey guys I manged to get some code what works fine but it uses console application I have tried to convert it by hand and change things around to get it to work but with no avail! Im certain it should be simple but I may be wrong :( Code …

Software Development vb.net
Member Avatar for mr3army
-1
982
Member Avatar for G_S

Hello, I need your help with something (again): I need to control two text widgets with one scrollbar and, thanks to this website, I found some code to do it using listboxes (here: [url]http://www.daniweb.com/forums/post940371.html#post940371[/url]). I modified it, and it now works with text widgets and pyton 2.x. The problem is: …

Software Development python tkinter
Member Avatar for TrustyTony
0
3K
Member Avatar for rkelly70

I’m trying to produce this equation in VB.NET h = (sh * s + (dia / 2 (tan(ang))) + ((dia / 2 (tan(ang1))) / 3)) This is where I’d prefer to retrieve the data from. Sh = sheet height = 1 (can be variable)(data retrieved from textbox) S = sheets …

Software Development mathematics vb.net
Member Avatar for rkelly70
0
177
Member Avatar for rhowell

Hi, # Problem and Background # I'm trying to compile a program that uses some legacy c code generated using the f2c translator (*version of May 1991 13:06:06*). *decide.c* is the source that contains the translated fortran to c code and *f2c.c* is the header file. Durring compilation I get …

Software Development c seo
Member Avatar for rubberman
0
434
Member Avatar for summer_21

I want to make a simulation of logic circuits using basic logic gates in C.User will determine the types of inputs, and the gates.I want to design the circuit as a result.And simulation that produces output according to input values​​.But I can't do connections between gates.Can you give me advice …

Software Development c
Member Avatar for dheaven
0
784
Member Avatar for Rhysorourky

ok im from C++ but no starting java this is my attempt of the password protect program which you get three try at but for some reason it dosnt compile it just gets errors import java.util.Scanner; public class password { public static void main(String args[]){ Scanner input = new Scanner(System.in); …

Software Development java
Member Avatar for JamesCherrill
0
119
Member Avatar for VernonDozier

I'm getting an error that I don't understand. It's a Null Pointer Exception, but neither of my arguments in line 118 is null. According to the documentation, ImageIO.write will throw a IllegalArgumentException or an IOException, but it isn't throwing either. I'm not sure what could be null here. You can …

Software Development file-system image java java-swing
Member Avatar for JamesCherrill
0
2K
Member Avatar for ASFtlink

This program ask user which arithmetic operation they want to play with then generates a random equation and lets the user answer it. When the user stop playing the game the program calculates the number of correct and answers and wrong answers. I need some help because the program crashes …

Software Development c++
Member Avatar for Lucaci Andrew
0
311
Member Avatar for choudhuryshouvi

hi, guys here is my question:- I've created an application for opening text files. there i got two forms.one contains the textbox where the contents of the file will be displayed. there is a button.clicking this will move me to another form which is displaying modally.in the second form i …

Software Development vb.net
Member Avatar for Luc001
0
166
Member Avatar for xzero1

i am using html agility pack to retrieve the articles from website with "p" tag, but it return all the user comments along with it. how to overcome one this. i have only one string holding all the stuff at last.

Software Development html-css
0
180
Member Avatar for abrarsyed

#include<conio.h> #include<stdio.h> #include<ctype.h> #include<string.h> int precedence(char c) { switch(c) { case '*': case '/': return(2); case '+': case '-': return(0); } } char *to_postfix(char *infix) { char stack[30],postfix[30]; int i=0,j=0,top=-1; while(infix[i]!=NULL) { if(isalpha(infix[i])||isdigit(infix[i])) { postfix[j++]=infix[i++]; } else if(infix[i]=='(') { stack[++top]=infix[i++]; } else if(infix[i]==')') { while(stack[top]!='(') { postfix[j++]=stack[top--]; } top--; i++; …

Software Development c
Member Avatar for abrarsyed
0
550
Member Avatar for pooh1234qwerty

why can't we take an array :- a[10000000]?? what is the alternative?

Software Development c
Member Avatar for pooh1234qwerty
0
188
Member Avatar for G_S

Hello everybody. I want to make sure about something: If I install ActivePython 3.2 as root on Linux, will it delete the distro's default Python (2.6)? I also installed Python 3.1 a long time ago, so I have Distro's Python 2.6, the official Python 3.1 and want to add this …

Software Development python
Member Avatar for G_S
0
180
Member Avatar for rkelly70

I'm new to complex maths and equations in vb, even the basic maths below does not work correctly. So can any one advise on the best data for for me to use e.g. below decimal for math calcs Help me put the below correct. Private Sub z() Dim ringheight As …

Software Development vb.net
Member Avatar for Reverend Jim
0
131
Member Avatar for G_S

Hello again. Here are the details: * My litle scripts work perfectly in my virtual Windows XP (I'm using virtualbox if that matters) as long as they are non-compiled .py or .pyw files * After compiling them, I double click on them and a DOS window comes out, then dissapears …

Software Development python
Member Avatar for G_S
0
772

The End.