Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'll let the python experts comment on the code. What I would add (and this is independent of the language) is a header which describes the purpose of the code and perhaps some notes on its implementation. I would also add comment blocks to each class/method. The class/method names are not sufficient documentation.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Yes, because it doesn't work due to too many people abusing the system

Republicans want to defund SNAP but they aren't proposing anything to take its place to help the people that need it. In effect they will cut off everyone in order to prevent abuses. I notice they increased agricultural subsidies. I guess there are no corporations abusing the system. I give as much credence to their claims of SNAP abuse as I do to their claims of voter fraud (the reality is essentially non-existent as opposed to their claims of "rampant")

What makes you think they already receive health care?

Reread my post. I didn't say they already received health care. I asked why they wanted to keep millions of Americans from receiving affordable health care.

One father said of TV just this morning that it will cost him at least another $500.00 per month

I see Sean Hannity had three married couples on to talk about how the ACA was going to hurt them. One couple claimed how it would hurt their construction business. They would have to restrict the hours of employees to keep them as part time because of the increased costs. They have only four employees and under the ACA, their only requirement is to make employees aware of the ACA website. There is no cost to do that so they are either lying or ignorant.

The second couple was paying $1100 a month for a policy under …

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The $500 hammer thing I can understand for two reasons

  1. it's a way of giving yet more money to private companies in return for generous campaign donations
  2. it's a way of hiding expenses for "off book" operations

AD - you are obviously opposed to the ACA. Can you explain to me how Republicans can claim to be pro-life and yet are willing to

  1. defund SNAP
  2. keep millions of Americans from receiving affordable, basic health care
  3. loosen gun laws so that even more people die

And lest I forget, many Republicans would deny contraception (which would prevent unwanted pregnancies) to many. I guess pro-life means only from conception until birth. After that you are on your own.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think the ON AND in the above post should just be ON.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Handy tip - under Windows if you press alt-printscreen it captures only the active window.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Is this a wireless mouse? I've been having problems for over a year on my 5-year old Dell Inspiron laptop, mostly when I restore from hibernation; almost never when I restore from sleep mode. I've had this happen with two wireless mice and it seems to happen more frequently on the rear ports than the side ports. I even rebuilt the OS from scratch to see if it was a software problem. I suspect it is a hardware problem but it is not serious enough to warrant getting anything fixed. The only thing that works is to remove and reinsert the USB adaptor.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This news item is now over a year old. Can we un-sticky it and just let it bubble to the top when someone posts?

happygeek commented: done +12
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That was supplied as the second parameter in the declaration

Dim cmd As New OleDbCommand("", con)
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Have you tried the connection string examples at connectionstrings.com?

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm not sure about a couple of things. First, I don't know why you have the single quotes arount @NEW in

CMD3.Parameters.Add(New OleDbParameter("'@NEW'", OleDbType.Date)).Value = Date.Today

I'm also confused as to why you don't get an error by putting "@" type parameters in the query. On my system (vb.net 2010) I get the error

Must declare the scalar variable "@name".

where I put @name in the query string. This is how I would build the query using OleDb

Dim CMD3 As New OleDbCommand("UPDATE ST SET CLICK = ? WHERE [DATE]= ?",con)

CMD3.Parameters.AddWithValue("@parm1", Label1.Text)
CMD3.Parameters.AddWithValue("@parm2", Today)

where each replaceable parameter is indicated by ? and parameters must be added in the order in which they appear in the query. So try that and let me know how it goes.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Because the competition is long over and now off topic perhaps this thread could be "un-stickied" now.

happygeek commented: :) now unstuck +0
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You have to open the connection before you read. Here's an example

lvwResults.Items.Clear()

Dim con As New OleDbConnection("Provider=SQLNCLI10;Server=.\SQLEXPRESS;Database=PUBS;Trusted_Connection=Yes;Connect Timeout=15;")
Dim cmd As New OleDbCommand("", con)

cmd.CommandText = "SELECT au_lname,au_fname,phone " _
                & "  FROM authors                 " _
                & " WHERE au_lname like ?         " _
                & "   AND phone    like ?         " _
                & " ORDER BY au_lname             "

cmd.Parameters.AddWithValue("@lastName", txtLastName.Text)
cmd.Parameters.AddWithValue("@phone   ", txtPhone.Text)

con.Open()
Dim rdr As OleDbDataReader = cmd.ExecuteReader()

Do While rdr.Read
    lvwResults.Items.Add(New ListViewItem({rdr("au_lname"), rdr("au_fname"), rdr("phone")}))
Loop

rdr.Close()
con.Close()
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can try a test post if you like. Create a new thread and submit the first post. then go to that post and click Edit Post. You should be able to modify the title.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

