132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for j3nny

How do I convert the integer -2 to its hex 0xfe??? I tried hex() but it gives me -0x2

Software Development python
Member Avatar for jcao219
0
97
Member Avatar for dadam88

I have tired several things....And i still can't pinpoint on what I can do differently. I want the dowhile loop to run untill r, b or g is entered. I have tried commas like in the below code and other things exp... while (pick != r || pick != 'g' …

Software Development c++
Member Avatar for arkoenig
0
94
Member Avatar for cocoll

hello! recently i have known that there is graphics in c++,so i searched in the internet for a step by step tutorial that i can draw frames buttons textboxes comboboxes labels and others but i can't find anything and this weird because you can find tutorials for all languages except …

Software Development c++
Member Avatar for sundip
0
146
Member Avatar for smoothe19

A binary search tree can be used to sort a list. WE simply insert the list elements into a BST, initially empty, and then use an inorder traversal to copy them back into the list. Write an algorithm for this treesort method of sorting, assuming that the list is stored …

Software Development algorithm c++ linked-list
Member Avatar for smoothe19
0
149
Member Avatar for Drakarus

Problem 1: I was wondering if it's possible to add for example the struct below into a binary tree: [CODE=c] struct Appoint { string place; string title; int hour, minute; int durationHr, durationMin; }; [/CODE] I want the above struct to be sorted in the binary tree by hour and …

Software Development c++ data-structure
Member Avatar for Drakarus
0
283
Member Avatar for ota1it1iuss

