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

An example of concise - to create a deck of cards (each card consisting of a value and a suit) you can do

deck ← ⊂[1](52⍴'A23456789TJQK'),[0.5](13⍴'S'),(13⍴'H'),(13⍴'D'),(13⍴'C')

where (13⍴'S'),(13⍴'H'),(13⍴'D'),(13⍴'C') generates SSSSSSSSSSSSSHHHHHHHHHHHHHDDDDDDDDDDDDDCCCCCCCCCCCCC and 52⍴'A23456789TJQK' generates A23456789TJQKA23456789TJQKA23456789TJQKA23456789TJQK and ⊂[1] gives the result

AS  2S  3S  4S  5S  6S  7S  8S  9S  TS  JS  QS  KS  AH  2H  3H  4H  5H  6H  7H  8H  9H  TH  JH  QH  KH  AD  2D  3D  4D  5D  6D  7D  8D  9D  TD  JD  QD  KD  AC  2C  3C  4C  5C  6C  7C  8C  9C  TC  JC  QC  KC

Once you have deck you can shuffle it by deck ← deck[52?52] where 52?52 generates 52 unique random integers from 1-52.

Yes, you can produce obtuse code, but you can also easily produce very clear code that accomplishes a great deal in just a few keystrokes.

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

APL

Pro: Extremely powerful syntax and rich set of primitive operators (80 or more) designed for mathematical manipulation.
Con: The epitome of write-once, read-never coding.

You can implement Conway's game of Life in one line. Powerful and concise syntax but I've never seen a language that approaches APLs ability to produce unreadable code.

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

If the diagnostics don't show anything you might try sfc /scannow from an admin cmd session.

Scans the integrity of all protected system files and replaces incorrect versions with
correct Microsoft versions.

SFC [/SCANNOW] [/VERIFYONLY] [/SCANFILE=<file>] [/VERIFYFILE=<file>]
    [/OFFWINDIR=<offline windows directory> /OFFBOOTDIR=<offline boot directory> [/OFFLOGFILE=<log file path>]]

/SCANNOW        Scans integrity of all protected system files and repairs files with
                problems when possible.
/VERIFYONLY     Scans integrity of all protected system files. No repair operation is
                performed.
/SCANFILE       Scans integrity of the referenced file, repairs file if problems are
                identified. Specify full path <file>
/VERIFYFILE     Verifies the integrity of the file with full path <file>.  No repair
                operation is performed.
/OFFBOOTDIR     For offline repair, specify the location of the offline boot directory
/OFFWINDIR      For offline repair, specify the location of the offline windows directory
/OFFLOGFILE     For offline repair, optionally enable logging by specifying a log file path

e.g.

        sfc /SCANNOW
        sfc /VERIFYFILE=c:\windows\system32\kernel32.dll
        sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows
        sfc /SCANFILE=d:\windows\system32\kernel32.dll /OFFBOOTDIR=d:\ /OFFWINDIR=d:\windows /OFFLOGFILE=c:\log.txt
        sfc /VERIFYONLY
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I found a silly, but better way. A new member wanted his account deleted so I edited his request (without changing it) with the reason "You can delete your own account by going to your profile pages."

Of course it added the "This is an automated notification..." boilerplate but at least it avoided the "let's get acquainted" text. Sometimes you don't want to make a connection. Sometimes you just wanna send a message.

Before you reply "why didn't you just post that in the thread...", there is no guarantee that he would go to that thread and see it. With a PM he gets a popup the next time he goes to Daniweb.

rproffitt commented: That is much better. I too thought it weird how the new system ended up. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I see you tagged this with both vb.net and visual-basic-6. The syntax for MessageBox differs between the two versions. Google "message box" with the version you are using to get the correct syntax. Based on the syntax of the line

Private Sub CommandButton4_Click()

I'll assume you are using vb6 in which case the syntax is

MsgBox(Prompt, [Buttons as VbMsgBoxStyle], [Title], [HelpFile], [Context]))

and you can get away with

MsgBox("The form has been sent")
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Based on the little information you provided, your code does exactly what it says it does. Of course, that's likely not what you wanted it to do. Perhaps if you provided a little more information like:

  1. What is this code supposed to do
  2. What is it actually doing
  3. What error messages (if any) are you getting
  4. Does it compile

In case anyone (other than the OP) is inclined to respond "it's obvious what the code is supposed to do", that may be the case but the OP has not gone to much effort in seeking help. I certainly would not take my car to a mechanic and say "fix this" without describing the problem.

