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

At best, it's nothing more than a placebo.

And at worst it can prevent people from choosing legitimate and possibly life-saving treatment. Also, it takes valuable public health dollars out of the system. Correct me if I am wrong but I believe homeopathy has been officially endorsed by Prince Charles and that some public health money in Great Britain goes toward homeopathy.

I highly recommend the book Trick or Treatment - Alternative Medicine on Trial by Professor Edzard Ernst and Dr. Simon Singh. The books draws heavily on studies by The Cochrane Collaboration. From their website

Cochrane is a global independent network of health practitioners, researchers, patient advocates and others, responding to the challenge of making the vast amounts of evidence generated through research useful for informing decisions about health. We are a not-for-profit organisation with collaborators from over 120 countries working together to produce credible, accessible health information that is free from commercial sponsorship and other conflicts of interest.

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

The above code is incorrect. It will work if you are using SqlDB but for OleDb you must use "?" in the prototype query.

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

For the following example create a new project with two forms named form1 and form2. Form1 has a button and two textboxes with the default names. Form2 has a DataGridView with the given name.

Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

        Dim row As New DataGridViewRow()

        row.Cells.AddRange({New DataGridViewTextBoxCell(), New DataGridViewTextBoxCell()})
        row.Cells(0).Value = TextBox1.Text
        row.Cells(1).Value = TextBox2.Text
        Form2.DataGridView1.Rows.Add(row)

    End Sub

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

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

There's always ReactOS

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

You'll have to explain that a bit better. I don't understand what you are asking.

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

I can't think of anything. Based on that first screen cap I can't see why startPosY has the value 200 rather than 0.

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

Who wants to be seen by clients discussing grey hat matters on bing?

For that matter, who wants to be seen on Bing?

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

I honestly lie in bed. :)

There are so many ways to respond to this, mostly with references to measurement, but I won't get specific ;-P

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

google how to create a windows service in vb.net

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

Can you show the code and the values at various stages so we can try it for ourselves?

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

No. What exactlyshould I be seeing and where?

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

here's a little javascript popup animation each time you click on a page as well.

If there is then I certainily haven't seen it.

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

Once again I missed a chat. At 16:27 I noticed Chat (1) at the bottom of the screen. When I checked the shoutbox I saw that Learner10 had posted more then three hours earlier. Could it at least be an option in the profile to enable a popup if a Chat post is made when the shoutbox is closed? If not a popup then something more obvious than Chat (1)? I know it goes against "everything you learned about UI design" but I am reminded of an episode of The Simpsons where Bart pretends to fall down a well (using a walkie-talkie). In the end, Willy "fixes" the problem by putting up a small sign saying "caution well" 100 feet from the well. A notification that does not catch the eye is of no use to anyone and that goes against everything I ever learned about notifications.

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

A security audit of the free and Open Source encryption utility, TrueCrypt

"found no evidence of backdoors or otherwise intentionally malicious code in the assessed areas," and that the found vulnerabilities "all appear to be unintentional, introduced as the result of bugs rather than malice."

A summary of the results can be found here.

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

Correct. In English, you "lay" something, such as linoleum or carpet, or you lay yourself down. Although he could correctly have written "lay yourself across my big brass bed". It doesn't scan as well, though.

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

I still recall Bill Cosby saying "if you like the old Coke then you will like the new Coke even better". Of course, they had a reason for the change. They changed the ingredients to make it cheaper to manufacture. Of course, this translated to (they were hoping) bigger profits rather than a price reduction. See what happens when you take something that people like and completely fuck it up for all the wrong reasons? The marketplace responded and New Coke was quickly buried.

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

I wonder how that policy will work out for corporate users? Our IT department had to review every single update before it was distributed to the corporate machines. That seems to be the definition of "manual update". And does this mean I will have to manually uninstall Bing after every automatic update? I've tried hiding it but Microsoft ensures that with the release of every batch of patches there is a slightly newer version of Bing (which causes it to be unhidden).

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

If you use BigInteger as in

Private Sub FibWrite()

    Dim sw As New System.IO.StreamWriter("d:\temp\fib.txt")

    Dim n0 As BigInteger = 0
    Dim n1 As BigInteger = 1

    Try
        For i = 1 To 1000
            Dim iTemp As BigInteger = n1
            n1 = n1 + n0
            n0 = iTemp
            sw.WriteLine(n1)
        Next
    Catch ex As Exception
        Debug.WriteLine(ex.Message)
        sw.Close()
    End Try

    sw.Close()

End Sub

