43,549 Solved Topics
Remove Filter ![]() | |
I'm wondering if this is even possible in C++. Here's what I did in java a while back: [code=java] class Suit { public static Suit Hearts = new Suit("Hearts"); public static Suit Clubs = new Suit("Clubs"); public static Suit Diamonds = new Suit("Diamonds"); public static Suit Spades = new Suit("Spades"); … Software Development c++ | |
I have an array of integer of size 20 and there values range from 0-9 and i want atleast the value 0 placed in one location in the array once. how can i control rand() to be able to do that? cause there a possibility 1/10 will randomily generate 0 … Software Development c | |
I've read that the bits in a byte (in c++) are implementation or system dependent. What does that mean? Does it mean implementation of c++ or the processor architecture or some other thing? And I've read that you should use sizeof to determine the size of a byte? Could you … Software Development c++ | |
Hello., Have a question about array being set from function argument. I wrote this little program, and want to know why cant i set an array size from the function argument. Any help would be greatly appreciated. [CODE] int money(int deposit, ...){ int i, sum = 0, nextvar; // myArr[deposit]; … Software Development c | |
Hello, I am trying to write a macro to add a few headings. I have the following macro. Sub DOPaste() Dim i As Integer y =11 z = y Do While Sheets("Investments").Range("A" & y).Value <> "" i = 1 Sheets("Investments").Cells(z + 1, "D") = "Interim for year" Sheets("Investments").Cells(z + 3, … Software Development visual-basic | |
Hello. I'm making a program for my friend who is running an RPG Adventure at his school. I'll explain the basis behind the program and then what the problem is. Basically, before any battle, each player is required to roll a d12 and add their Battle Initiative Value (BIV) to … | |
so lets say i have a program and it keeps on outputting the letter 'A' constantly until the user presses enter or something. then it will exit the loop and continue with the rest of the program. how would i do this? Software Development pascal | |
Hello again people. I have a problem. Think of a textarea. The text area is filled with information depending on an entrance in a textbox. Like userID is entered and the information is filled in the textarea. I want the user to edit the textarea. But when he is editing, … Software Development java | |
Hi, I already create connection to sql database and successfull. I need to know how to run two command together?...This is my problem:- [CODE] sqlcmd = New Sqlcommand ( "Select * from Staff_Main where Staff_id like '"&textbox1.text&"'",cn) dr = sqlcmd.executereader while dr.read() label1.text = dr.item(1) 'item 1 is name sqlcmd … | |
void openfile(char *,FILE**) what does double stars indicates Software Development c file-system | |
IF i have this function... [CODE] node* get_lowest(node* root) { node* min = root->child[0]; for(int i = 0; i<root->child.size();i++) { if(min > root->child[i]) min = root->child[i]; } cout<<"Here it is:"<<min->data<<endl; return min; } [/CODE] how do I get it to return the smallest indexed pointer? for example if root->child[0] and … Software Development c++ | |
Hello I'm new here my name is Mervin, I'm creating a 3D online game in C# (everything is going well so far don't need to discuss it ;) ) And I am building a TCP server for it in C# (Visual C#.NET) The server needs to be able to handle … Software Development client-server windows-server | |
Hi, everyone this is my issue I have to read a binary record from the database and concatenate another string to it, the thing is that is just working one way, I ll put some code to explain better. [ICODE] buffer = rdGetBinary.GetInt32(3);//this is the length of the actual row … Software Development sql | |
Hello! I recently started learning Python, and I'm trying to install the package GASP ([url]http://pypi.python.org/pypi/gasp/0.4.5[/url]) in order to be able to code some graphics. However, the file is of type EGG. I found that I need to install EasyInstall in order to be able to install EGG files. (The download … Software Development python | |
![]() | Hi, I have this code: [code=python] def yn(input): if input.lower == 'y': return True else: return False def limestone(): I = raw_input("are there shelly fragments? (y/n)") if yn(I): print "Shelly limestone" else: print "chalk" def crystals(): I = raw_input("Are the crystals big?(y/n)") if yn(I): big_crystals() else: print "Basalt" def big_crystals(): … Software Development python ![]() |
I'm having a simple problem. I'm using this class to do some stuff with another module. Now, for some reason the self.database and other variables are not able to be accessed by the other methods. I thought _init_ was suppose to work as a constructor, thus the other methods should … Software Development python | |
I have followed the instructions on MSDN to "Display Related Data in a Windows Application" ( [url]http://msdn.microsoft.com/en-us/library/57tx3hhe(VS.80).aspx[/url] ). I have a data source that has a Customers table and a related Orders table. I can easily create a form which allows the user to select a Customer and display the … | |
I've always been curious: in VS, and most other IDEs, you are allowed to do something like this: [code=c++] //in file class.h class blah { //prototypes, members, blah, blah blah } //in file class.cpp #include "class.h" //method definitions... etc. //in file main.cpp #include "class.h" int main { //do stuff with … | |
can anyone send me the llink for garpage collector working principle..when we use fimalize and when we use dispose method in c# .net plz Software Development | |
How do I search a string for anything? What I mean is, I need to say: [code=python] if line == 'playername = (any name)': temp = line.strip().replace('playername=', '') return temp [/code] Any ideas? Software Development python | |
I have a form where there are 2 buttons, one which randomly adds buttons onto the form, and one that resets the form to default. When the form is opened there are two buttons, but after clicking the random button, there are many buttons. For the reset button, I currently … Software Development pascal | |
Ezzaral & James -- I remember (and found) a thread from a while back where you guys gave me an example of an Observer pattern. Basically a model had a List of interested Listeners. When the model changed, it went through a for loop, notifying each listener (the views) that … Software Development java | |
so my program has to read data from text file and pass it to the function. text file contains integer and string in every line. it looks like this: 23456 john 96512 martin 56985 wendy i've written it in C using this code: while (fscanf(filestream, "%d%s", &key, &value) == 2){ … Software Development c++ | |
Ok, so this is kind of a complicated question... but... Ok so I have a python script, you enter some numbers it gives you some numbers back that sort of thing. But of course right now it just looks like a black window with text. kind of like [URL="http://blog.benhall.me.uk/images/InstallingWindows2008EnterpriseCoreServe_F3A1/6Cmd.jpg"]this.[/URL] But … Software Development python | |
Hello, I am trying to create a program to stress test a website, I am using a counter on the page to see how many "clicks" have been made to this website. Currently i am using HttpWebRequest to make a connection to the site and then end it. However this … Software Development | |
what is mean by delaysigning in assembly..when we use it in c# .net Software Development assembly | |
In one View, I have text boxes and buttons. In the other View, I have a Pie Graph that I created using JFreeChart. When the button is clicked, I want the Pie Graph to be refreshed, displaying the new percentages (based on what the user entered in the text boxes). … Software Development java | |
Hi everyone! I'm writing trojan/virus for educational purposes only. That is my final practical work. The problem is that i need to fire up a .vbs file from disk.To do that i need path. How to find path and save it to string variable. Even bigger problem is how to … Software Development vb.net | |
Hi I am making a rock, paper scissors game for fun & for practice. My problem is; I am trying to create a string by adding 2 character variables together. How do I do this? Do I use the insert function? Or something I think is called crstrt or something … Software Development c++ | |
i couldnt manage to change system.windows.forms.listbox item color, do you know how to do that? thanks. Software Development | |
Hey everyone, I'm relatively new to C++, cant seem to find a solution to my problem. I'm trying to randomly generate an array of class objects. I'm using rand() to generate a number 1-3, for the number of objects to generate. For some reason when I use: [code] int c_gen … Software Development c++ | |
Using vbscript I want to create a runtime html login page on the fly. The html page should have username/pasword form and I will use this username/password to connect to a sql database. Is there a way to create this runtimehtml page using vbscript and them collect the username/password from … Software Development html-css vbscript visual-basic | |
Hi I'm designing a code where one can guess the Magic Number. In my code I have this part here where I declared the randomNumber after the class Form1. (the green mark below). Can somebody tell me what's the name of this part here? Is it static variable? And what … | |
Hello Everybody, I am working on a project and i want to compose one main string out of several substrings in C. for example: I have 3 variables: Float Vx=1,66 Float Vy=1.55 Float Vz=2.3 My first step is to convert them to character arrays usin snprintf. Then i want to … Software Development c | |
Hi over there, is it possible to execute several SQL Statements with one(!) command? For example something like that: [code] Statement s = con.createStatement(); sql= "CREATE DATABASE MeineDb+ SHOW databases+ USE MeineDb+ CREATE TABLE MeineTestTabelle ( i INT, c CHAR(3), s VARCHAR(8), dt DATE )+ CREATE TABLE MeineAdressen ( Name … | |
[code=java]import java.io.*; public class bonus{ public static InputStreamReader reader=new InputStreamReader(System.in); public static BufferedReader input=new BufferedReader(reader); public static void main(String[] args) throws Exception{ double salary,bonus; System.out.println("Enter Employee's Monthly Salary: "); salary=Double.parseDouble(input.readLine()); if(salary>=6000){ System.out.println("The bonus is 6000"); } else { bonus=salary*.5; System.out.println("The bonus is "+bonus); } } } } // It only … Software Development java | |
![]() | I am using vb 6.0 I am fairly new to VB, my question is: On my main form I have a command button that has 40 procedures and it loops through them about 1,000 times and then exits. Nothing is passed and all of the variables are private. I have … Software Development visual-basic |
this is another pretty simple question, but i've been trying to do it, and cant get it basically what i need is pretty simple, its like say you have a list of 5 numbers. now you need to print out all the lists of possible 3 numbers from those 5 … Software Development python | |
Hi Ezzaral... As per my last problem which is solved. So as I told you that I want to add GradiantPaint. This is the code that I came up with. This code is compling but giving me some runtime errors:. Please find the error report below- [CODE] import java.awt.BorderLayout; import … Software Development java java-swing | |
[code] try { //1.Load the database Driver class Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //2.Make a connection to the database Connection conn = DriverManager.getConnection( "jdbc:odbc:MyDataSource"); Statement stmt = conn.createStatement(); String x = jTextField1.getText().toString(); [COLOR="Red"] String sqll ="UPDATE Patient_Comp SET taken='Taken'WHERE ID="+x ; ResultSet rs = stmt.[COLOR="Green"]executeQuery[/COLOR](sqll);[/COLOR] [/code] This is what i wrote to update a … | |
im sorry this is kind of a silly question i know, but does anyone know any succesful ways to change a .py into a .exe? like so that someone without python installed on their computer can run it? i've seen this topic in a couple places but everything i've tried … Software Development python | |
hi, i am not really that good at c++. i have created an application which dynamically loads dll's as types of 'plugin' the problem i am trying to overcome is linking back to code in the application from the dll. i am currently within the scope of a function of … Software Development c++ visual-basic visual-studio | |
Here is my code: [CODE] #include "Poly.h" int main(){ Poly p; int degree = p.degree(); cout << degree << endl; int coefficient = p.coefficient(5); return 0; } [/CODE] [CODE] #include<iostream> using namespace std; class Poly{ public: Poly(); //constructor int degree(); //Returns the degree of the polynomial int coefficient(int); //Returns the … Software Development c++ | |
hi, im working on java on some client server project... in the project the client and the server can send files, but im failng to do so, the resiver get only part of the file... here is my code sender: [code] public void uploadByteFile(String fileNameToGet, File fileDst) { try { … Software Development client-server java | |
Hi, I'm having trouble with the following simple test program to extract 10 random numbers from 0 to 5. [CODE=java] import java.util.*; public class TestRandom { public static void main(String[] args) { Random rand = new Random(); for (int i = 0; i < 10; i++) { int j = … Software Development java | |
Hello all. I am new to this discussion forum and would greatly appreciate anyone's help on this one. This is a great site!! Thank you all for being here. Here's my problem: I'm working on an application that has a JPanel that is a grid layout with three columns of … Software Development java | |
Hey frnds, I m comparing two images in VB.Net..I get the code in C# & dat code is working 100 % Correctly..Now want to convert dat code to vb.net..& i need help in just converting two lines- C# EXAMPLE [code] private void Form1_Load(object sender, EventArgs e) { Bitmap img1= new … | |
I'm trying to open a command prompt through the program and then run bcp. Here is the code. System.Diagnostics .Process proc = new System.Diagnostics.Process (); proc.StartInfo.FileName = "bcp"; proc.StartInfo.Arguments = @"select * from dbname" queryout C:\filename.csv -S servername\instance -U sa -P password –N; proc.Start (); On the queryout I get … Software Development c# | |
I have created a mobile game in netbeans and need to connect to web sevice through Java ME web service client, I get the proxy setting error which does not allow me to connect. Has anyone come-up with this problem? Software Development java java-netbeans | |
So, I always thought that it was possible to return dictionaries in Python. I was wanting to do this because I would prefer not to use globals. However, I am having trouble with returning my dictionary. Code: [code=python] #!/usr/bin/python # 6/9/09 def loadWords(): pathstart = "/home/foo/Documents/PyScripts/Vocab/Lists/" print "What is the … Software Development python |
The End.