132,726 Archived Topics
Remove Filter ![]() | |
How do I convert the integer -2 to its hex 0xfe??? I tried hex() but it gives me -0x2 Software Development python | |
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++ | |
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++ | |
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 | |
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 | |
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 … | |
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 | |
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 … | |
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 | |
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 | |
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 … | |
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++ | |
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 | |
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++ | |
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 | |
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++ | |
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 | |
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 | |
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 | |
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 … | |
![]() | 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++ ![]() |
![]() | |
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 | |
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 | |
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 | |
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 | |
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 | |
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 | |
[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 | |
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 | |
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 | |
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 … | |
String operator+(const String &s) Here String is a class. here why we are using ampersand operator? please explain me.(&s ?) Software Development c++ | |
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 | |
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 | |
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 | |
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 … | |
is there a way of using or declarin string objects without using #include <string> using std::string; ????????????? Software Development c++ | |
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 | |
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++ | |
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 | |
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 | |
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 … | |
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++ | |
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? | |
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 | |
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 | |
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 | |
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 |
The End.