The 1000th number in the sequence is

70330367711422815821835254877183549770181269836358732742604905087154537118196933579742249494562611733487750449241765991088186363265450223647106012053374121273867339111198139373125598767690091902245245323403501

And the 10000th number is

54438373113565281338734260993750380135389184554695967026247715841208582865622349017083051547938960541173822675978026317384359584751116241439174702642959169925586334117906063048089793531476108466259072759367899150677960088306597966641965824937721800381441158841042480997984696487375337180028163763317781927941101369262750979509800713596718023814710669912644214775254478587674568963808002962265133111359929762726679441400101575800043510777465935805362502461707918059226414679005690752321895868142367849593880756423483754386342639635970733756260098962462668746112041739819404875062443709868654315626847186195620146126642232711815040367018825205314845875817193533529827837800351902529239517836689467661917953884712441028463935449484614450778762529520961887597272889220768537396475869543159172434537193611263743926337313005896167248051737986306368115003088396749587102619524631352447499505204198305187168321623283859794627245919771454628218399695789223798912199431775469705216131081096559950638297261253848242007897109054754028438149611930465061866170122983288964352733750792786069444761853525144421077928045979904561298129423809156055033032338919609162236698759922782923191896688017718575555520994653320128446502371153715141749290913104897203455577507196645425232862022019506091483585223882711016708433051169942115775151255510251655931888164048344129557038825477521111577395780115868397072602565614824956460538700280331311861485399805397031555727529693399586079850381581446276433858828529535803424850845426446471681531001533180479567436396815653326152509571127480411928196022148849148284389124178520174507305538928717857923509417743383331506898239354421988805429332440371194867215543576548565499134519271098919802665184564927827827212957649240235507595558205647569365394873317659000206373126570643509709482649710038733517477713403319028105575667931789470024118803094604034362953471997461392274791549730356412633074230824051999996101549784667340458326852960388301120765629245998136251652347093963049734046445106365304163630823669242257761468288461791843224793434406079917883360676846711185597501
Begginnerdev commented: Very nice :D +9
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I liked the moonshine analogy. It reminds me of what happened with "New Coke". Anyone else remember that?

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

I was thinking 11 and 45. I didn't know there were so many other examples (not counting slang).

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

Technically correct. You know, I kind of figured someone would do a literal interpretation of that question ;-)

Further clue, one word has 6 letters and the other has 8.

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

What .net framework are you running. I think you need at least 4.0 (possibly 4.5)

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

This thread has quieted down so I'll add a word puzzle. Who can name two English words that are their own opposite, that is, two words which each have two opposing definitions?

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

In my pre-retirement job, mistakes were tolerated (everyone makes one from time to time) but it was a given that if a mistake was made that it would be corrected. My calling Microsoft's decision boneheaded is not intolerance. It's an opinion. And judging from Microsoft's reaction, it is an opinion that is widely shared. Microsoft took a big hit to their credibility with Vista and they responded with Windows 7. Presumably Windows 9 will be to Windows 8.x what Windows 7 was to Vista.

Yes, Win95 was worse but if you consider the evolution from DOS, then Windows 3.x, successive versions of Windows have tried to improve on previous versions with a few stumbles along the way.

But WinMe was just crap.

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

Can you give us an example of how

LP31389-7.LP18116-1.LP16832-5.LP175708,7,LP175708,LP181867-5,"2,3',4,4',5-Pentachlorobiphenyl (PCB) | Bld-Ser-Plas"

should look after it is split up into separate fields?

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

"It may be tempting to keep your head down and plod along... but that's a quitter's way out." - Sarah Palin

I love this one simply for the complete disconnect from reality that is her trademark.

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

There are certain things in English that are traditionally referred to as "she". Ships, for example.

@ddanbe - I am two generations removed from Dutch. My dad's parents both came to Canada from the Netherlands in the 1890s. My dad retained a few words of the language but none of it made it down to me.

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

I don't know. Somehow, "Give someone a ticket for texting and its life could be saved." just sounds wrong. In the example of "Give a dog a rabies shot and its life could be saved." Seems perfectly reasonable but not "Give a person a smallpox vaccination and its life could be saved."

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

I did a palm-to-forehead when I read that as well.

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

Speaking of the commend shell, why is it I still have to use context menus to copy/paste when just about every other app uses CTRL-C and CTRL-V?

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

Once again, I know the Metro screen can be disabled. The point is that Micosoft originally tried to force the Metro screen as the default and I believe that this was a boneheaded decision which they have been steadily retreating from. We'll see how much when Windows 9 is released.

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