rproffitt commented: The old "the computer did what you told it to do" problem. +15
Ana Mae commented: Sorry for the little infos. The purpose of this code is for searching, editing, adding, deleting, displaying, saving and shuffling the variables in an +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You've posted code with almost no indication (other than the thread title) of what it does. If your program does something interesting then please explain what it does and how to run it. A code snippet is usually posted to educate. Without comments it doesn't do that.

rproffitt commented: I agree. Without comments or discussion this post has no pulse. "It's dead Jim" +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

If you aren't looking for a home-grown file finder, or if you don't need it integrated with other software, I suggest you have a look at the free Everything Indexer from voidtools. I gives you real-tme (vurtually) instant feedback on finding files and folders by name.

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

What part are you having trouble with?

Ilia_2 commented: I have problem with making Cell class and properties and queue too. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You are absolutely right. Correction noted for future reference.

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

Looks like homework to me. So far the only effort you have shown is copy/paste. Please read the Daniweb Posting Rules and Suggestions For Posting Questions.

sony007 commented: yes it is , but I dont want you to write a code because I know its i along code and a lot of work . I want if someone can tell me how yo start +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I can't help you if you won't give me a simple "here is the input" and "here is the output".

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

You didn't get one. If you had, you would have seen a pop-up overlaying the Daniweb page. I'm not overly sensitive myself, but I grew up in a different era when most right-thinking people didn't go out of their way looking for things to take offense at. Given that, if I were to get a message out of the blue telling me "Noli mentula", I might assume (if I were able to correctly translate the idiom) that I had inadvertantly offended someone. Barring a successful translation I think I'd just be puzzled.

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

Try using \"([^\"]*)\" as your regular expression. This will return matches on all double quoted strings. Using [^\"]* instead of .* ensures that each double quoted string is taken as a unit.

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

liberals will never convince fiscal conservatives that deficits are a good thing

Let's dispense with this myth right now. The idea of the "fiscal conservative" is a farce. Republicans are only concerned about the debt when Democrats are in power. When Republicans get the reins they are more than happy to cut taxes for the wealthy and for corporations, and increase spending for the military. Then when the debt balloons they say we can't afford Medicare, Social Security, food stamps, etc.

rproffitt commented: This is a way to end the programs you mentioned. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Datagrid is generated at run time, how to name and write codes for it

Like any other variable/object. You save the reference to it with the appropriate scope and use AddHandler to attach code to events.

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

To all in the last week or so who received a private message from me consisting only of the phrase, Noli Mentula, I sincerely apologize. In the previous incarnation of Daniweb, sending a private message was considerably different than in the new version. I had assumed that a message would not be sent unless/until I composed it, then clicked some equivalent of Send. You know. Like practically every other text messaging system ever invented. While trying to work through the new system with Dani I inadvertantly started conversations with several users.

To further explain noli mentula... It fall into the realm of fake latin phrases except this one is not quit as fake as some. It is an idiom which, in effect, translates as play nice. I consider it the most concise wording of the Golder Rule (do unto others...). In English it is commonly referred to as Wheaton's Law, after actor Wil Wheaton.

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

please, change your Introductory Message back to the default or something else that makes more sense.

Done, but again, in the interest of clarity, changing the header for that field from HeadLine to Introductory message might have avoided this problem entirely. You have to consider what the header will mean to someone going to the profile page for the first time. It may be clear to you, but you didn't design Daniweb/Dazah for you. You already know how everything works.

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

Because in latin it likely won't be recognized as that, and it is the simplest form I have come across of the golden rule. I also believe that it could easily replace all of the 10 commandments. Politically speaking it seems to me that for years when the GOP has made any policy decision it seems to be with the deciding principle of "what would a dick do?"

  1. environmental protection
  2. gun control
  3. consumer protection
  4. tax reform
  5. health care

It's a philosophy as well as a personal in joke. It's like any idiom in that doesn't translate exactly so if you don't get the reference you won't understand it. Like illigitimae non carborundum.

In hindsight, I'd like to soften "unacceptable" to "inconvenient".

rproffitt commented: Is that you, Al Gore? +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I was under the impression (based on the clear-as-mud procedure) that I would actually get to enter some text before sending a message. I don't care about what happens with typical members. As a mod I should easily be able to send a PM to any member. A common scenario would be to send a more detailed caution to a member who is close to crossing a line. I would want to do this

  1. where an action by that uses does not necessarily warrant an infraction
  2. where an in-thread chastising might cause undue embarrassment

