132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Triarius

Hi! I am trying to make a simple "Guess my number" game. For some reason the compiler (Visual Studio 2010) gives me an error. Here is the full code : [CODE]#include<iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int tries = 0; int input; srand(static_cast<unsigned int>(time(0))); int …

Software Development c++ gaming visual-studio
Member Avatar for vidit_X
0
104
Member Avatar for deva.v

Hi, I am creating a text file using a save file dialog and copying the path to the text box which file is used to write from vb.net. when i try to write i get an error "The process cannot access the file '....fileName.txt' because it is being used by …

Software Development file-system vb.net
Member Avatar for sandeepparekh9
0
911
Member Avatar for jeffpro

2 Questions: 1. How is the windows cursor drawn? ddraw? I don't understand and I can't find any information on it. 2. When you control alt delete in windows 7 how is that screen drawn? Thanks

Software Development c++
Member Avatar for jeffpro
0
197
Member Avatar for ZER09

can anyone can help how to create a live search in vb.net 2008 using combo box. example when i try to search a name then a press a then there should be a drop-down with a list of suggestions of name. here is my code [CODE] Private Sub ComboBox4_SelectedIndexChanged(ByVal sender …

Software Development vb.net
Member Avatar for ZER09
0
4K
Member Avatar for leo88

Hi, I am doing a window service application using C#. I wants to select many columns from many table and print into text file. Below is my coding: [CODE] protected override void OnStart(string[] args) { try { base.OnStart(args); Access_Db.OpenTransaction(); Access_Db.BeginTransaction(); DataTable dtPartNo = new DataTable(); SQLStr = "SELECT IDTbl.ModelID,WIPTbl.WIP FROM …

Software Development
Member Avatar for Mitja Bonca
0
233
Member Avatar for Pgmer

Hi All, Can anyone throw idea to make the form as Resolution Independent? Thanks..

Software Development vb.net
Member Avatar for sandeepparekh9
0
149
Member Avatar for wolfrain62

So I am kinda new to java and was given a program to do. a. Create one or more arrays to hold the names of the months and the number of days in each month. Assume that February always has 28 days. b. Display the contents of the array(s). c. …

Software Development java
Member Avatar for wolfrain62
0
109
Member Avatar for bettybarnes

hi guys i know this is just a very simple but i do not know to get started.. im developing a loan mng't system wherein the starting application of the customer say for example today. 06/08/2011, the initial payment will be on 08/08/2011.. how am i going to that do …

Software Development sql vb.net
Member Avatar for NETProgrammer
0
284
Member Avatar for vishalrane

is it possible to call form load event on button click Following is the vb code i want same function in vb.net [CODE] Private Sub cmdaddcancel_Click() Form_Load End Sub[/CODE] Private Sub cmdaddcancel_Click() Form_Load End Sub in vb we simply call Form_Load is it possible in vb.net For eg: IN VB.net …

Software Development vb.net
Member Avatar for sandeepparekh9
0
1K
Member Avatar for MrCapuchino

Hello, I have an application where I save an image to a database in a column of type VARBINARY(1024) I used 1024 because I think is the number of bytes and I want to handle images no larger than 1MB. I have my code to save the image and it …

Software Development image
Member Avatar for MrCapuchino
0
2K
Member Avatar for eng hassan

[TEX]This is a game i have made, but I have some problems in the breed & eat functions I dont know what is the problem & i really need help. the code works probably but the prey & the predator doesnt breed or eat,,,ANY HELP PLZZ[/TEX] [CODE]#include <iostream> #include<windows.h> #include<conio.h> …

Software Development c++
Member Avatar for raptr_dflo
0
1K
Member Avatar for SoulReaper1680

Hey, I have four labels in a form: label1, label2, label3, and label4. Now, if this was VB.NET, I would have used the following code to change their contents without having to type the code for each one separately: [CODE]For I = 1 To 4 Me.Controls("label" & I).Text = "Some …

Software Development
Member Avatar for SoulReaper1680
0
387
Member Avatar for laim

Hi, I have to build a matrix class with functions that you would expect, Im wondering if anyone can tell me why one or both of these functions arent working correctly? Basically a test harness is run against them to check so the data is random. Im sure it is …

Software Development c++
Member Avatar for laim
0
128
Member Avatar for jacksantho

Hi, I don't know why i am getting this error. Please see my coding part, where i am facing this following error [ICODE]Private pbat As New ADODB.Parameter 'in form load With pbat .Direction = adParamInput .Type = adVarChar .Size = 4 End With 'saving part [B] pbat = Trim(Text1.Text) & …

Software Development visual-basic
Member Avatar for BitBlt
0
1K
Member Avatar for jbennet

HI. I'm reading in a wave file and writing it to a sound device using ALSA. Im not a C++ guy (C#) so not very handy with its file I/O methods.. Any idea how do i change : [code]int rc = read(0, buffer, size);[/code] To work with any file i.e. …

Software Development c++
Member Avatar for raptr_dflo
0
3K
Member Avatar for kumarmpk4u

Hi all, In my MDI when i try to execute i am getting an assertion error pointing to wincore.cpp line 311. [CODE]BOOL CWnd::Attach(HWND hWndNew) { ASSERT(m_hWnd == NULL); // only attach once, detach on destroy ASSERT(FromHandlePermanent(hWndNew) == NULL); // must not already be in permanent map [/CODE] here is the …

Software Development c++
Member Avatar for raptr_dflo
0
880
Member Avatar for pilipino93

Hi, I've been working on this mini project on a WFA. Basically what I'm trying to do is, move files through a checkedListBox. I have the c.listbox and i got the items on it, but I want to have the files moved (only the checked ones) into a pre-defined directory …

Software Development
Member Avatar for pilipino93
0
195
Member Avatar for localp

I have a windows form application which has a text box and 3 buttons. Now i need to add focus to a button for 1 second, and then add focus to the other button for a second.. like wise to adding focus to all these 3 buttons for 1 second …

Software Development
Member Avatar for Mitja Bonca
0
222
Member Avatar for markfw

Hi How can I run the function from function name? Here what I have and it gives me an ERROR. Can someone explain why and how to fix it. Thanks ContantsGlobal.py [CODE] CMD = ["02", "A0"] [/CODE] Test.py [CODE] import ConstantsGlobal as GCONST class Test(object): def __init__(self): self.__dic = dict(("0x"+f, …

Software Development python
Member Avatar for markfw
0
169
Member Avatar for Batch File

I am new to the c++ programming language and I need help. So I have created the program in the extension .cpp ,but how can I run it, its just text! Is their anyway I could run it as a program from command line or an executable file? Plz help. …

Software Development c++
Member Avatar for Batch File
0
154
Member Avatar for moone009

Can someone please tell me why the results of my query are not appearing in my console application? I have a feeling it is something wrong with the console.writeline or readline [CODE]Imports System.Data Imports System.Data.SqlClient Module Module1 Private Property Sql As String Sub Main() Dim ConnString As String = "Data …

Software Development open-source vb.net
Member Avatar for Unhnd_Exception
0
98
Member Avatar for Batch File

I am making an encryption product in batch (it is as impossible as that may seem) ,but as soon as I think of something another error comes up. E.G. Saving passwords and encrypting them - I have the method worked out fine and it works (sorry no code here!) ,but …

Software Development encryption
Member Avatar for Batch File
0
120
Member Avatar for Buffalo101

Hello, I have a window's handle; with that, I want to restore the window = bring it to front, on top of any other windows I have, and set focus on it. The only way I can do that (using shortcuts, atm) is by minimizing the currently active window and …

Software Development
Member Avatar for Diamonddrake
0
309
Member Avatar for eman 22

I have an integer array and I want to fill it. [CODE] int* a=new int[7]; [/CODE] but I want to check at first if the element a[i] is set before or not. Ex. a[3]=2; a[3] has value but all elements in a hasn't have any value until now, How can …

Software Development c++
Member Avatar for Narue
0
86
Member Avatar for vishalrane

[CODE]Private Sub frmCust_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dbSource = "Data Source=xx-B4C521B850\SQLEXPRESS;Initial Catalog=TT;Integrated Security=True" con.ConnectionString = dbSource con.Open() da.Dispose() sql = "Select * from Cust" da = New SqlClient.SqlDataAdapter(sql, con) da.Fill(ds, "Cust") da.Update(ds, "Cust") con.Close() MaxRows = ds.Tables("Cust").Rows.Count inc = -1 End Sub [/CODE] if after …

Software Development open-source vb.net
Member Avatar for debasisdas
0
112
Member Avatar for asterix15

what is the use of making a variable public. After all the client is provided only with the .exe code So now whats the actual use of maling a variable private?

Software Development java
Member Avatar for stultuske
0
102
Member Avatar for kitjo

i published my projects but it seems when i install the published setup, the application does not fetch data from the database yet the database is included in the published application. could anyone help me with this exception?

Software Development vb.net
Member Avatar for Pgmer
0
164
Member Avatar for anurag.kyal

Code: FileInfo fi = new FileInfo("\\intranet.xyx.com\abc\efg\def.txt"); if (!fi.Exists) Console.WriteLine("Doesnt exist!"); Prints doesnt exist whereas this file actually exists. It works fine with files on my computer but. Is the method to access this file(on the intranet) wrong. Infact, the VB code for the same: try Dim dummy As String = …

Software Development lan-wan
Member Avatar for anurag.kyal
0
150
Member Avatar for Mr. pen

Hii all :D How are you ? Hope Everything is gr8 first ,sorry for any language mistakes , but English is not my native language :) This is my Code which has 5 class 1. district. 2. region. 3.MinsteryOdEducation 4.main 5.SchoolGroup all the codes are below .. I design it …

Software Development java
Member Avatar for Mr. pen
0
187
Member Avatar for arka.sharma

Hi All, I am trying to write a program that will take a straight line,circle,square or some regular geometric shape as an image.And tell which geometric figure it is.Anybody give me some idea where to start. Thanks and Regards Arka

Software Development java
Member Avatar for JamesCherrill
0
134
Member Avatar for goyofoyo

so I am in the process of creating a lc-3 compiler that is written in C and I am stuck on how to convert the BR command into C language, the assignment asks that i get a file and then spit it out in zeros and ones , but with …

Software Development c
Member Avatar for TrustyTony
0
267
Member Avatar for nonshatter

All, I have a simple question. What is the standard procedure for retrieving form values via POST method in a web form? Perl can be extremely awkward for web programming, I'd normally use something else, but in this case I need to use Perl for the CPAN module. Anyway, back …

Software Development first-post perl
Member Avatar for nonshatter
0
477
Member Avatar for bangor_boy

Can someone please explain break statements to me, as far as i understand a break statement leaves the loop before it has ended. But i run this code and expect to get "Zero" "One" But I get "Zero" "One" "One" "Unknown number" [CODE] for (int i = 0; i < …

Software Development java
Member Avatar for stultuske
0
181
Member Avatar for WildBamaBoy

If you look at a bunch of files with the Details view, file types known to Windows have a greater description of the file in the Type column. For example, .exe is an Application, .txt is a Text Document, and .cpp is C++ Source. If they are not known, Windows …

Software Development file-system
Member Avatar for WildBamaBoy
0
96
Member Avatar for FiToKa

Hello, everybody. I'm having some terrible task for homework and I'm just out of my mind. Here it is: [I][COLOR="Red"]Define a class Deque that represents a deque of strings by keeping its elements in a dynamically allocated array (with maximum capacity) and make the deque as a "circular array" (the …

Software Development c++
Member Avatar for FiToKa
0
138
Member Avatar for ssesham1

Hi, I want to use a template function that is used to convert strings to numeric types in a non-templated class. I have: [CODE] class Reader { ... template <class T> T ConvertString (const std::string str); }; [/CODE] Is it possible for me to define the template function in an …

Software Development c++
Member Avatar for thekashyap
0
437
Member Avatar for XMasterrrr

Hello guys as i see this is a little error and i don't know how i can't fix it so the following are the main and the header file from the book i learn from: main: [CODE]#include "../std_lib_facilities.h" int main() try { vector<int>numbers; int number; cout << "Enter the numbers …

Software Development algorithm c++ os-x
Member Avatar for Salem
0
431
Member Avatar for brisby

Hi everyone, im still new to this forum and started to learn about visual 6, i have situation below, this program to obtain reader name and bonus point earned menu File Edit Help Points Clear About Summary __________ Exit Font Color Quesstion, For Points menu command what is a suitable …

Software Development session visual-basic
Member Avatar for ChrisPadgham
0
516
Member Avatar for warlord902

I have some doubt regarding how class variable gets initialized, both static and non static. I mean, suppose I have a class like below. [CODE] public class MyClass{ public static HashMap<String,Buddy> buddiesMap= new HashMap<String,Buddy>(); public static ArrayList<String> buddiesList=new ArrayList<String>(); public static HashMap<String,ImageIcon> avatarMap=new HashMap<String, ImageIcon>(); public static ServerConnection con=new ServerConnection(); …

Software Development java
Member Avatar for thekashyap
0
580
Member Avatar for winecoding

I am learning to use mahout by starting with a example copied from the book. However, the eclipse compiler gives me the following message: [QUOTE]Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.apache.mahout.cf.taste.impl.model.file.FileDataModel.<clinit>(FileDataModel.java:119) at mia.recommender.ch02.RecommenderIntro.main(RecommenderIntro.java:18) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at …

Software Development apache java
Member Avatar for thekashyap
0
204
Member Avatar for vom53

------------------------------ [U][B]Problem:[/B][/U] Given a slider x-value find and plot the equation of the line tangent to a given curve f(x) together with the function f(x). ------------------------------ [CODE]from visual import * def function(): print "Type in your function." return raw_input("Enter it again, %s." % (yn)) from visual.graph import * # import …

Software Development python
Member Avatar for vom53
0
135
Member Avatar for Soubhik

Hi Say I want to write a header file as an exercise. It will contain a bunch of functions and some constants. Q1. I noticed that the standard header files only contain the function prototypes. a> Where are the actual functions? b> How do I write a header file such …

Software Development c
Member Avatar for Soubhik
0
216
Member Avatar for sunnynight

Dear Friends, This is my homework, I have a text file containing the following content: [QUOTE]0 12 1 15 2 6 3 4 4 3 5 6 6 12 7 8 8 8 9 9 10 13[/QUOTE] I want to read these integers from data.txt file and save the two …

Software Development java
Member Avatar for hfx642
0
199
Member Avatar for vomhaus

I wrote a method to read in a txt file and then return the value(s) line by line. However, the value(s) are being returned as such - [Ljava.lang.String;@6f579a30. I would have expected something different. The .txt file I'm reading in has value(s) in the file like this... A B C …

Software Development file-system java
Member Avatar for NormR1
0
150
Member Avatar for Seaboot

I am interested in learning simple 16 bit interaction of code between Turbo C++ 3 and Masm 6.11. Could anyone describe how that would basically work in terms of what statements in either contribute towards the interaction. Thanks.

Software Development assembly c++
Member Avatar for Ancient Dragon
0
262
Member Avatar for XMasterrrr

Hello guys as i see this is a little error and i don't know how i can't fix it so the following are the main and the header file from the book i learn from: main: [CODE]#include "../std_lib_facilities.h" int main() try { vector<int>numbers; int number; cout << "Enter the numbers …

Software Development algorithm c++ os-x
Member Avatar for XMasterrrr
0
250
Member Avatar for merse

I would like to ignore empty line and line started with # [CODE] std::string line; while (getline(input,line)) { if (line[0] == '#') continue; if (line[0] == '?') continue; ... } [/CODE] Where ? is, I would like to put the end line character, but what is it in C++?

Software Development c++
Member Avatar for mrnutty
0
215
Member Avatar for winecoding

I am trying to save an integer matrix to the csv file. My code is listed as follows. [CODE]try { FileWriter writer = new FileWriter("test.csv"); for(int i = 0; i < row; i++) { for (int j=0; j<(column-1); j++) { writer.append(Matrix[i][j]); writer.append(','); } writer.append(Matrix[i][j]); writer.append('\n'); writer.flush(); } writer.close(); } catch(Exception …

Software Development java
Member Avatar for hfx642
0
120
Member Avatar for dgreene1210

I am only a very beginner and was wondering if anyone can give me some help in determining how to fix the error messages i keep getting when i try to compile. I have been pulling my hair out for 3 days. Any help is much appreciated! attached is the …

Software Development c++
Member Avatar for MareoRaft
0
974
Member Avatar for MareoRaft

This program refuses to take foom as input, yet if I were to put "matrix.txt" into the function instead of foom, it would work fine. [CODE]#include <fstream> #include <iterator> #include <sstream> #include <vector> #include <string> // needed? using namespace std; typedef vector<double> Vec; typedef vector<Vec> Mat; Mat readMatrix(string foom){ Mat …

Software Development c++
Member Avatar for mrnutty
0
244

The End.