many of the prostate surgeries in the USA are unnecessary - the cancer would have gone away by itself

The reason is not that prostate cancer "goes away". The reason is that in many cases the cancer is so slow growing that the sufferer would usually die of other causes before the cancer becomes a problem. In many cases, treatment causes more problems than it solves, impotence and incontinence, for example.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Or you could replace the single quote in hi what's up with two single quotes as in hi what''s up.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My point was that there are conditions that are exclusive to both sexes. Aside from prostate problems, I imagine you rarely see women being treated for erectile disfunction. The insurance $$ all go into the pot for both sexes. Some goes for women's problems and some for men's and some goes for both. And has been said here and elsewhere, reproduction involves both sexes even if the more labor intensive (hilarious pun intended) parts belong to the women.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can only change the title of a thread that you started, and only in the first 30 minutes after you created it if I am not mistaken.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Conversely, male-specific benefits was 0.

So prostate examinations and treatment for various disorders of same (enlargement, cancer, etc) apply equally to both sexes?

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It would help to see the code.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Both of my children are long since out of school and earning an income. Even though I have no further use for the public school system I still gladly pay school taxes because they help pay for a system which benefits society as a whole. Some might consider this a subsidy of a service for which they receive no benefit. I consider it an resposibility for being part of a civilized society. Likewise for that portion of my taxes that go toward maternity care.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

This thread is more than nine years old and does not require a response. Please do not resurrect old threads.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You could just create the controls at runtime and put all of them inside a panel as in

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    Dim xpos As Integer = 10
    Dim ypos As Integer = 20

    Panel1.Controls.Clear()

    For Each line As String In System.IO.File.ReadAllLines("d:\temp\test.txt")
        Dim txt As New TextBox
        txt.Text = line
        txt.Location = New Point(xpos, ypos)
        Panel1.Controls.Add(txt)
        ypos += 25
    Next

End Sub

As long as you set the AutoScroll property of the panel to True you'll be able to scroll through the ingredients and you won't have to worry about not having enough controls for the ingredients. You can use AddHandler to add an event handler to the newly creaded controls.

On the other hand, why not just use a multi-line textbox and display the ingredients as

TextBox1.Text = System.IO.File.ReadAllText("d:\temp\test.txt")
ddanbe commented: Nice point of view. +15
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When you get a response back that says 0 rows affected it means that no records were updated. Try

SELECT * FROM mysql.user  
 WHERE User='garrett' 
   AND Host='localhost';

and see if any records are returned.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That's a distinct possibility. It's certainly not from overuse.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I have created THREE programs with VB. So I dont think Visual Basic Fundamentals will help me with a tutorial for login forms...

That's the problem when you provide so little information. I have no way of knowing your level of expertise. As I said before, the only thing that distinguishes a login form from any other form is its name. If you have created programs in VB then you already know how to create a form. So I'll ask again, what exactly are you stuck on?

As a simple demo I created a project with two forms, Main and Login. The main form has code

Public Class frmMain

    Private Sub frmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        Me.Visible = False
        frmLogin.ShowDialog()

        If Not frmLogin.LoginSuccessful Then
            MsgBox("login failed")
            Me.Close()
        Else
            Me.Visible = True
        End If

    End Sub

End Class

The login form has two textboxes and one button. The code is

Public Class frmLogin

    Public LoginSuccessful As Boolean

    Private Sub frmLogin_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        LoginSuccessful = False
    End Sub

    Private Sub btnLogin_Click(sender As System.Object, e As System.EventArgs) Handles btnLogin.Click
        LoginSuccessful = txtUsername.Text = "superuser" And txtPassword.Text = "godmode"
        Me.Close()
    End Sub

End Class

The main form is invisible until the user successfully logs in. If the login fails then the app closes.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

According to data found in a book by Kevin Dutton called "The Wisdom of Psychopaths: What Saints, Spies and Serial Killers Can Teach Us About Success", the following occupations have the highest proportion of psycopaths. Ranked from most to least likely they are:

  1. CEO
  2. lawyer
  3. TV & radio media personality
  4. salesperson
  5. surgeon
  6. journalist
  7. police officer
  8. clergy
  9. chef
  10. civil servant
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think PDFCreator allows you to do that.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can start with Visual Basic Fundamentals. Feel free to ask questions if anything is not clear.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Nope. Still getting regular emails.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The project is open source so a back door would be visible to those programmers with cryptograpy experience, Also, no services built on that will have access to the keys so warrants would be useless.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

There are several faux printers available that print to PDF. I use the free version of CutePDF Writer.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Nothing special required. Just make the startup form your login form. The login form would have a text control for the username and another for the password. For the password box, set the PasswordChar property to "*" to hide the characters.

