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

I had the same problem but it's much better now that nobody wants to chat with me ;-P

ddanbe commented: include me! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

At the same time that Apple was suing Microsoft for stealing the "look and feel" of their GUI they were defending themselves against a similar suit filed against them by Xerox.

Slavi commented: Lol +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

In Saudi Arabia, women can fly planes but it is illegal for them to drive cars.

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

The first telephone in a private residence was installed in the house of Samuel Clemens (Mark Twain) in 1876.

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

The Cavalier King Charles breed can suffer from a condition where its brain continues to grow beyond the size of the containing skull. Dogs with this condition must be put down because of the extreme pain that this causes. This condition is a result of bad breeding practices.

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

Technically, no breed of dog is a natural breed. Suggested viewing is the 2009 documentary, Pedigree Dogs Exposed.

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

Heroin was originally marketed by Bayer as a drug suitable for helping morphine addicts to kick their addiction.

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

I don't usually recommend software unless I am asked, but I came across something that was too good not to share. I had taken a video while biking down a road here at the cottage and was very disappointed in the result with all the shaking and jittering. I went looking for some way to de-jitter and found a free plugin for VirtualDub. The plugin is called Deshaker and was written by Gunnar Thalin. If you have any video that needs to be "unshaken" I strongly suggest you have a look.

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

“The cable companies have figured out the great truth of America,” he noted. “If you want to do something evil, put it inside something boring. Apple could put the entire text of ‘Mein Kampf’ inside the iTunes user agreement and you’d just go ‘Agree.’” - John Oliver on Net Neutrality (Last Week Tonight)

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

I do, however, agree that Microsoft's implementation of libraries is lacking. For example, I can only include so may folders at the root of a library. Another problem is the lack of a command line tool to do library maintenance. For example, I keep all of my pictures under D:\My Documents\My Pictures. Inside the My Pictures folder I have other folders with names like 1981, 1982, and various other specialized folders. I don't see the point of having a library named Pictures and having to add only My Pictures so I get

Libraries
    Pictures
        My Pictures
            1981
            1982
            .
            .
            .