Sorry, I originnaly posted this in the Geek Lounge: Okay, the first project was to build a calculator that functioned as follows: ----------Using the example functions about, write a calculator program. Allow for the user to enter a simple math functions to evaluate: (Note: the '>' designates user input for …

Software Development c c# c++
Member Avatar for sfuo
0
2K
Member Avatar for jonniebl

I am writing a program that sends an email with attachments. I need to send it as HTML but I can not find any reference as to how to do this. My code follows: [ Private Sub sendMail(ByRef Message) Dim Attach As Attachment Attach = New Attachment("c:\Project\Articles1\Article.txt") 'create the mail …

Software Development html-css vb.net visual-basic visual-studio
Member Avatar for jonniebl
0
187
Member Avatar for okwy

Can some one please help me on this issue as I have spent time going around it without making any headway. I have data in an array of size say 3O. 1. I want to take the first five elements of the array, find their mean value. Store the value …

Software Development c c++
Member Avatar for abhimanipal
0
9K
Member Avatar for SeanC

Hi, I'm having a problem with this part of my code: [CODE]} while ((menu2.equals("4") == false) || ((menu2.equals("3")) == false));[/CODE] The compiler seems to be ignoring it for me... is there something wrong? I basically want the loop to end if the String menu2 is either "4" or "3". What …

Software Development java
Member Avatar for SeanC
0
92
Member Avatar for rahul8590

I have various list being generated by a mapper function in this format >>> mapper("b.txt" , i["b.txt"]) [('thats', 1), ('one', 1), ('small', 1), ('step', 1), ('for', 1), ('a', 1), ('man', 1), ('one', 1), ('giant', 1), ('leap', 1), ('for', 1), ('mankind', 1)] >>> mapper("c.txt" , i["b.txt"]) [('thats', 1), ('one', 1), ('small', …

Software Development python
Member Avatar for ultimatebuster
0
262
Member Avatar for lewashby

I'M learning python and I can write very small simple programs with Tkinter or play sound through pygame. I've just started the book "Beginning Game Development with Python and Pygame". I'M in the earlier part of the book and I've just been given the program below. The thing is, even …

Software Development python tkinter
Member Avatar for TrustyTony
0
223
Member Avatar for programing

Hi .. for(int i=1;i<=n;i++) { first=i%10; last=i/10; ....... i want to see how many number that first number equal last number; like 3003..and 1,2,3... is counted because its a single numbers but my statmant it is just count the num unti 100 and its not count the single numbers .. …

Software Development c++
Member Avatar for programing
0
100
Member Avatar for prodigenius

numpy.vectorize takes a function f:a->b and turns it into g:a[]->b[]. This works fine when a and b are scalars, but I can't think of a reason why it wouldn't work with b as an ndarray or list. For example: [CODE=python] import numpy as np def f(x): return np.array([1,1,1,1,1], dtype=np.float32) * …

Software Development python
Member Avatar for TrustyTony
0
398
Member Avatar for VBNick

If I am using overlapped sockets with i/o completion ports, is it ok to use WSASend on a socket to send data [B]after [/B]posting the initial WSARecv on that same socket, but [B]before [/B]having received any data? Will the socket still receive data and trigger the completion port if I …

Software Development c++
Member Avatar for VBNick
0
95
Member Avatar for Tank1970

Hi all I was working on a program and really need some help with my coding. Here is code I'm working on thanks for your advice in advance. 'this program will Display Year of age and days on earth assumming the current date is 12/31/2006, the user types 1980 into …

Software Development visual-basic
Member Avatar for Tank1970
0
105
Member Avatar for David_Omid

Hey, sorry if this question is really really simple and silly to ask here but I can't find a suitable answer anywhere else and nobody out there so far is willing to help me out so any help would be greatly appreciated. Simple thing I want to do: I have …

Software Development c++
Member Avatar for VernonDozier
0
111
Member Avatar for Xufyan

See this Program, [CODE]class Test { enum Days {Monday,Tuesday,Wednesday,Thursday,Friday} enum Periods {Period1,Period2,Period3,Period4,Period5} public static void main (String [] args) { String DnP [][] = new String [6][5]; for (Days dys : Days.values()) { DnP [0][dys.ordinal()] = dys.name(); System.out.print (DnP[0][dys.ordinal()] + "\t "); } System.out.println ("\n\n"); for (int i=0; i<=4; i++) …

Software Development java
Member Avatar for Xufyan
0
142
Member Avatar for Ricky65

Hi I've attempted to create a little app which encrypts and decrypts a file using the XOR cipher. However, it only encrypts/decrypts the first few lines and I'm not sure where I'm going wrong. Advice appreciated. Ricky My code: [CODE]//XOR Encryption #include <stdio.h> #include <string.h> //XOR Encryption key char XORkey …

Software Development c encryption
Member Avatar for Ricky65
0
354
Member Avatar for jackmaverick1

I have been frustrated by the lack of a time unit in all the C/C++ std librarys (hope I've got the right wording!). What is a function that I could use. I don't care if I write it or if it is in a library. Thanx in advance!

Software Development c c# c++
Member Avatar for caut_baia
0
234
Member Avatar for personx1212

hello, i created an executable from a python project, with py2exe & cx_Freeze for testing, and both versions work fine on my Windows OS, but none work on other PCs (Win32), when i start the executable it says : 'The application has failed to start because the application configuration is …

Software Development python
Member Avatar for snippsat
0
156
Member Avatar for daviddoria

With std::queue I've been using this: [code] std::queue<int>::iterator pos = std::find( q.begin(), q.end(), 5); [/code] But when I try that with std::stack : [code] std::stack<int>::iterator pos = std::find( s.begin(), s.end(), 5); [/code] I get [code] error: ‘iterator’ is not a member of ‘std::stack<int, std::deque<int, std::allocator<int> > >’ [/code] Anyone know …

Software Development c++ queue
Member Avatar for AuburnMathTutor
0
5K
Member Avatar for yoni0505

I want to add some while() loop to a windows form app, the problem is that when I try its freezing the window because of the loop. There is any way or method to add a loop that won't freeze the window?

Software Development c++
Member Avatar for yoni0505
0
146
Member Avatar for aakaashjois

hello guys, Can any of you help me create a game in java?? There has to be two paddles, one at the top and the other at the bottom. The paddles have to stop the ball from getting out of the screen. The ball cannot leave the screen from the …

Software Development gaming java
Member Avatar for gauravk_bhanot
0
172
Member Avatar for JamesPH

Guys any idea for this equivalent c loops in java::: for (sum=0,i=0,j=0;i<10;i++,j+=2) sum+=i+j Thank you: jamesPH

Software Development java
Member Avatar for JamesPH
0
83
Member Avatar for creeps

Hello, I've been going through K.N. King's [url=http://knking.com/books/c2/index.html]C Programming: A Modern Approach[/url] and, after completing the first 10 chapters, I wanted to give my knowledge a try and write something I've always wanted to: a Hangman game. It turned out more of a "Mystery Word" game, as I haven't created …

Software Development c
Member Avatar for creeps
0
525
Member Avatar for mattyfog

Hi, I'm new here and I don't speak English very well, so sorry if I do some mistakes, if you want you'll correct me. ;) I have downloaded Watin which is a free open source that allow developers to work (send e receive messages) with Internet Explorer or Firefox. I …

Software Development open-source visual-studio
Member Avatar for Harchwani
0
133
Member Avatar for ben1

public class While { public static void main(String args[]){ } public void printLoop(){ int counter = 1; while(counter <=25){ System.out.println(counter); counter++; } } } Hi, the above code compiles but nothing runs when I click on the run button. I am new to Java, you guys might find this problem …

Software Development java
Member Avatar for ben1
0
130
Member Avatar for BhuvanRam

hai friends ? I am almost completing my C#.net.. but a small doubt is whether "string " data type is a reference type or value type? because in some books i find it as reference type and in some books i find it as value type which can store upto …

Software Development operating-system web-server
Member Avatar for gusano79
0
316
Member Avatar for Talguy

I am getting runtime error 424 when I try to access my global dictionary's count. It works fine when in the sub routine that initializes the dictionary and right after the sub routine was called inside the form_open event. Why would I be getting this error when I click a …

Software Development pay-per-click visual-basic
Member Avatar for AndreRet
0
205
Member Avatar for gauravk_bhanot

[CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; class plc extends JPanel{ plc() { this.addKeyListener(new MyKeyBoardListner()); System.out.println("key listner added"); } public void paintComponent(Graphics g) { super.paintComponent(g); g.drawRect(0,0,10,60); g.fillRect(0,0,10,60); } private class MyKeyBoardListner extends KeyAdapter { public void keyPressed(KeyEvent ke) { System.out.println(ke.getKeyCode()); } } } public class plank { public static void main(String[] …

Software Development java java-swing
Member Avatar for adams161
0
82
Member Avatar for gonzigg

Hello, im starting a new project, about the game who wants to be a millionaire, so In the beggining I have a Start Button, but I want to know how to set the parameters of the mouse click to be only within the range of the START button. heres what …

Software Development python
Member Avatar for Gribouillis
0
235
Member Avatar for g2gayan

Hey :cool: Im GaYan and im creating a c# web browser , the below is the source code ;) its pretty simple :D its actually a desktop browser ;P [CODE]namespace G2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); textBox1.Text = "http://www.yahoo.com/"; } private void button1_Click(object …

Software Development web-browser
Member Avatar for g2gayan
0
195
Member Avatar for kdgeiger

Ok, I did search on this site and found nothing that really helps with my issue. I am doing assignment - JPartyPlanner - I have the applet complete, it compiles and shows in IE great, BUT when I add the image code it still compiles but I get nothing showing …

Software Development display image java
Member Avatar for kdgeiger
0
196
Member Avatar for sabareesh

String operator+(const String &s) Here String is a class. here why we are using ampersand operator? please explain me.(&s ?)

Software Development c++
Member Avatar for sabareesh
0
181
Member Avatar for ftl25

I have an array of strings as follows: [CODE] char *sCmdInt[8];[/CODE] I am filling this array by tokenizing a line of text from a file. I then want to check if element 0 of the array is equal to a value. Eg: [CODE] if (sCmdInt[0] == "ReadMemory32") { // do …

Software Development c
Member Avatar for ftl25
0
149
Member Avatar for BonaDrag

I want to compare a DateTime date & time in a GridView to a smallDateTime date & time in a database table. I'm not sure what goes wrong, but I get the error message "incorrect syntax near 'whatever time'" every time. An example: A DateTime datumStartTid could be '2010-07-25 19:00' …

Software Development
Member Avatar for BonaDrag
0
2K
Member Avatar for kdgeiger

I have completed my applet code and it compiles fine - when I try to open it in explorer I get my welcome message but the applet does not fully open - all I get is the little box with the red X in top left corner. Help! Here is …

Software Development display java web-browser
Member Avatar for kdgeiger
0
168
Member Avatar for jenzilla

Hello, I'm sure there is a simple solution to this but I cannot seem to find the information I need in my textbook or online. I'm creating a GUI with an entry box for the user to input their name. I then use getText() to retrieve the name they entered …

Software Development gui python
Member Avatar for rahul8590
0
100
Member Avatar for racoon8995

is there a way of using or declarin string objects without using #include <string> using std::string; ?????????????

Software Development c++
Member Avatar for vijayan121
0
173
Member Avatar for Frederick2

My title says it all! I'm completely mystified by this - have been working at it all day with no resolution. The fundamental assumption under which I am laboring is that when a Dll is loaded into a host's process, the Dll will receive a DLL_PROCESS_ATTACH message. I have been …

Software Development c++ visual-studio
Member Avatar for Frederick2
0
1K
Member Avatar for dansnyderECE

I need to convert an ASCII string like... "hello2" into it's decimal and or hexadecimal representation (a numeric form, the specific kind is irrelevant). So, "hello" would be : 68 65 6c 6c 6f 32 in HEX. How do I do this in C++ without just using a giant if …

Software Development c++
Member Avatar for vijayan121
0
220
Member Avatar for personx1212

Hello there, i have this problem when i try to combine a variable file name that is in languages other than English with a path, like this : path = 'C:\\Files\' path+=UnicodeName+'.txt' it gives the following error : UnicodeDecodeError: 'ascii' codec can't decode byte 0xda in position 7: ordinal not …

Software Development python
Member Avatar for personx1212
0
119
Member Avatar for har58

Hi, I need to select 5 distinct random numbers out of 20 in my java program. I am able to select 5 random numbers, But I want these 5 numbers to be distinct,,,i.e. unique for e.g. I dont want them to be like these 5,6,9,6,1 because 6 is repeated I …

Software Development java
Member Avatar for tong1
0
175
Member Avatar for cocoll

hello! i create a programme that's used my hotmail account so i send e-mail to another account so it's worked but on another computers it's doesn't work and i don't know why in my laptop the programme work and in another laptops or desktops the programme don't do anything. so …

Software Development laptop vb.net
Member Avatar for cocoll
0
93
Member Avatar for ftl25

Hi. I am a C/C++ newbie. I am looking for advice on best practice. I am building an application which will take an input command (string), compare it with a list of stored commands, and go off to the relevant function. What i'd like to know is; what is the …

Software Development c++
Member Avatar for mike_2000_17
0
181
Member Avatar for java_programmer

I am writing a web service using apache axis which will accept a XML Message , process it and return another XML Message. But I am not getting any hints how to describe the input and output in WSDD file. Could anyone please suggest?

Software Development apache java xml
Member Avatar for sam2011
0
153
Member Avatar for manavsm

Please help me to develop this simple windows login form problem is i am unable to validate my user name and password... [CODE] namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { login(txt_username.Text, txt_password.Text); } public Boolean …

Software Development open-source
Member Avatar for raj_developer
0
357
Member Avatar for Malinka

Hello everybody! I have to go through each subfolder and extract matching strings from each of the files (File_1, File_2, File_3, File_4, etc.). Unfortunately, I don't know how to do that under Linux. I have the following structure: MainFolder: ---Subfolder A ------File_1 ------File_2 ------File_3 ---Subfolder B ------File_4 ------File_5 ------File_6 ---Etc. …

Software Development python
Member Avatar for Gribouillis
0
9K
Member Avatar for newworldcoder

I am very new to development and have been sinking my teeth into C#. I have an application that was written in C++ which is out of my depth, and I was wondering if someone could explain how I would recreate this in c#. The application sends message to linux …

Software Development c# c++ socket-programming
Member Avatar for sundip
0
364
Member Avatar for Naveed_786

Dear All, I have a problem i have made setup of my project when i install it and run the program it asks for the complete path of database like this "C:\Paymentsystem\PaymentSystem\bin\Debug" is there any way i want to change the path i mean i want to place database in …

Software Development vb.net
Member Avatar for Naveed_786
0
92

The End.