Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thatr is standard accounting practice when estimating income/expenses, at least hear in the US. It just simplifies the math. Of course the exact number of days is used when when banks "give" us interest on our accounts.

I agree with your suggestions, but they don't change the results.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

IMO he is just spamming,

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Catch.44 -- terrible movie, I slept though half of it. I'll give it a rating of one star out of 4, and it only gets that one star because there were 11 dead people at the end.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You need to post the code that produces the error. But I have seen it when I tried to declare a variable within one of the case statements without usine brackets { and }

switch(item)
{
    case 1:
       int x; // this will produce that warning

The solution is to use brackets

    switch(item)
    {
        case 1:
        {
           int x; 

        }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

it seems you arent on dribbble are you?

No, never herd of it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Solved the problem. The tutorial added the database file as a resource. When the program starts vb.net copies the database file from the resource into the destination director, in my case it is \Documents folder. I created a new project but did not add the file as a resource. Everything works as expected now.

Begginnerdev commented: Awesome! +8
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That's really weird!

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How does that relate to your original statement? After looking at your link I still don't know what that site is telling me. Maybe that's why it's named "dribble" -- just a lot of random stuff??

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I think your professor's numbers are wrong. Small rounding errors could account for some of the difference but not nearly that much.

Do the math manually with pencil & paper + calculator to see if you get the same results. My guess is your program produces the correct numbers.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

where did you get those expected numbers?

You don't need all three classes, just Account class would work. But if the intent is to learn polymorphism then just ignore this suggestion.

#ifndef ACCOUNT_H
#define ACCOUNT_H
#include <iostream>
#include <string>

using namespace std;

const int DAYS_PER_MONTH = 30;

class Account
{
public:
   Account(double interest_rate);
   Account(double b,double interest_rate);
   void deposit(double amount);
   void withdraw(double amount);
   double get_balance() const;
   void daily_interest();
private:
   double balance;
   double daily_interest_rate;
};

#endif 
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'll sell you some dribble :)

Reverend Jim commented: That's just awful. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The statement simply states "syntax error in INSERT INTO statement"

I got (bought) this eBook which gives a complete example, and the example ALMOST works, it retrieves all the data into the Grid, and attempts to update the database. After adding a row to th Grid, the program calls DataAdapter.Update() and it's feturn value (1) seems to be correct, there are no exceptions thrown, but when I check the table it has not been changed.

Begginnerdev commented: You've got to love those non-descript error messages. +8
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I also stopped all the other non-M$ services as suggested in that M$ article, so I don't know if just stopping the print spooler would have solved the problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

here is an example

#include <iostream>

int main()
{
   std::cout << "Hello World\n";
   return 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks LastMitch, it worked perfectly :) :) :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

When you load the combo box items do you load both country and capitals? I think there is a combo box property where you can associate something with each of the items in the list. If so then in the OnItemSelect event handler get the name of the capital and put it in the label.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks, but those links apply to people upgrading from windows 7 to windows 8 and already have office 2010 on windows 7. I'm trying to install office 2010 directly onto windows 8, so office starter won't do me any good.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I found out OpenOffice database is not compatible with Visual Studio either. So I installed MS SQL Server Express, also free.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks, I think.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Google docs doesn't have what I want -- I need a database program similar/compatible with Microsoft Access.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I spent the last 8 or so hours trying to install Microsoft Office 2010 on Windows 8 Pro. Didn't happen. I called iYogi tech support who tryed to help me for the last 3 hours with no success. We finally concluded Office 2010 is not compatible with Windows 8. So, I could upgrade to Office 2013 for ONLY $400.00 or install OpenOffice for free. Well, let me see now, which do you think I did???

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How can you remove bad links under "Linkbacks vis member badges"? The link has not been valid for some time now.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I started to do it manually, but it's just getting much too complicated because of various column types which are set automatically when the DataGridView is bound to database table.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have no clue why, I have not had a biology class since about 1960. But you might be interested in this article, which suggests diamond mines are covered in asbestos dust

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

post the assembly code that's in your program, e.g.

    asm {
        mov ax,1
        mov bx,ax
    }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks for the suggestion, but that didn't solve the problem.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

My very favorite composer is Tchaikovsky (Russian), the most brilliant composer the world has ever seen. Last summer I flew from my home to the Hollywoold Bowl in California (about 1500 miles) just to see his piano concharto No. 1 played.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

don't you guys wear masks when working with those diamonds?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I like this statement about Boomerang:

It therefore won't recreate the original source file; probably nothing like it.

So if you want the original source code then you will have to look elsewhere.

It's possible, although I have yet to see one that works well

If none of them work well then it's not possible is it?? You can't have it both ways.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

My favorites are classical (especially violen and piano) and music written in 1940's to 1960's. I hate almost everything written after 1969 (such as hard/acid rock) as well as opera. I'm not fond of jaz but will listen to it occasionally.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Firstly , i am bored of asking this question as i dont think it is possible..

It's not possible. The best you can do is get the assembly language, which isn't very useful to you. You could always ask the original author for the source code, which may or may not cost you lots of money.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have the code below in VS 2012. It dynamically allocates a DataGridView and an Update button, then it binds the grid to MS Access database table. That all works well. When I click the Update button btnUpdate_Click() is called, which calls the DataAdapter's Update() method. That produces the syntax error and then displays the sql string for debugging only. Anyone know what I'm missing?

a37b1576d9a85fb810f68ff57d1ee340

'*********************************************************
'The following are globals at the top of the program
'*********************************************************
Dim con As New OleDb.OleDbConnection
Dim nTries As Integer = 0
Dim binding_source As BindingSource
Dim data_table As DataTable
Dim data_adapter As OleDb.OleDbDataAdapter
Dim cmd_builder As OleDb.OleDbCommandBuilder
'*********************************************************
   Private Sub UsersToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UsersToolStripMenuItem.Click
        Dim btnUpdate As System.Windows.Forms.Button
        Dim sql As String
        'Dim ds As New DataSet
        Dim dg As System.Windows.Forms.DataGridView = AddControl(New System.Windows.Forms.DataGridView, 40, 40, 345)
        binding_source = New BindingSource()
        data_table = New DataTable()
        sql = "SELECT [LoginName],[Password] FROM [Users]"
        dg.DataSource = binding_source
        data_adapter = New OleDb.OleDbDataAdapter(sql, con)
        cmd_builder = New OleDb.OleDbCommandBuilder(data_adapter)
        data_adapter.Fill(data_table)
        binding_source.DataSource = data_table

        btnUpdate = AddControl(New System.Windows.Forms.Button, 75, 220, Nothing)
        btnUpdate.Text = "Update"
        'btnAdd.AutoSize = True
        AddHandler btnUpdate.Click, AddressOf Me.btnUpdate_Click

    End Sub

'*********************************************************
' Problem is here
'*********************************************************

    Private Sub btnUpdate_Click(sender As Object, e As EventArgs)
        Try
            data_adapter.Update(CType(binding_source.DataSource, DataTable))
        Catch ex As OleDbException
            MsgBox("ERROR:" & ex.Source & " " & ex.Message, MsgBoxStyle.OkOnly)
            MsgBox(cmd_builder.GetInsertCommand().CommandText, MsgBoxStyle.OkOnly)
        End Try
    End Sub
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Are you asking us to do your homework for you? Or do you have a specific question about that assignment? Just posting the assignment dos not tell us what you don't understand.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I already did that, but thanks for the reminder.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Great :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm using VS 2012 and coding a try/catch block in an MS Access database project, but VS says OleDbException is not defined (see line 3 in the code). Anyone know why? I got some of this code from here, and according to MSDN OleDbException is valid in vb.net

        Try
            data_adapter.Update(CType(binding_source.DataSource, DataTable))
        Catch ex As OleDbException
            MsgBox("ERROR:" & ex.Source & " " & ex.Message, MsgBoxStyle.OkOnly)
        End Try
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The syntax is slightly wrong, each of the pointers will contain the same address. In C language it is not necessary to typecast the return from functions that return void* such as malloc().

p=q=r=n=malloc(20 * sizeof(int));

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is how to create a thread in MS-Windows

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here's an interesting article about that. Depending on what you consider a word, Xantipius knows about as many words as most average native English speakers.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You need to use the mod % operator instead of division to find out if it's odd or even

if( Value%2 == 0)
{
   // even
 }
 else
 {
    // odd
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have no idea -- have not used Turbo C in 30 years.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

doesn't matter if it was spontaneous or not -- the sample size is still just too low to be of much value except to say that more and larger studies are needed to verify the results. And the results do have to be verified and duplicated or they are pretty useless. I quit smoking 12 years ago after smoking since I was a teen-ager. Tried several times to stop, and finally quit cold turkey. I have yet to be diagnosed with any form of cancer, although I think my failing eyesight was probably caused by smoking as well as stairing at computer screens for 20+ years.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

IMHO that's great news :) English is (or is becoming) the universal language of business, so everyone all over the world is better off if they learn at least some English.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

We won't do your homework for you. But I will give you a hint

#include <iostream>

int main()
{
    // put your code here
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I claimed it is bullshit because the sample size is just too small to be of any significance, which is why I quoted that line. Don't care if it was copied word-for-word, it's still bullshit. IMO it's not in violation of DaniWeb rules since he provided a link to the original text. This would fall under the "fair use" laws in the USAl.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

fflush is not supposed to work with stdin -- it's only for output streams like stdout. You can write your own fflush like this

void flushKeyboard()
{
   while( kbhit() )
       getch();
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Researchers interviewed 115 lung cancer patients

This whole story is nothing more than bullshit.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Before calling getch() find out if anything is in the keyboard buffer kbhit() from conio.h will tell you that. If nothing there then you can check for mouse input.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There is a different form of getline() that is used with std::string.

line.getline(someStream);

After the above all the characters are in the std::string line. Why would you want to copy them to a character array? You don't need a loop to do that, just this one line. But there is rarely any reason to do it.

strcpy(a,line.c_str());

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 44: remove the semicolon. As it is, it's just a function prototype.

line 46: ignore() removes one or more keys from the keyboard buffer.

When you come across a function that you don't know what it does you need to use google to find out about it.