To use roles you would have to have a database or an encrypted file that contains the ronle number for each user (which you already said you would be assigning).

What in particular are you having trouble with?

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
If DateDiff(DateInterval.Day, CDate("2013-10-01"), Now) > 10 Then
    MsgBox("program too old")
    Me.Close()
End If

If you want to save a date, for example, the date the program was first run, you could create an application level settings variable and give it a known initial value like 2013-01-01 then do

If My.Settings.FirstRun = Cdate("2000-01-01") Then
    My.Settings.FirstRun = Now
End If

If DateDiff(DateInterval.Day, My.Settings.FirstRun, Now) > 10 Then
    MsgBox("program too old")
    Me.Close()
End If
Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

As far as I know, your headset will not show up as a device because it is already present as microphone and speakers. When you plug in the headphones, one cord goes into the microphone jack and the other into the headphone jack which just redirects the sound from the builtin speakers to the headphones.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Taking a database class is valuable no matter what programming language you are planning to specialize in. What you will need to know is mostly independent of the programming language. You will learn how to define a database to properly store real world data in a manner that is both useful and non-redundant. You will learn the commands (SQL commands that are mostly common to all relational database systems) to modify, maintain and retrieve data from that database. Pay attention to the part about normalization.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That would be great then. I'll PM you with the address.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In the US, do you get fingerprinted for a driver's licence?

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Since 2008, MediaCoder comes bundled with the OpenCandy software recommendation service which changes the classification of the app from freeware to nagware. During batch conversions once a certain number of conversions have been performed a window appears requiring human interaction (a simple CAPTCHA) to dismiss or pay a donation in order to remove the periodic nagging. ($15 minimum in 2011, $20 in 2012, $25 as of August 2013). You might want to check out XMedia Recode

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It's flagging dt as the problem. It would help to see all code relating to dt including declaration/instantiation.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The creators of LavaBit and Silent Circle have joined forces to create Dark Mail, a new secure, encrypted and peer-to-peer email system more resistant to government surveillance. They're calling it the "Dark Mail Alliance." Details at mashable

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The problem with ffmpeg is trying to figure out the command line switches and parameters. Pazera provides a GUI for all that and includes ffmpeg. You might want to look at VirtualDub which I also use. That does conversion as well as editing.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I've also checked my service tag and noted that bluetooth was included. No problem with the terminology. There are numbers all over this blasted thing. I tried to get a Windows 7 driver from Dell but Windows 7 is not an option in the OS dropdown and I am not about to try a driver from one of the many suspect sites that claim to offer one. When I try to install the Dell Vista driver it says I have the wrong version. When I try to set compatibility in Properties, that option is greyed out. Sending me the dongle would be great but I don't want you to go to the expense. It would probably cost as much to ship it here as it would cost me to just buy one locally.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you want something easy (but not free) you can use DivX Converter (excellent compression and easy pick of options). If you want something free and flexible (but more difficult) you can use Pazera. It uses ffmpeg as a back end. There are several versions of the software for various formats but I suspect that they differ in name only (I use flv to avi but it handles more than just flv).

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You just asked for the Dell code. If you had said Dell Service Tag I would have posted 291S6G1. It took several iterations to run the online diagnostics but it is telling me that there is no bluetooth device present but I know for a fact that there is so perhaps it is FUBAR. I can get an Iogear usb one for $20 so perhaps I'll just do that.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The first step is to start a new thread with your question instead of hijacking this one. You'll increase your chances of getting an answer with a title relating to your question.

The second step is to provide evidence of actually having done some work yourself. We won't do your homework for you.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

DCOM Server Process Launcher is enabled and running (set to auto). Likewise for RPC Endpoint Mapper. The BIOS was the first thing I checked and it is enabled as well.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I took the question to mean that he found a code snippet elsewhere on the web and wanted to enter it into our code snippet library

On second reading I guess that was the obvious interpretation.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I disagree. The question was whether or not they can share the code snippets. I think it would be OK to share the code snippets as in

You can find an example of Dynamic Control Creation (Event Handlers) on Daniweb

That way the snippet is shared, the content stays unique to Daniweb and Daniweb gets promoted on other sites by having a link back to the forums (which can only improve ranking).

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think I'm going to give up on BlueTooth on this particular machine. I'll probably be getting a new laptop between now and next spring anyway (keeping an eye out for Christmas sales). It's circa 2008 and no longer under warranty.

Reverend Jim 5,259 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Earlier this month hackers stole almost 3 million encrypted credit card records from Adobe. Over the last weekend, someone posted a 3.86GB archive file containing 150 million Adobe usernames plus a 2.56GB archive supposedly containing source code for Adobe Acrobat, Reader, ColdFusion and Photoshop.