they likely also wanted something new and shiny to justify selling a new OS

I definitely agree. Ooooh. Shiny. Must have.

Supporting tablets is worthwhile but forcing a touch-based interface (Metro) on laptop/desktop users was a big whoops. My former place of work has a few thousand computers and I can see the Metro interface being useful for only a very few employees.

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

Because people not wanting to learn new things

My argument was not that I am unwilling to learn new things. My argument is that there should be a compelling reason for having to learn a new interface. If the reason is "we changed the interface because we could" then that is not a compelling reason. That's just change for the sake of change and is a pain in the a$$ for corporations who must now provide training for all employees and suffer a decrease in productivity during the learning curve. If the reason is "the new interface is easier to use and is more efficient" then I'd like to know how that might have been determined. You'd have had to do studies with people using the new interface in order to prove this, and you'd have to already have developed the new interface in order to to the studies in which case this is an after-the-fact argument which is trying to justify a possibly bad decision.

And I feel that the improvements under the hood justify that learning curve

Why couldn't they have made the improvements under the hood and left the interface alone? Because only people really concerned with performance would have bothered with the upgrade.

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

You could store each player's cards in an array and assign the ListBox DataSource as needed. Here is an example:

Public Class Form1

    Private list1() As String
    Private list2() As String

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

        list1 = {"a", "b", "c", "d", "e"}
        list2 = {"f", "g", "h", "i", "j"}

    End Sub

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        ListBox1.DataSource = list1
    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
        ListBox1.DataSource = list2
    End Sub

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

I suggest you use regular expressions. I can give you an example but first I would have to know the range of values that you will be replacing. For example, will the value in quotes always be three digits? Does the string

l="600"

always appear on its own line or can it occur within a line as in

Some text l="600" some other text
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Assuming that you are replacing the text in the file with the new text, I would do the following

Dim text As New System.Text.StringBuilder

text.Append("1st line of text" & vbCrLf)
text.Append("2nd line of text" & vbCrLf)
text.Append("3rd line of text" & vbCrLf)
.
.
.    
System.IO.File.WriteAllText(filename,text.ToString())

Depending on how many lines you have, repeated concatenation as in your code can get noticibly slow. StringBuilder is much more efficient. Try the following and see for yourself.

Dim text As String = ""

For i As Integer = 1 To 1000
    text &= "this is line " & i & vbCrLf
Next

and compare it to

Dim text As New System.Text.StringBuilder

For i As Integer = 1 To 1000
    text.Append("this is line " & i & vbCrLf)
Next
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And we're back to the real debate. Is the Windows 8/8.1 interface significantly better than Windows 7 or is it just different? If it is that much better then that's just fine, but if not then it is just change for the sake of change and that is not fine and M$ could have made the "under the hood" changes and left the interface alone. But then who would shell out the bucks to upgrade for changes that are not visible?

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

much more flexible

Flexible, yes, but just try to correct a typo mid-program ;-P

People talk about the plaintive cry of a a loon or a lone wolf baying at the moon. If you want to hear a sad sound, it's the sound of someone who has dropped a 600 card deck of unsequenced cards the day that his assignment is due. Chilling.

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

And because "their" is plural you would have to say "their lives" if you were referring to more than one person. It seems to be more common (but still incorrect) these days to use "their" as singular to avoid the awkward "his/her" construct when the gender of the object is indeterminate.

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

Perhaps he thinks it should be ""Giving someone a ticket for texting could save his or her life".

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

How about just putting the delete code in a Try-Catch block and seeing what error occurs if the table does not exist? That will tell you what error to ignore.

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

Loved Jack Benny. And let's not forget about Red Skelton. I have fond memories of that show. As I understand it, he was exactly as nice in real life as he was on the show. He was not only a comedian and actor but a painter, writer and prolific composer who composed over 8000 songs and symphonies.

I like shows like Justified and Damages because each season has/had one story to tell. You could see the story progressing each episode. The creators could extend the show for another season as long as they had a story to tell completely within that one season.

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

This isn't about any particular TV show but at a concept - and this is aimed primarily at American TV (and I'll explain why in a moment). There is a certain subset of TV shows that rely on a particular mystery or goal to keep an audience (I believe this is referred to as the High Concept). The audience gets hooked on a promise that the mystery will at some point be revealed, or the goal will be achieved. However, no matter how high the quality of the writing, once the mystery is revealed or the goal achieved the show no longer has a reason to continue, even though it unfortunately does.