So what we have now is a bunch of members who got "noli mentula" (latin for "don't be a dick") out of the blue from a mod (me) totally out of the blue and totally out of context with no reasonable way for me to assume that this had been done.

This is unacceptble.

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

It was confusing because "send a PM" was a simple process. with a clear verb-noun command that was done from the obvious place - the member page of the user I want to contact. The new process starts with a less specific, and therefore less obvious verb, "connect with". Combine that with a multi-step process that requires me to connect twice before getting to "continue chatting" (which is also confusing because I can't "continue" something that I haven't yet initiated) and I think you get the picture.

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

I understand your position. In the end I just rebuked vegaseat publicly without an infraction. It served two purposes. It reinforced the point that rproffitt was making and (I hope) reminded the OP and vegaseat TANSTAAFL.

It's a good thing I didn't archive the conversations I have had with Davey, you, rproffitt, etc.

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

@vegaseat - As a long standing member you should know better than to reward lazy/bad behaviour.

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

I can't seem to find a way to send a PM. I tried going to the member's profile page but the PM area is gone.

DaniWeb4Jim commented: You would not send me an answer to a message in a PM because I quote, "I wold not send it in a PM because it would only benefit you". Now you want to. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So you could go to the effort of typing "what are the different relational operators in python" into Daniweb but you couldn't be bothered to google "what are the different relational operators in python" and get the results instantly?

Unbelievable.

rproffitt commented: I'm running into grads that were forbidden in school to google it. Either that or they think this is Quora.com. +15
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

if you remove this, the program may work

No. It won't. Not even close.

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

I've always found the easy way is to create the control manually, then look at the Form1.Designer.vb code to see what the code looks like. Then you can adapt it to what you want. For example, using the auto generated code I got

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        Dim dgv As New ClsDgvJournal
        dgv.Location = New Point(10, 10)
        Me.Controls.Add(dgv)

    End Sub
End Class

Public Class ClsDgvJournal
    Inherits DataGridView

    Public Sub New()

        Me.Size = New Size(500, 200)

        For Each ch In {"A", "B", "C", "D", "E"}
            Dim col As New System.Windows.Forms.DataGridViewTextBoxColumn()
            col.Name = ch
            col.HeaderText = ch & ch & ch
            col.Width = IIf(ch = "B", 200, 100)
            Me.Columns.Add(col)
        Next

    End Sub

End Class
PM312 commented: Datagrid is generated at run time, how to name and write codes for it +3
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

I’m not going to censor myself to comfort your ignorance.

  • Jon Stewart
rproffitt commented: There, there.... +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You are not even close to being done.

  1. You only get input from the user once instead of within a loop
  2. You do not need both number and figure according to your spec
  3. Why are you doing a div and a mod?

You should be doing

do {
    show prompt
    get input

    process even or odd

} while not zero

Using proper indentation will help you to see part of the problem.

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

The problems just kept piling up. Calibre kept reporting a communication error and nothing was showing up in Explorer so I reset to factory and started from scratch. Everything is working as expected. Of course I now know how to open txt files as html.

Sigh.

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

Believing is seeing.

  • Offiicial motto of Trump's base.
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

After saying for the last 10 years that I would never own a cell phone (I had enough of that spending many years on call), I finally broke down and got one. It is a Figo (Speak Out) Android (Marshmallow) phone that allows me to buy a block of minutes without having to pay monthly fees. Basically I can use it as much or as little as I want and just pay for what I use.

My first complaint was the almost complete lack of documentation. It is a royal pain in the ass figuring out what every little (microscopic, actually) icon means.

My second complaint is how piss poor bluetooth seems to work. I don't know if it's a problem with Windows 10 or the phone but it seems that every attempt to transfer a file requires 20-20 minutes of fighting, removing, recreating bluetooth connections, and reconnecting again and again.

But a major complaint is for a problem that shouldn't be problem. I have been under the care of the good doctors for some years now for chronic cancer and I have decided that it would be a good idea to keep a medical history summary on my phone and carry it with me to all my appointments. Apparently the doctors here do not understand that that's what my medical file is for. In any case, after fighting with bluetooth (see above) Ii got the file "medical history.txt" transferred to my phone. Unfortunately, every attempt to access this file …

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

I wasn't trying to overly complicate things. I assumed this is for an assignment and I've lost points because the marker said "you didn't consider...". I suppose the easiest thing would be to use a regular expression that matches only words that start with an upper case letter. Then all you have to do is process them two at a time. The regex for that is \b[A-Z][a-z]+\b. That would reduce

