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

How does your thread title in any way relate to your question?

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

Can you please be more specific? Perhaps someone here can help if there is a particular area you are having trouble with but don't expect anyone to write you a tutorial. There are very likely tutorials available if you take the time to try google.

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

Also, I could easily copy the old one into the clipboard then press CTRL-WIN-I to run my program which would look it up and give me the geo-location. Now I have to memorize and type.

Yeah. I know. Bith bitch bitch ^_^

rproffitt commented: If spam was higher such as shills and such, the spambot report is nice but a report on duplicate IPs in recent posts would be GOLD. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I'm going to amend my previous comment to "how long does it take to walk to Miami". The answer, of course, depends heavily on your starting point. For someone who has no programming experience, learning C++ will take much longer than someone who has been programming for years in another language. The closer that language is to C++ the easier the learning curve.

rproffitt commented: "How long?" doesn't have to be measured by the clock or calendar. For some it's many moons. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think you should have a look at regular expressions. If you use the pattern \b[a-zA-Z']+\b it will return a Matches collection where each match is one word. You can loop over the matches collection and increment your coounter for eachc match that has a length > 6. The pattern breaks down as

\b              word boundary
[a-zA-Z']+      any string of lower/upper case letters or an apostrophe
\b              word boundary

While the pattern is not perfect you can start frm there and tailor it to your current word matching algorithm.

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

My geo-location was being displayed as Cambridge (I returned from there on Monday) so I told daniweb to update, which it did, except it now reported me as Winnipeg, Manitoba - 3,897 miles away. What am I 3,897 miles away from? Then, when I click on Member Connect it says (for example) that I am 46 miles away from aravindc (London, England) so I'm assuming that even though I did the update, part of daniweb still thinks I am in jolly old.

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

It does clean things up.

BTW, I clicked on your twitter link and scrolled through to your post about Apple being the first $1T company. If you convert to today's $$$, the Dutch East India Company was actually first. And I strongly suspect the Hudson Bay Company (at its peak) was likely ballpark as well.

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

Now that Microsoft has "fixed" the problems with the file deletion (oopsie), it seems the there are situations where the new and improved update can destroy zip files. Microsoft reminds me of these guys.

rproffitt commented: I just learned of that yesterday. Thanks for adding this. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I should point out that when I installed Windows 10 I relocated all my user folders to D: so that restoring an image of C: would not result in loss of data.

rproffitt commented: And then MSFT might have issues updates that delete files under those conditions. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Aaarrgh. I posted my reply to the wrong message. Serves me right for doing this at 6:00 am.

OK. I recommend using the free version of Macrium Reflect. In order to do a differential image you must first do a full image otherwise you won't have an image to compare for differences. To take a full image you select the "disk image" tab in the left pane. Then select omly the partition you want to image in the right pane. Then (there is a drop-down menu at the far left (it says "Actions...") where you can select "image this partition only". Specify a folder to store the image and, optionally, a more descriptive file name. Click on "Next". On the next screen you can select "Full" or "Differential". Incremental is only available in the paid version. Select "Full" the first time then click "Next". On the next screen you can deselect "Save backup..." to not create a batch file and click OK to just run the job once.

To create a differential, use the same folder abd select "Differential". It will create a much smaller image that will contain only the differences since the full image was taken.

I've been using Macrium Reflect for a few years to take automatic daily images and never had a problem.

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

I'm a little confused. In a PM you asked about doing a differential image. I assumed you were talking about a disk image. For that you would need disk imaging software such as Macrium Reflect or Acronis. I can only help you with Macrium Reflect as I have been using that exclusively to take automatic daily differentials plus a start-of-month full.

DaniWeb4Jim commented: Just saw this. +4
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I installed it on Oct 3 but because I automatically take a differential image every morning I was able to roll it back out.

rproffitt commented: No one I know lost a file. My bet is some edge case. But all cases are now edge cases. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I tried to move it, but couldn't find that option.

I'd vote for that option. If only there was a way to do that securely (cleverly putting us back on topic).

rproffitt commented: "I saw what you did there." +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It's supposed to restart automatically. In fact, I did the update myself a couple of days ago and it restarted automatically several times during the update process. If this isn't what you are referring to then please provide more details.

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

My personal preference would be to use a global (and document it well). It's the most straightforward and simplest way. Creating a class for a simple counter or throwing pointers around helter-skelter just muddies things up. If you wanbt an analogy, purists say that you should never ever use a goto or have multiple returns in a sub, however, sometimes using a goto or a multiple return can be the clearest way to program something, to wit (forgive the vb syntax, my C is a little rusty)

Private Sub MySub(parameter list)

    if some conbdition then exit sub
    if some other condition then exit sub
    if some third condition then exit sub

    actual useful code

End Sub

You get the idea. Rather than have a bunch of nested ifs, just put all the "don'ts" at the top. This would likely cost you points on a class assignment but I think most maintenance programmers (I was one for 30 years) would thank you.

rproffitt commented: Code for money or grades it seems. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Funny thing. When I retired in 2008 I got a Dell Inspiron 1720 and was tickled with it (still am). The very few time I had to deal with Dell on warranty were both power related. I got excellent service. In fact, I even got a power supply replaced at the cottage which is about an hour west of Thunder Bay. The replacement was sent by Purolator within two days. Following that I recommended Dell to everyone. My younger son ended up with two (Alienware for gaming and a mini laptop for grunt stuff). Then a couple of years ago I bought a new Dell laptop and it was nothing but trouble. I have described that "adventure" in detail elsewhere in this forum. Because my older son, who had bought an Asus) said that Asus service was excellent, when my father-in-law (above) wanted a laptop we got him the K53E (my brother as well, for that matter). I neglected to consider that #1 son was in Long Island and dealt with Asus US whereas I would be dealing with Asus Canada. I'm hoping I won't need to buy another machine for quite some time.

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

Perhaps this is appropriate...

GravesInc19820824_2.jpg

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

ASUS Computers

I recently had dealings with Asus. The situation was regarding a malfunctioning keyboard. The computer is a several-year-old (no longer under warranty) Asus K53E laptop. It belongs to my father-in-law and because he is somewhat careless with food (he is 91 so this is understandable), something eventually got under one of his CTRL keys causing it to stick closed. Naturally, this made the keyboard (and scroll wheel) useless.

At this point there were two possible solutions:

  1. Clean the keyboard
  2. Replace the keyboard

Before trying option 1 I wanted to see if I could actually purchase a replacement keyboard. I had done this for two Dell laptops so I did not expect any problem. I was able to start an online (text) chat session with an Asus tech (a service not offered by Dell Canada for some unknown reason). He informed me that

  1. They do not sell parts to the public
  2. They would charge me around $350 to do the repair themselves
  3. The service manual was not available to the public

Fortunately I was able to locate a youtube video that clearly showed how to remove the keyboard. I was able to clean and reinstall the keyboard myself resulting in a fully functional laptop.

Several days later I received an email from Asus not just with their apologies, but their "sincerest" apologies for my not being able to get parts. In their own words...

ASUS will not be held liable for any injuries or …

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

Does logging in to a system that requires no password count as "hacking"?

There was a case a while ago where two men discovered that they could manipulate a video poker machine by pressing buttons in a very specific sequence. They were charged with hacking when they won a pile of money but their lawyer successfully argued that they were legally entitled to press the buttons in any sequence they wanted.

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

We don't do homework.

Please read the Daniweb Posting Rules and Suggestions For Posting Questions.

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

There is such a thing as too much whitespace.

rproffitt commented: That comment could go horribly wrong in some forums. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Best macro app I've seen is AutoHotKey.

rproffitt commented: That's the one I use when I need this. But those gamers have to go hardware. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
  1. What is the result of echo $sql; (what is the actual sql query string)?
  2. Are you getting any error messages?
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I think this guy has made some excellent points in this article.

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

I've had a few of those. I learned that end-users can be very lazy when it comes to saying what they want so I would write up a spec and email it back with "is this what you want?" If they refused to commit then I would just work an anything else. It's frustrating to deal with "That's what I asked for but it's not what I want."

rproffitt commented: Been there, coded that, delivered, "Hey it works just like I asked but not what I wanted." +15
pty commented: This is exactly why as my career develops I lean more and more strongly on the Gherkin syntax +9
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Just a reminder - when you get the new system, take a complete disk image before doing anything and store it offline.

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

I agree that the OP worded it poorly but I think it was a per(f)ectly valid to assume that

string like"123-322-14365"

meant "three digits dash three digits dash five digits". When someone asks me if I have the correct time I generally don't just respond "yes" ^_^

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

We're not going to do your work for you because

  1. You haven't shown that you have put in any effort to do it yourself
  2. You picked a very rude thread title
  3. You didn't take the time to read the Daniweb Posting Rules
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

For another perspective see XKCD

rproffitt commented: "Blockchain" + claim = wear gloves, bury in desert? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You must...

I don't, actually.

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

Why we need paper printouts

As pointed out in the article, Georgia voting machines do not provide a paper record for validation.

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

Let's start at line 0. Because I don't know all languages I'm not going to make an assumption here so what programming language is this? And what line is giving the error?

It would also help if you posted in the appropriate forum.

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

The only way to learn programming is by doing it. There are a lot of books out there that claim to teach you X language in Y days. No book can do that. All a book like that can do is teach you the syntax. Language consists of syntax, grammer and idioms. There are design techniques that are common to most languages. Learning how to use every tool in a carpentry workshop will not teach you how to design and build a house so read books on software design. Practice makes perfect, but also, malpractice makes malperfect.

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

lists all files in the given folder that start with the letters pic and end with a .jpg extension

So why do you need more than dir pic*.jpg?

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

Welcome back.

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

What exctly do you mean by "easily verifiable"? Personally, I don't believe that blockchain is mature enough to be used as the basis for voting. Once all the hype dies down it might be worth a look.

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

BTW, Windows Defender updates alone are around 240 meg.

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

If you can play the audio stream in VLC there is a setting available from the menu

Audio
    Stereo Mode
        Mono
        Stereo
        Left
        Right
        Reverse Audio

Just select Mono

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

I think we can all agree (this will likely provoke disagreement) that a voting machine that records a vote electronically without a way to do a manual verification is a bad idea. How then should a proper voting machine work. My suggestion is to have a touch screen on which the voter makes his/her selections (invalid selections would not be allowed). The voter would

  1. Make selections on screen
  2. Print ballot
  3. Compare ballot to screen

Once the voter receives the printout he/she would then compare the printed ballot with the selections made on screen. At that point the voter would be required to press one of

  1. Accept this ballot as correct (this would reset the machine for the next voter) or
  2. Reject this ballot as invalid (this would lock the machine leaving the current selections visible)

Rejecting a ballot would require intervention from polling station officials from both parties. They would determine whether or not the ballot was correctly printed. If correctly printed then the machine would be unlocked/reset. If not correctly printed then the machine would be shut down.

In the event that the ballot was correctly printed, the voter would insert the ballot into a scanner to record/count the votes. The scanner would only be opened in the presence of officials from both parties.

Possible ways this could be rigged

The ballots could be printed in a human readable form (names and check boxes) plus machine readable fields (bar codes/QR codes) where the …

ernie.cordell commented: A cardpunch verification would also prevent hanging chads. In all my years, never saw a punch create a hanging chad. They're clear punches, anyway. +0
rproffitt commented: Discussing what needs discussing. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

It is virtually certain that you will be welcome here.

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

Take a full disk image of the computer (I recommend Macrium Reflect) then try the WIndows 10 upgrade. Microsoft keeps extending the deadline. For example, last December I upgraded two machines to Windows 10 long after the official deadline. There is a good chance that the upgrade will go through.

After the upgrade, I recommend wiping the machine and doing a clean install of Windows 10. During the upgrade your computer will be registered with Microsoft and will thus be recognized as valid when you reinstall from scratch. The reason I recommend this second step is that upgrading from one OS version to another always leaves crap around from the previous OS.

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

Supposed to be. But it's not a democracy. To wit - the GOP in North Carolina heavily gerrymandered the voting districts in order to pack as many black voters into as few districts as possible. This was ruled unconstitutional because you cannot redistrict based on race so they then claimed that the lines were not drawn by race but by party and supposedly that was not illegal (it is). The courts produced evidence of this. Apparently GOP officials had stated at the start of the redistricting that they wanted the lines drawn to guarantee 10 Republican seats and 2 Democrats. When asked why, they responded, "because we couldn't figure out how to guarantee 11 and 1". They have been ordered to redraw the lines before the November election. The GOP is naturally fighting to delay this until after the election.

In Georgia, one district (heavily GOP) in a recent election had a %216 voter turnout. The ruling party (GOP) found nothing amiss. You know, the GOP that is always shouting VOTER FRAUD whenever a Democrat gets elected.

Back in North Carolina, when a Democrat won the Gubernatorial race, the GOP house (with a super majority) stripped him of most of his powers. A state supreme court seat is currently up for grabs. When the last open seat went to a Democrat, the GOP ordered an elimination of primaries, assuming that with one Republican running, multiple Democrats would split the vote. When a second Republican registered to run, the GOP tried …

Agilemind commented: Many NGOs have found the USA to be much less democratic than most western countries. The US is really borderline "third world" these days. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

And now the delete recent posts tool is gone again.

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

What is this "log out" thing you are talking about. Sounds like heresy to me ^_^

rproffitt commented: I make no bones about this. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

11 months ago I posted

An episode of the 1950s western TV series 'Trackdown' featured a character named Walter Trump who claimed he would build a wall in order to protect a town from the end of the world.

In light of more recent examples of Trump-l'œil such as him claiming that he is our only hope and if he is removed from the presidency the economy will collapse, I give you this excerpt of dialog from "Trackdown - The End of the World"

Judge Clement: It's a funny thing. When we were kids we were all afraid of the dark. Then we grew up and weren't afraid anymore. But it's funny how a big lie can make us all kids again.
.
.
.
Walter Trump: I am the only one. Just me. I can build a wall around your homes that nothing can penetrate ... You ask me "how do you build that wall? You ask and I'm here to tell you.

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

At the top of the programming forum you will see (I hope)

All   New   Solved   Unanswered   More v

The More v will drop down if you click on it to reveal

News Stories
Product Reviews
Interviews
Tutorials
Code Snippets
JamesCherrill commented: OK. I was in a single topic sceen. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Make sure that your course selections include something to develop your communication skills. Being able to communicate clearly and concisely in both speaking and writing is invaluable.

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

Another tech advance that can be done right now.

For both TVs as well as computers (particularly laptops) - the ability to plug in headphones without muting the sound coming from the builtin speakers.

I am hearing impaired and my wife is not. I have a device (pendant) that can connect to my laptop via bluetooth or by cable so that the signal gets transmitted directly to my hearing aids. I want a softwate switch that would allow me to cable in without muting the speakers so that my wife and I could both listen to the audio. If we want to do that now I have to plug in a splitter with my cable in one output and exterior speakers in another.

GrimJack commented: Good point. I am trying to think about how it could be done since I believe that it is a physical switch (isn't it?) that disconnects speakers +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

How long does it take to walk from New York to Miami? It depends on how fast you walk and how determined you are to get there. How much you learn on the way depends on what you do on the journey.

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

Define "perfect". Or is this just a blatant plug post?