Quite often the cost of producing a show is greater than the selling price to the networks. The big money is earned when the producer sells the show into syndication (reruns). The show can be sold in packages to local stations again and again. You can only imagine, for example, how much money Paramount has made off the original Star Trek series. Generally speaking, the minimum number of episodes required for packaging is 100.

You can see how this can be a big problem for American TV producers who must somehow manage to keep the show running for that minimum number.

Lost

In spite of promises in the first two seasons that "all your questions will be answered", they never were. I bailed on this show several episodes into the second season.

Revenge

Guilty pleasure here. I enjoyed …

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

You are referencing the checkboxes as generic controls and the generic control does not have a Checked property. Try referencing as Checkboxes as

For Each cbx As CheckBox In Me.Controls.OfType(Of CheckBox)()
    cbx.Checked = True
Next

As you pointed out this only looks at controls that are directly in the form. If the controls are in another containing control such as a GroupBox then this won't work. You'd have to rewrite as

For Each gbx As Groupbox In Me.Controls.OfType(Of GroupBox)()
    For Each cbx As CheckBox In gbx.Controls.OfType(Of CheckBox)()
        cbx.Checked = True
    Next
Next

That will handle all CheckBoxes in all GroupBoxes. You can just do a specific GroupBox by

For Each cbx As CheckBox In GroupBox1.Controls.OfType(Of CheckBox)()
    cbx.Checked = True
Next
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

When you learn to play a musical instrument there is a reason that music theory is not taught until the basic playing skills have been acquired. As Mike says, it is important to keep the interest up and that means getting the student to write something quickly. It doesn't have to be anything fancy. It only has to give the student a feeling of accomplishment. When I was in university we didn't learn assembler until second year. By that point we'd learned that anything complex requires time to accomplish and we'd developed the patience and the skills to craft a program with care and forethought.

I would, however, take some time at the start to teach how to break up a problem into smaller problems. This can be done in one or two lessons and does not have to involve writing any code. One of my favourites is to get the student to write down the steps required to tie shoelaces.

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

What I would like to see out of Microsoft is some centralized planning. Back in the days of the Amiga, the entire OS was designed from the ground up as a hierarchy of objects. There was little, if any duplication. Every system function was well documented (I think I still have the manuals somewhere) and made publicly available to all. As a result, applications could make use of a robust software architecture.

Microsoft, on the other hand, is run as a collection of "empires". When some functionality was needed, each group (either because of lack of communication or central planning, or the mindset that "we can make a superior module") rolled their own. The result was massive code bloat. The entire Amiga OS (graphical interface, full multitasking, multiprocessing and messaging) fit on one 720K floppy.

And let's not forget the many instances of undocumented system calls that were kept secret (for the most part) to give Microsoft apps that little edge in performance and features.

Tcll commented: so there lies the start of MS shoving their heads up their A's +2
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Kill XP game.

Tcll commented: -(1+(every user who plays this game)) +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How about people who say "I could care less" when they mean "I couldn't care less"?

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

Try

Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        Me.Text = GenerateKey(4, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
    End Sub

    Private Function GenerateKey(nchars As Integer, fromStr As String) As String

        Dim rnd As New Random()
        Dim key As String = ""

        Do While key.Length < nchars
            key &= fromStr.Substring(rnd.Next(0, fromStr.Length), 1)
        Loop

        Return key

    End Function

End Class

The Function, GenerateKey will generate a random string of the requested length from the given string. The segment

rnd.Next(0, fromStr.Length)

generates an index for selecting a random character from the string. If you want a different source string you can use

Const FROMSTR = "ABCDEFGHIJKMLMOPQRSTUVWXYZ" &
                "abcdefghijklmnopqrstuvwxyz" &
                "0123456789"

Dim key As String = GenerateKey(4, FROMSTR)
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Try

qry2 = "SELECT * FROM [per_diem_accomodation]  " &
       " WHERE [project number]  = '" & projcode & "'" &
       "   AND [employee number] = '" & empcode  & "'" & 
       "   AND [current month]   =  " &
       "       (SELECT MAX([current month])    " &
       "          FROM [per_diem_accomodation] " &
       "         WHERE [project number]  = '" & projcode & "'" &
       "           AND [employee number] = '" & empcode  & "')"

You left out the square brackets inside the MAX statement. I find that creatinig column names with embedded blanks is usually a bad idea. I finid it easier to debug SQL statements when they are formatted as above across several lines. Ii find them even easier to debug when using parameterized queries.