I should just be able to add the folders under My Pictures directly either by selecting all the folders in Explorer and selecting "Add To Library -> Pictures" or by running a command from the command line to do the same. Incidentally, if Libraries were implemented using junctions or reparse points or links (why can't Microsoft just use the same terminology the rest of the world uses) then this would be possible. Unfortunately, libraries do not use links. Libraries are maintained as XML files

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

Imagine the noise just from mowing your lawn.

ddanbe commented: You made my day! Could not stop laughing for about5 minutes! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm not disagreeing with you. I'm just trying to see it from the interviewer's point of view. When I took my degree there was a HUGE emphasis on math and number theory. I always had difficulty vomiting up proofs and such at exam time. In real life, most people would just look up a formula when needed. As for writing code on an exam, in real life you use code snippets and debug. Nobody expects perfect code off the top of your head in a two hour exam. I think it's more important to know where to find things when needed and to be able to learn new stuff quickly.

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

I've been using Virtual Clone Drive for years. It works great, is free, and does not install any crapware.

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

There have been 1700 cases of ebola confirmed since February and the world is in a panic (according to or because of the media). Forgotten in all this is that over 300,000 people have died from malaria and over 600,000 from tuberculosis in that same period.

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

Dalmatians are the only breed of dog that gets gout (because they are the only mammals, other than humans, which produce uric acid).

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

Check with your IT department before you download and install ANY software.

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

Why does a political party want that?

The primary goal of a party, once it acquires power, it to retain power.

do you think political parties knowingly support irrational, factually incorrect positions/policies?

Yes, I do. Republicans believe (or claim to believe) that

  1. more guns = safer
  2. pay-or-die medical care is better for all
  3. climate change is not real
  4. tax cuts for the rich = prosperity for all
  5. rape doesn't result result in pregnancy because the female body can "shut that down".

Marco Rubio says there are no poor people, just people who are not yet rich. Republicans have made an art of convincing people to vote against their best interests (just look at the mess they have made of Kansas). People who do not have a pot to piss in are voting for the party that will, as their first order of business, cut the benefits that these people rely on to survive. They've already cut billions from SNAP while increasing subsidies to agri-business. Mitt Romney in his famous comment referred to these people as takers.

In addition, a huge number of politicians trained a lawyers, that training is all about arguing using reason and thinking through legal implications using logic.

The law isn't about truth or justice. The law is about winning.

I refuse to believe politician enjoy or desire having to lie about what their personal position is on a subject or pretending to be someone they are not just …

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

I mean seriously, what does the government get out of turning people into thoughtless lazy sheep?

Any party that can do that can get the sheep to vote with their emothions rather than their reason. The party that can do that gets to grab the power. Let's have this discussion again after the midterm elections.

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

If you use a Dictionary (also known as an associative array) you can do the following:

Dim cars As New Dictionary(Of String, Integer)

For Each item As String In {"Opel,5", "BMW,7", "Renault,12", "Opel,3", "Renault,6"}

    Dim flds() As String = item.Split(",")
    Dim car As String = flds(0)
    Dim num As Integer = CInt(flds(1))

    'If the car is already in the dictionary then add the new number
    'to the total, otherwise add the new car name and number.

    If cars.ContainsKey(car) Then
        cars(car) += num
    Else
        cars.Add(car, num)
    End If

Next

'Populate the listview with the unique car data

For Each car As String In cars.Keys
    lvwCars.Items.Add(New ListViewItem({car, cars(car)}))
Next

Just replace the For line to read from a file instead of a string. If you need to persist the values in the dictionary then move it to the class level.

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

Only when a mosquito alights on your testicles do you realize that violence is not necessarily the solution to every problem. - Lao Tsu

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

That's why we have to rely on experts and consensus. The trouble is that the public does not consider

  1. weight and vested interest
  2. the difference between debate and informed debate
  3. the difference between facts and opinions
  4. the difference between probability and possibility
  5. the difference between hypothesis and theory

Whenever we are presented with a debate between the "pro" side and "con" side of an issue we are mistakenly led into the conclusion that each side has equal weight. When 97% of scientists (who have the expertise to have an opinion) say that climate change is real and has a large human component, and 3% (who are typically funded by those industries who would financially benefit by that denial) say it is not, a proper debate (as pointed out by John Oliver) would have one denier faced by thirty-two non-deniers. The tobacco industry for decades denied any link between smoking and lung cancer and provided studies done by their own scientists to prove their claim.

How many times in recent memory have you heard a public official, when talking about climate change, start with "I'm not a scientist, but..." My response would be "This is a scientific debate so sit down and shut up.". A recent debate on a scientific topic (evolution) was held between Bill Nye (who knows a lot about science) and Ken Ham (who apparently knows nothing).

Any statement that is backed up by data is a fact. Anything else is an opinion. Saying "it is a …

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

A can of albacore tuna has 700 times the mercury that is present in one compact fluorescent bulb. If you break an old mercury thermometer you are releasing 6000 times as much as one bulb.

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

The thing to keep in mind is that the computer belongs to your employer, not to you, so they have the right to monitor your activity. While something like a key logger may be too big-brotherish, logging what web sites you go to is not unreasonable. My former employer took the approach of just blocking certain web sites and unblocking them only if a reasonable request was made to do so.

If your employer is doing the monitoring this cannot be considered an attack. Disassembling your work computer would likely be a violation of company policy and, if you are a unionized shop, would also likely violate union rules unless you were a hardware technician.

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

use PowerShell instead

You'd think that with all the added power of PowerShell I'd finally be able to use ctrl-c and ctrl-v for copy and paste like every other dog damned program but nooooooooooooooo. I still have to go through the menu.

But I'm not bitter.

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

In one case you will get notified only for articles that you explicitly request to Watch. If you select the Auto option then by posting in a thread you have (implicitly) selected Watch. With the non-auto option you can Watch a thread without posting in it.

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

It's so simple. All the media has to do is use the "HOLY SHIT LOOK OVER THERE!!!" approach and people panic and do what they're told.

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

New York will spend 735 million dollars to settle lawsuits over police abuse this year. Source

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

I buried a toothpick in the bone of my heel once. It was stuck standing up in the carpet. Also, one time I drove a splinter a quarter of an inch under a fingernail.

<M/> commented: Ouch +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
Stuugie commented: I heard this yesterday, excellent song and great message in my opinion! +0
diafol commented: Hilarious - well found +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The majority of US presidents have been Republicans.

Keep in mind that today's Republicans would probably denounce any Republican president before 1960 as a commie traitor.

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

The most challenging programs are typically the ones that you learn the most by doing.

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

Apologies if that led you down the road, not intentional.

If I can read it one of two ways it will usually be the other way.

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

Had one almost constantly since around 1980. I shave it off every ten years or so when I want a good laugh (or cry). This one is from just before I retired.

9d95f7be5c9c6509b8fb3874e672146b

<M/> commented: You look nothing like your avatar, in a good way +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

The only underground nuclear waste storage facility in the US was shut down in February 2014 when the isolation technology failed. Since then the site in New Mexico has been releasing potentially lethal levels of Plutonium, Americium and other radioactive elements into the environment. The site, designed to safely store waste for 10,000 years lasted barely 15 years before failing.

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

I think java is too complex a language to be used for teaching programming. Too much time is spent on learning the language rather than learning the concepts. Once you understand programming then you can move on to java, c, etc. My first guitar teacher said that it is important to get the student playing something as soon as possible. If he started all his students with 6 weeks of music theory most students would quit before getting to the fun stuff. I think that by getting people programming things quickly they learn that programming can be fun.

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

How about

For Each tbx As TextBox In Me.Controls.OfType(Of TextBox)()
    If Not tbx.ReadOnly Then
        tbx.Text = ""
    End If
Next
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Experiments suggest that time is an emergent property of the universe that is not observable from the outside.

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

Password entropy is usually calculated by log2(x) where x is the number of characters in the pool. For example, a password of length 8 using only upper and lower case characters would be

log2(52) * 8 = 45.6

The higher the entropy the better. However, even this number can be misleading. For example, the password "existentialism" has an entropy of 53.3 but is easily cracked in seconds using a dictionary attack. A good password should be

  1. easy to remember
  2. difficult to crack

If your password is a non-short phrase that includes upper and lower case characters and punctuation then it should satisfy both requirements. For example, the phrase

"Open the pod bay doors, Hal."

would have an entropy of roughly 162. I would change the code to calculate the entropy but also require at least

  1. one upper case character
  2. one lower case character
  3. one special character

If you include a digit then the example password could be

2001:Open the pod bay dooors, Hal.

which has an entropy of almost 200 and is still easily remembered.

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

You must have really aced that speed reading course.

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

Why not just use the free version if vb.net? You can create a form and drop all the controls on it. You don't have to write any code to create a mock-up of the GUI.

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

Whereas Uni/Collge teachers are often independent researchers

Unfortunately there is a growing number of university professors who are making below poverty level wages and MOOCs are not helping. More and more of the university budget is going to administration rather than teaching staff.

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

I used the same technique as everything else. Practice. The only way to get good at something is to keep doing it. I also had some excellent instructors along the way (and a few really bad ones).

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

Try

For r As Integer = dgvMyGrid.Rows.Count - 1 To 0 Step -1

    Dim empty As Boolean = True

    For Each cell As DataGridViewCell In dgvMyGrid.Rows(r).Cells
        If Not IsNothing(cell.Value) Then
            empty = False
            Exit For
        End If
    Next

    If empty Then dgvMyGrid.Rows.RemoveAt(r)

Next

You want to delete from the bottom to the top because if you delete from the top first then you end up changing the number of rows while the loop is executing.

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

Sounds like homework questions to me. Try here.

iConqueror commented: cheers +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
  1. Since I was 18 in 1972 at University
  2. Visual Basic since I retired in '08 because it is relatively straightforward but I've always had a thing for APL. Most of my programming over all has been in FORTRAN.
  3. Not really, but programming wasn't as complex back then.
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Perhaps something like this

'This assumes that only valid selections appear in cboSearchType

Dim sql As String = "SELECT * FROM BusinessInfo WHERE "

Select Case cboSearchType.Text

    Case "Accredited Month"
        sql = sql & AccreditationDate " & " like '" & cboMonths.Text & "%'" 
    Case "Accredited Year"
        sql = sql & AccreditationDate " & " like '" & txtSEARCH.Text & "%'" 
    Case "Applicant Name"
        sql = sql & ApplicantName " & " like '" & txtSEARCH.Text & "%'" 
    Case "Business Name"
        sql = sql & BusinessName " & " like '" & txtSEARCH.Text & "%'"  

End Select

With grdSearchResults

    .Rows = .Rows - .Rows + 1

    If rs.State = 1 Then rs.Close()
    rs.Open sql, con

    While rs.EOF = False
        .Redraw = False
        .Rows = .Rows + 1
        .Row = .Rows - 1
        .Col = 1: .Text = grdSearchResults.Rows - 1
        .Col = 2: .Text = rs!BusinessName
        .Col = 3: .Text = rs!ApplicantType
        .Col = 4: .Text = rs!ApplicantName
        .Col = 5: .Text = rs!BusinessAddress
        .Col = 6: .Text = rs!AccreditationDate
        .Redraw = True
        rs.MoveNext
    Wend

End With

Although I should point out that you might not want to keep the connection open. The preferred method is to keep connections open only as long as they are immediately needed. In that case you should do something like

If con.State <> 1 Then con.Open()

rs.Open sql, con

'the loop goes here

rs.Close()
con.Close()
Stuugie commented: Just because the OP should have, nice work. +5
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

That answer would have been more helpful if you had included the number.

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

Interesting how the Stalin's Apology that was linked to contains a reference to Thalidomide which wasn't developed until a year after his death and for which the teratogenic effects weren't discovered until much later. That does not refute the point being made but it should at least be accurate.

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

At least five Americans have accidentally shot off their own penises since 2010. source

RikTelner commented: At least you know it's there. It was* +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Small correction then. Add a ByRef to

Private Sub getDaysOut(ByRef intDays As Integer)

so that the entered value of intDays is returned to the calling code. I have to say, though, that by insisting you use a Sub rather than a Function, your instructor is teaching you bad habits.