43,549 Solved Topics
Remove Filter ![]() | |
Hi ! I am writing simple email client that uses TCP/IP sockets to interact with an SMTP server to send email messages. this is my code import java.io.*; import java.net.*; import java.util.*; import java.text.*; public class TestSendMail { public static void main(String args[]) throws IOException { Socket socket; DataInputStream dataInput; … Software Development client-server java | |
I creating a small program which basically reads Electronic identity cards and stores the information in a SQL database. There is more to the program of course, but this is where i need help with. The EID has a picture from the person also. I decided not to save the … | |
Well, I have managed to create controls during runtime. Dim Rbut As New Button() Dim Lbut As New Button() With Rbut .Location = New Point(590, y + 15) .Text = "Remove" .Name = FontName(ListBoxCount) End With With Lbut .Location = New Point(590, y + 45) .Text = "Lock" .Name = … | |
The code below gives me a Narrowing conversion from int to uint32_t: typedef union RGB { uint32_t Color; struct { unsigned char B, G, R, A; }; } *PRGB; inline RGB Rgb(int R, int G, int B) {RGB Result = {((R & 255) << 16) | ((G & 255) << … Software Development c++ | |
Situation: need to read a CSV (txt) file that has no header and has 4 fields (all numeric), the number of lines will vary. Sample data: 160827,00003,000000075,0000025 84144,00001,000000050,0000050 161060,00002,000000050,0000025 40015,00002,000000100,0000050 61955,00002,000000100,0000050 etc etc I want to read this file into a DataGridView for proofing and later insert all these lines … Software Development file-system microsoft-access vb.net | |
I've got a program I'm writing that A. runs as a service B. grabs a screenshot of a specific window every X number of seconds C. prints it to the default printer. A and B are more or less done. C is confusing me. I'm looking for a way to … Software Development printer | |
Hello All! I was just wondering if C++ classes could internally be represented in the following way: #include <stdio.h> struct A { int a; void (*ptr) (A *); }; void display(A *ptr) { ptr->a = 2; printf("ptr->a = %d", ptr->a); } int main() { A obj; obj.ptr = display; obj.ptr(&obj); … Software Development c++ | |
I'm trying to make a search by different option say A, B . what i need is if user provide value of A only then it does the searching using parameter A only , if user provide A and B then it needs to do searching using condition A=value1 AND … | |
Hi I'm writting this code to prepare electricity for as many users as there are input. I don't got when I compile it always shows something where the "if" start. I need a fresh look please. Thanks [code] import java.text.*; // format output import java.util.*; // Scanner class public class … Software Development java | |
I have recently been working on a project that requires the use of vertical text within the first row of a Stringgrid. When I change the drawing style of the Stringgrid to gdsThemed, the vertical text displays , however the text is also displayed horisontaly accross the cell. Here is … | |
I am doing a sample program where it involves inserting data from textboxes and a Combox to SQL Server databse ... private void btnAdd_Click(object sender, EventArgs e) { da.InsertCommand = new SqlCommand("INSERT INTO Member VALUES (@MemberID, @Name, @Surname, @IDNo, @Address, @Town, @TelNo, @MobNo, @Email)", c); da.InsertCommand.Parameters.Add("@MemberID", SqlDbType.VarChar).Value = textBox50.Text; da.InsertCommand.Parameters.Add("@Name", … Software Development | |
I am building a program which generates a random number in a textbox everytime the form loads. I have this code : public partial class Form1 : Form { SqlConnection c = new SqlConnection(@"Data Source=GILBERTB-PC\SQLEXPRESS;Initial Catalog=DVDandGameBooking;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter(); public Form1() { InitializeComponent(); random(); } //private void … Software Development sql | |
hi, i read in ebook about overleaded iostream operator for class, but im a bit confused about this one : ostream &operator << (ostream &strm, const FeetInches &obj) { strm << obj.feet << " feet, " << obj.inches << " inches"; return strm; } > Notice the function has two … Software Development c++ | |
Hello Friends, I have a doubt.... Can we set the windows form resolution according to pc screen resolution and even the control should be adjusted....is it possible??? eg. My screen resolution is 1366 X 768 and my form size is 1254, 709....but I want it so set according to the … | |
**Dudearoo** *Useing Code::Blocks* Hey you guys. ive got a problem, ive got a simple while loop being executed that loops 41 lines of code untill the user types no for example int repeat = 2; while (repeat == 2) { // my code // || Example Code // \/ cout … Software Development c++ | |
Good Afternoon, I'm new to C++ programming and I have to do a program that deals with strings. Below is the code that I have so far, I have problems in this section of the program Get three lines from the keyboards. Play with string copying, concatenation, and input size … Software Development c++ | |
hi everyone I am having a little problem with the program below. If I input "2/5 * 2/6" the char "/6" will be stored, so when I try to multiply by a simple variable by entering "3/7 * 6" the program will read "3/7 * 6/6". is there a way … Software Development c++ | |
Hey after all the fuss about Composition and inheritance and drilling in the fact that Composition is superior,I dont understand why the need to know ploymorphism?Since it is gotten through inheritance.Is this a joke? Whats the industry practice?Are they use **widely**? Software Development java | |
So, I'm automating a payment import system, writing the whole thing from scratch. It has to pull data from excel files (including extraneous data that we need to discard), process it, and insert it into a database. Oddly, those aspects are going quite well. However, I'm running into a problem … Software Development vb.net | |
https://dl.dropbox.com/u/21125662/compilation/OsuModTool.txt It doesn't really work - text didn't change - why it doesn't work? It doesn't give me any error (but print prints what it should) https://dl.dropbox.com/u/21125662/compilation/post_adder_win.txt I call function through keyboard event Software Development python | |
Hello everyone ! I want to get output in C++ in same line. The following code gives me output in separate line. for(int i=0; i<=10; i++) { cout << i <<" " <<endl; } Software Development c++ | |
Hello Friends, One help needed.... I have a product database....in which I have productid,prodname,inventoryvalue,reordervalue I have to design a email system that as soon as the product reaches the reorder level it shud generate an email.... but the condition is there will be many products in the database....and on one … Software Development database-design dataset email vb.net | |
Can anyone correct my mistake. Provided code: public void testSetBaseSalaryNegative() { final double altBaseSalary = -999.99; try { emp.setBaseSalary(altBaseSalary); // Expecting an IllegalArgumentException fail ("Negative base-salary values should be rejected by setBaseSalary and result in an IllegalArgumentException"); } catch (IllegalArgumentException ex) { // This is the nominal case } catch … Software Development java | |
Never had this problem before, and i am not sure how this happened. I got a Mysql sql database for my project. The id field is set as auto increment, which seems to function correctly. But on the form in my text field and datagrid i see a negative number, … | |
A program written in assembly is machine dependent but a program written in Java ,python etc.. are not. why is that at the end don't they all get converted in to machine language? Software Development assembly | |
hello ! i am working on a c# project , but i had done all this is vb before , now i have all the code in vb.net and i want to use it in c# project , someone told me that if i make dll of my vb modules … Software Development vb.net | |
Can anyone check my memory class and suggest changes or things I may need? I'm writing it so that I don't have to worry about deleting anything everytime I allocate. #include <iostream> template<typename T> class Memory { private: size_t size; T* data; public: explicit Memory(size_t Size) : size(Size), data(new T[Size]){} … Software Development c++ | |
Good Afternoon, This is my first class in C++ and I'm having problems with a program that needs to print a calendar of June, July and August 2008 into the output file "outCalendar.txt" . I should format the result for month well so that it looks like a real calendar … Software Development c++ | |
This program does not crash but behaves badly due to not allocating enough space for vector z in line 21. If I comment out line 21 and instead uncomment line 23, things work well. If I comment out both lines 21 and 23, the program will crash, presumably because I … | |
Here's my code Dim allelementds As HtmlElementCollection = MbFacebookBrowser.Document.GetElementsByTagName("span") For Each DD As HtmlElement In allelementds If DD.OuterHtml.Contains("resource") Then TlsResourceComboBox.Items.Add(DD.GetAttribute("InnerText")) End If Next LblHel.Text = TlsResourceComboBox.Items.Item(0).ToString LblIro.Text = TlsResourceComboBox.Items.Item(1).ToString LblOxy.Text = TlsResourceComboBox.Items.Item(2).ToString LblWat.Text = TlsResourceComboBox.Items.Item(3).ToString As you can see im currently using a combobox as a type of a list … Software Development vb.net | |
How can i implement this constructor? I tried replacing commissionEmployee = new CommissionEmployee with this but the complier asked me to create another constructor. public class BasePlusCommissionEmployeeComposition { private double baseSalary; private CommissionEmployee commissionEmployee; // six-argument constructor public BasePlusCommissionEmployeeComposition( String first, String last, String ssn, double sales, double rate, double … Software Development java | |
I made a new project that has to open a folder using DIR * `DIR * directory=openDir(...); // openDir is a function returning DIR * after it was opened` than to make a new folder in it, so far so good `mkdir(path,permissions);` and now i have to run through the … Software Development c | |
What's a fast way to fill a union/struct of integral members with ALL Zeroes? RECORD* UNION = {0}; void ZeroStruct(int X, int Y) { UNION = new RECORD[X * Y]; int K = 0; for (int I = 0; I < X; I++) for (int J = 0; J < … Software Development c++ | |
Is it possible to overload one operator more than once? I have a struct that is just my idea of a C++ Box. I'm trying to increase the size of a box using an integer or another box. I'm trying to do: Box X(0, 0, 0, 0); Box Y(1, 1, … Software Development c++ | |
there are two panel in one panel there is search button and in the another one there is Jtable for displaying search result. In that jtable initially all the records are displayed. But when i try to search, it works but the problem is that i need to click search … Software Development java java-swing | |
Dim MaxVal As Integer For a = 0 To DataGridView1.RowCount - 1 If MaxVal < DataGridView1.Item(DataGridView1.ColumnCount - 1, a).Value Then MaxVal = CInt(DataGridView1.Item(DataGridView1.ColumnCount - 1, a).Value) End If Next MsgBox("The Optimum Value is " & MaxVal, 1, "Optimum Choice") Software Development vb.net | |
I have a union defined as so: typedef union RGB { unsigned Color; struct { unsigned char B, G, R, A; }; } *PRGB; I'm reading 32 bit and 24 bit bitmaps. I'm trying to Read Pixels from my RGB union and set pixels as well. I know bitmaps are … Software Development c++ | |
Hi, What is for ( : ) in java.i know what a loop is but lately when i am doing excercises these keep coming up Example:** for(Field currentField : emp.getClass().getDeclaredFields())** Software Development java | |
ey i have following code for crystal report 8.5 to vb6... i just want to change database location of report from vb code... Private Sub Form_Load() Dim Reportapp As New CRAXDDRT.Application Dim Report As CRAXDDRT.Report Set Report = Reportapp.OpenReport(App.Path & "\orders.rpt") Report.Database.SetDataSource App.Path & "\RatanDB.mdb" CRViewer2.ReportSource = Report CRViewer2.ViewReport CRViewer2.Zoom … Software Development visual-basic | |
what sql command i must use. this is my current command but it give me an error saying "The specified filed 'ClientNo' could refer to more than one table listed in the FROM clause of your sql statemate." Try dc.Connection = conn dc.CommandText = "SELECT * FROM tblClient, tblClientInfo WHERE … Software Development vb.net | |
The following is my code for Edit Distance problem. The problem asks us to find the edit distance between two strings. My code, I think gives the correct output. If I run the code with two strings of 1500 length each, I get the error. But if I run it … Software Development c++ | |
Hello Folks, Im really newbie in VB.NET and i hope that someone could explain how may i do this successful, ok im explaining now.. I had two richtextboxes and one button First richtextbox contains the following text: <user_register.php: 2012-02-21 00:03:49 POST username=sexhunger15 email=ho_t**@hotmail.com email_confirm= password=vergota password_confirm=vergota country=CA msisdn= isyp=0 isPremiumChat= … Software Development vb.net | |
I have an Attendence form the form is like this the employee should select there number then click on sign in button it should save the date of the day , the time in , the number of the employee and display tha data in the gridview and disable the … Software Development vb.net | |
I am getting an error that is"Invalid object name 't_Images' " here is my code: SqlConnection s = new SqlConnection(con); s.Open(); byte[] data; using (System.IO.MemoryStream stream = new System.IO.MemoryStream()) { video.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp); data = stream.ToArray(); } SqlCommand s_Com = new SqlCommand("INSERT INTO t_Images (Image_ID,Image)"+" VALUES (1,@data) ; ", s); SqlParameter … Software Development sql | |
private void btnSend_Click_1(object sender, EventArgs e) { To = txtPhoneNumber.Text.Trim() + cboCarrier.SelectedItem.ToString().Trim(); From = txtSender.Text.Trim(); Subject = txtSubject.Text.Trim(); MailServer = txtMailServer.Text.Trim(); Msg = txtMessage.Text.Trim(); try { MailMessage message = new MailMessage(From, To, Subject, Msg); SmtpClient mySmtpClient = new SmtpClient(MailServer); mySmtpClient.UseDefaultCredentials = true; mySmtpClient.Send(message); MessageBox.Show("Message has been sent to " + … | |
Hi to all first to say I am beginner in programming so please dont mind for mistakes I could write here :) I have this problem, on the form I use one combobox with Data Bound items, Data source, Display member & Value member. Besides this combobox I have textbox … Software Development vb.net | |
public void findHighestNumber(int timesToLoop) { int highNumber = 0; int counter = 0; int userInput = 0; while(counter < timesToLoop) { System.out.print("Enter a whole number: "); userInput = reader.getInput(); counter++; System.out.println(""); } if(userInput > highNumber) { highNumber = userInput; } if(counter == timesToLoop) { System.out.println("Finished looping! Highest is " +highNumber); … Software Development java | |
For a shell script used to automatically generate c++ code files, I have to split certain names apart for them to be formatted. I split them at a capital letter, but I do not want to split if there are multiple capital letters in sequence. For example: I want this … Software Development shell-scripting | |
I have a problem. 1>------ Build started: Project: SDL Test, Configuration: Debug Win32 ------ 1> playa.cpp 1> main.cpp 1> Generating Code... 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths return a value 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths … Software Development c++ visual-studio |
The End.