Suspect away.
I'm sure some AI tool will generate dot product results (of square
matrices) using the standard algorithm:
for (int i=0; i < N; i++) {
for (int j=0; j < N; j++) {
C[i][j] = 0;
for (int k=0; k < N; k++) {
C[i][j] += A[i][k] * B[k][j];
}
}
}
But intentionally passing off others' code as your own is a Feeb tactic
(I busted him several times doing it).
1. <HHCzH.9065$9F....@fx47.iad>
2. <7YNwI.88920$AU5....@fx29.iad>
3. The perl code he posted here: <
rkqoc...@news3.newsguy.com>
came from:
https://perlmaven.com/count-words-in-text-using-perl
> I know how to multiply matrices, and I can code it efficiently if I know
> how it is stored in the computer (i.e., by column or by row).
Then code it. Don't just say you can (common Feeb tactic); do it.
> So I don't feel the need to show that simple skill to others. Sorry :)
wimp
You begged me: "Use A[i][j] for your matrix and rewrite the programs the
way _you_ know how matrix multiplication is done."
I DID write such a version in C, and the above is the output. But you
won't see the program until you submit your attempt.
> But if you feel you need to show your skills to me and others
> (especially Farley), add the two e-based numbers I gave in one of my
> challenge questions, with the result of course expressed in e-base with
> 14 significant digits.
Looks somewhat interesting. I might give it a try.
What 2 numbers?
> AI cannot do that, so if you code the conversion,
> I'll know (for the first time) that you can program productively.
Surely there's a website that will do it?
> In fact if you can do it, I'm sure it'll make Farley pretty jealous of
> you :)
He already is. But Feeb is a vicious, petulant child that only gives
credit to FOSS coders or suckups like you.
Example: years ago he whined to me:
> When are YOU gonna learn something useful, like colorizing the output
> of your namby-pamby python output to differentiate file types?
So I wrote a C program to do it:
----------------------------------------------------------------------
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void getfiletypeinfo(char *filecmd, char *farr[])
{
// use pipe to get results of system command
char pBuffer[50];
FILE *pPipe = popen(filecmd,"r");
fgets(pBuffer, 50, pPipe);
pclose(pPipe);
// assign color value and short descriptor to file type
if (strstr(pBuffer,"symbolic link" )!=NULL) {farr[0] = "31";
farr[1] = "symlink";}
else if (strstr(pBuffer,"shared object" )!=NULL) {farr[0] = "32";
farr[1] = "shared object";}
else if (strstr(pBuffer,"Perl script" )!=NULL) {farr[0] = "33";
farr[1] = "Perl script";}
else if (strstr(pBuffer,"shell script" )!=NULL) {farr[0] = "34";
farr[1] = "shell script";}
else if (strstr(pBuffer,"python" )!=NULL) {farr[0] = "35";
farr[1] = "Python script";}
else if (strstr(pBuffer,"ASCII text" )!=NULL) {farr[0] = "36";
farr[1] = "text file";}
else if (strstr(pBuffer,"ELF 64-bit LSB")!=NULL) {farr[0] = "37";
farr[1] = "executable";}
}
int main(int argc, char *argv[])
{
if(argc<2) {printf("Enter a directory, ie /usr/sbin/\n");exit(0);}
if(opendir(argv[1])==NULL) {printf("%s is invalid\n",argv[1]);exit(0);}
if(argv[1][strlen(argv[1])-1] != '/') {printf("Last character of
directory name must be /\n");exit(0);}
int i = 0, filecnt = 0;
char fcmd[100], c[11], *farr[2];
struct dirent **dir;
filecnt = scandir(argv[1], &dir, NULL, alphasort);
for(i=0;i<filecnt;i++) {
sprintf(fcmd,"file %s%s -b",argv[1],dir[i]->d_name);
getfiletypeinfo(fcmd,farr);
sprintf(c,"\033[1;%sm",farr[0]);
printf("%s",c);
printf("\%3d. %-30s %s\n", i+1, dir[i]->d_name, farr[1]);
free(dir[i]);
}
free(dir);
return(0);
}
----------------------------------------------------------------------
Feeb's immature response?
"Nope. You did not do it. All terminal output on GNU/Linux should be
done through ncurses."
He cried like that because he was - and still is - unable to do it himself.