Jack Jones, Gracie Burns and George Burns have three days in...

to a collection consisting of

Jack
Jones
Gracie Burns
George Burns

or you could use the regexp \b[A-Z][a-z]+ [A-Z][a-z]+\b which would give you full names collected as

Jack Jones
Gracie Burns
George Burns
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

You can start by googling how to convert node js script to exe

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

All of the strings have the names at the start of the line:

That may be the case but how do you know where the name(s) end. For example:

  1. Joe Smith will be attending.
  2. Joe Smith and family will be attending.

How do you determine whether or not and denotes the end of a name or separates two names?

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

While it's easy for a human to pick out the names by context, it's not so easy for code. How can you determine where the names end and the rest of the sentece begins? What constitutes a name? Is a name always a first name and a last name where both are single words? Without knowing the parameters you won't be able to parse the names.

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

I would rather have questions that can’t be answered than answers that can’t be questioned.

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

Are you sure you don't want 'sadasdsad','4' instead of 'sadasdsad''4'?

Sebas_1 commented: yeah, it's like that on the code but still failing +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Some of you guys have asked why the change doesn't stick

I could ask that you make this an option for mods but since I just added a folder to my bookmark bar with direct links to my "stuff" it isn't really an issue for me. The links to the forums are for "no filters".

alan.davies commented: Nice for desktop +1. But I'm on android and getting bookmarks is about as handy as de-filtering. Pah! +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Reminds me of my experience with the 2017 fall update which refused to install until I uninstalled software which had never been put on my computer.

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

That's a real UI blunder - a button is an action control and should be labelled ...

That could be clarified by changing the text from Filter by to Filtered by

JamesCherrill commented: Yes, exactly. That's the kind of thing that UI testing is for. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Agreed. But I still don't see that that has anything to do with giving the user the option to set a preferred default filter state. If the initial default filter is "don't show me crap posts" (what it is currently) then new users will get the current filter. What is the problem, then, with allowing me to select "no filter" as the default? How does this negatively impact anyone else?

rproffitt commented: Exactly. Give the member/user control here. Set the default as you wish. Problem solved. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

My favourite was "Gall pechod mawr ddyfod trwy ddrws bychan." Even if I can't imagine that "ddrws" is actually a word.

alan.davies commented: Glad you liked them! Ddrws mutated form of drws (door) from Romans' doras. Pr. throos with soft th as in the. +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

What messages/feedback are you getting to tell you what failed?

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

So when I am combing through the fluff and I come across a legit question and upvote it, even anonymously, it helps everyone else?

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

You'll have to create a list to hold all five numbers so that you can iterate over the list after the numbers have all been read in. When you iterate over the list you can, at that point, calculate and display how much each score differs from the average.

Mike_63 commented: Can you please give me some idea on how to start to get the difference of each score from average. thanks +0
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

So it looks like brakes.

I see that some voting machines in predominantly black precincts could not be powered on because somehow they forgot to include power cords.

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

There are utilities available that will recover your product key from the registry. It is encrypted so you can't read it directly. Have a look here for details.

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

I could see the possibility of a Windows setting that would allow administrators to prevent F8 safe boot on high security PCs but I would hazard a guess that most home users don't (in fact, cannot) use bitlocker. For most home users, the F8 options was an easy way to get access to a system that may be otherwise bricked. Removeing the F8 functionality for Windows Home Edition was, IMO, a huge mistake.

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

Remember when once upon a time all you had to do to start Windows in safe mode was go all Woody Woodpecker on the F8 key during boot? Well in Windows 10 it seems you have to do just a little more...

  1. On the login screen click on the power icon (lower right) then hold the shift key while clicking "Restart" from the popup menu.
  2. During the reboot you will get a "Choose an option" menu. Click on "Troubleshoot".
  3. On the next menu click on "Advanced options".
  4. On the next menu click on "Startup Settings".
  5. On the next screen click "Restart".

When the system restarts you should get a numbered menu where pressing "4" will enable safe mode.

See how Microsoft has made vast improvements to the way you use your computer (heavy sarcasm)?

A simpler way, but one that requires you to make a change that you must later undo, is

  1. Run msconfig.exe
  2. select the "Boot" tab.
  3. Select "Safe Boot"
  4. Click "OK"

Every boot after that will be a boot into safe mode until you undo the changes in msconfig.

So what exactly was wrong with F8?