New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: As a reader of NewMars forum, we have opportunities for you to assist with technical discussions in several initiatives underway. NewMars needs volunteers with appropriate education, skills, talent, motivation and generosity of spirit as a highly valued member. Write to newmarsmember * gmail.com to tell us about your ability's to help contribute to NewMars and become a registered member.

#176 2022-12-02 20:35:15

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For spaceNut re #175

Thanks for the (to me inspiring) background in your thinking about how to improve processes in a large organization!

(th)

Offline

#177 2022-12-03 12:59:01

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript Initiative...

The asynchronous nature of the environment in which JavaScript operates is continuing to provide setbacks.

I've just concluded a long work session attempting to introduce timer delays into the processing, and none of the examples provided worked.  They may have worked for the presenters, but when I tried to adapt the examples for my application. they all delivered instantaneous results.  In other words, the advertised delays did not result in delay on the browser page.

I've gained a glimmer of an insight... at one point, a presenter stated that the setTimeout and setInterval functions belong to the html window where JavaScript is running.  Some examples showed solutions involving a button. If the button (of the example) is clicked, then five seconds elapses before the result shows up on the html document window.

These examples are not working in my case, for whatever reason.

It's definitely time for a break.

(th)

Offline

#178 2022-12-03 14:15:32

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 28,750

Re: Java (r) or Javascript Computer Language

It is ok that this does stop as you have already cleared the back log of id's to fix. It is only a code learning at this point for all that are reading this topic. Knowledge gained is still knowledge even with less than desired response.
I believed that you did install the php code on a machine and from the prewritten scripts for the function you may be able to get the information that you are missing.

Offline

#179 2022-12-03 16:15:49

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re this topic...

I think you've put your finger on the (potential) value of this topic...

While there is no immediate need for the capability envisioned for this exercise, the goal of being able to operate on ** any ** hardware, operating system or (modern) browser is well worth pursuing.

I ** do ** appreciate the fact that there's nothing riding on this work, because it would be impossible for me to guarantee results at this point.

There are plenty of indications that others have solved a myriad of problems in this technology, so I'm assuming that by staying with the effort, the way forward will become less unclear.

I ** just ** made another discovery .... I was stepping through an update of Setup, which is working, but which I wanted to improve so it allows the operator to see the work it had done before it calls Worker.

What I discovered (I admit to my surprise) is that the asynchronous code I set in motion by using the Fetch command comes along and takes control away from whatever other code might be running at the time it returns from NewMars server.

I'm stumped at the moment, about what to do about ** that **.

The whole point of launching the Fetch was to retrieve data from FluxBB, and I am glad ** that ** works reliably.  But, on the other hand, I was wanting to regain control after the Fetch and display the status to the operator, before calling Worker.

I've been reading up on (and experimenting with) timers and timing functions, but at this point, nothing but frustration is on the score sheet.

Besides .... the next meeting of the local Linux group is coming up in the middle of the month, and since they have taken an interest in the initiative, I'm needing to have something to show.

Thanks again for keeping an eye on this .... The latest Setup actually might be worth a moment of your time, because it shows how to prepare the URL to pass data to Worker.

(th)

Offline

#180 2022-12-03 17:44:00

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative...

The post just before this one reported upon discovery that the Fetch asynchronous process can take control away from another process that might be running on a web page.  After letting ** that ** discovery simmer in the background for a couple of hours, I decided to ask (Bing in this case) for assistance. It found a web site that appears to offer suggestions for dealing with (or taking advantage of) Window events.  "Window" in this case is NOT Microsoft, but instead the generic term for a browser display.

All HTML elements like button, textbox, images can contain events that can be triggered using JavaScript code. And all these events are the part of DOM(Document Object Model). Here we will discuss some most frequent Events used in JavaScript:

Table of Content


Events in Javascript
Event list in JS Graphical
Onclick Event in Javascript
OnMouseOver in Javascript
Example of Events
List of Event in Javascript
Keyboard Event operation perform
Event Listeners Flow
Author

What I'm planning to investigate tomorrow is whether I can catch an event that is itself triggered by the Fetch event.  At the moment (in the version of Setup you have) Fetch delivers updates to a <div> block on the html display. It might be possible to create a special <div> statement that would be updated as the last activity coming out of the Fetch.  That <div> ** may ** have an event capability so that something called a "listener" might be able to pick up an update to that field, and (perhaps) do something useful, like launching Worker.

At the moment, Worker is launched before the Fetch is finished, which is NOT a good thing, because there is nothing for Worker to process.

(th)

Offline

#181 2022-12-03 18:14:44

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

More for SpaceNut re JavaScript initiative....

This post reports on Bing's search for information about "listener" functions, that may be triggered by updates to an element in a web page ...

The built-in method addEventListener () allows you to attach an event listener to an HTML element. It accepts two parameters: the event type to listen to and the callback function to run when the event is triggered: Element.addEventListener(type, callbackFn);
How to add event listeners to HTML elements using JavaScript
sebhastian.com/addeventlistener-javascript/
People also ask
How do I attach an event listener to an HTML element?
How do I remove an event listener in JavaScript?
What is addEventListener () method in JavaScript?
How to add multiple event handlers to one HTML element?
Feedback
Javascript detect event handlers available on HTML …
https://stackoverflow.com/questions/2864352
WebMay 19, 2010 · you could also loop through div's(or take any other HTML element) properties to dynamically check it: var d = document.createElement('div'), el = 0; for(el in d) { if(d.hasOwnProperty(el)) { console.log(d[el]); //or do anything else you like } } You could …

Code sample
elEventHandlers = [];
for (var prop in el)
  if (prop.substring(0,2)=="on")
    elEventHandlers.push(prop);
console.log(elEventHandlers);...
See more on stackoverflowFeedback
stackoverflow.com
Javascript - How to list all active event listeners on a Web pag…
Getting a list of your eventListeners so you can trigger it ...

The theory I'm pursuing here is that an update to the web page by the Fetch asynchronous process might be available to trigger launch of Worker, based upon the assumption that the requested data from FluxBB has arrived.

(th)

Offline

#182 2022-12-03 19:26:24

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 28,750

Re: Java (r) or Javascript Computer Language

I remember the old days of DOS writing code in Batch files with choice and call statements, but they were not the same as a fetch.

Offline

#183 2022-12-04 09:02:28

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re #182

Thanks for the reminder of the DOS days!  We humans were going through a massive transformation in those days.  When I started working after six years in the service, we (at least in the US) were still using electromechanical machinery to perform data processing. Those were the days of 402 accounting machines, with hundreds of relays, rotating cams and thunderous smashing of type face bars against the paper.  They were a joy to work around, but a pain to keep running.

Today's adventure in the JavaScript topic will be an attempt to (at least try to) take advantage of the event handler feature of HTML.  The concept I have in mind is to ask the browser to let me know when the post-Fetch sequence of commands has updated a display space on the web page.

If that event is available ( to start a function), then (hopefully) the function can verify that the needed text is present in the control, and thus have an all clear to launch the Worker.

One concern I have, as I approach this situation, is the fact that there are multiple events that write data to the web page control.

If the event handler is turned on then it would (presumably) activate for each of those events.

it might be possible to reduce the number of events to just one.

Update after first session directed toward adding an EventListener ...

I was hoping it might be possible to add a listener with a mouse click or two.

The examples I've found so far don't support that optimistic outlook.

I've added a new display item to the html: reportFetch

This new <div> is available to receive an update at run time, and I've added code to the Fetch to update the control.

However, as of ** now ** I've not found a way to cause that control to generate an interrupt to cause program control to transfer to a function set up for the purpose.

Update later:

element.addEventListner("reportFetch", ConfirmFetch());

The suggestion above came from www.w3schools.com
The solution could hardly be that simple. I'll believe it if it works.

Update shortly after above:

Setup.htm:41
       
       Uncaught ReferenceError: element is not defined
    at Setup.htm:41:13

Of ** course ** it couldn't be that simple!

Next objection:

Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    at Setup.htm:41:51

(th)

Offline

#184 2022-12-04 13:33:48

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript modifications to know when Fetch ends ....

It is time for a new post ... the previous one was cluttering up with failures ...

In the examples reported above, a button is able to generate an event.

Other controls on an html page may also provide event opportunities, but a button definitely can, so I decided to ask if JavaScript can click a button, as other languages can do.

The answer appears to be yes...

How to Click a Button with Javascript Code


Javascript


In this article, we show how to click a button with Javascript code.

Thus, with this code, you don't need to manually click the button. We can specifically do this with Javascript code.

Javascript has a built-in click() function that can perform a click in code.

Let's see an example of this below.

Hover over the following anchor tag with your mouse to click the button below:

I'm taking a break after making this discovery.

(th)

Offline

#185 2022-12-05 13:39:50

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

I'm on a quest to try to confirm that the Fetch has returned it's data.

This post reports a partial step toward that goal.

In hopes that it might be possible to set up an event to occur ** after ** fetch returns, I added a "hidden" button to the html for Setup. As of a few minutes ago, a function that is supposed to be called by the button after a JavaScript "click" just confirmed it received control.  I set up an Alert to report if control ever reached that point.

What I do ** not ** know is where that event stands in time, compared to the Fetch.  I'm taking a break after this modest advance.

JavaScript provides time reporting, but I haven't gotten it to work yet.

It should be easy to compare two times but I have managed to find ways to not succeed with something so simple.

***
Special item: The work session(s) just ended covered so may ways of making mistakes I'm not going to report them, with one exception.

My attempt to activate an "onclick" event capability on a button revealed an awesome number of failure modes.  However, ** one ** tip came in from a generous Internet advisor ... the suggestion was to put a little <script> section at the bottom of the html <body> section, to activate the button.

Apparently (and I am ** only ** guessing) the activation of a feature of a control in the html has to occur after the control has been set up.

I had ** thought ** all those timing details would have been handled by having the script in the Title section, but after I set up the little script at the bottom of the body, the onclick feature started working.

I can't guarantee that the placement of the activation of the event made any difference at the bottom of the body, because I tried so many other things I have no idea which worked.

At any rate, the outcome of the experiment is the discovery that a file can contain more than one script section.

(th)

Offline

#186 2022-12-06 14:26:33

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript Initiative ...

file:///C:/Runtime/Worker.htm?CurrentID=00000&StartID=12345&FinishID=12345&RetryCount=00000

This URL appears after Setup confirms it has received the data requested by Fetch. The Rube Goldberg contraption of activating a (hidden) button with a software "click" seems to have worked.

Setup still needs touchup because it is now cluttered with more functions that don't work, and comments that aren't needed.

In addition, as the Linux Group has pointed out, the Setup.htm definitely needs improved error reporting to assist the operator when hiccups occur.

The Linux Group here meets in two weeks from tonight, and I hope to have the system (of Setup and Worker) functioning reasonably well by then, so (at last) I might be able to persuade the group to concentrate on the proxy issue.  My guess is that one of the members (the group leader) already has a suitable proxy running in his home network, but my application has not been working well enough to find out.

However, it is time to start moving on Worker.

(th)

Offline

#187 2022-12-07 10:52:07

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0

the link above will (if all goes well) provide a copy of Setup.htm after a bit of cleaning.  Most unused code (and most unneeded comments) are removed.

The program works as intended.  The error messages can be improved.

Remember to activate the remote proxy if you decide to give it a try.

If you decide to study the program, look for the onclick event that allows the Fetch procedure to transfer control to another function via the hidden button.

Someone who knew what they were doing might have accomplished the same thing without the Rube Goldberg contraption, and I won't be offended if someone chimes in to inform us of something better.

Reminder to all readers: This forum is open to new members. See the recruiting topic for procedure.

I'm starting work on Worker now.  It is intended to call itself once for each TestID to be processed.  My current intention is to write a cookie for each TestID, and then summarize the run at the end, by pulling all the cookies.

Reminder: It turns out that a web page can only read it's own cookies. That is why Setup has to call Worker, and Worker has to call itself.

My current thinking is to set the cookies to expire after 24 hours.

(th)

Offline

#188 2022-12-07 14:05:09

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

Worker has jumped the first hurdle ... it retrieved parameters passed by setup:

Worker Called by Setup: Run Status

runReport: Progress detail is to be reported here
Path for output will be shown here"
whiteBoard: Temporary data goes here
CurrentID: 00000
StartID: 12345
FinishID: 12345
RetryCount: 00000
Returning from fx4_run after load event
This version ran on Edge on Windows 10

Development environment is Visual Studio Code

Here is a link to the Worker.htm if you want to test it.
https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0

And here's the Setup that goes with it:
https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0

Remember to activate the proxy, and launch Setup first.

Time for a break ...

Update a bit later ... the current duo, Setup and Worker, have now performed correctly on:

1) Windows 10 with Edge (#1)
2) Chromebook with Chrome
3) Ubuntu 24.04 Chromium
4) Windows 10 with Edge (#2)
5) Linux Ubuntu 24.04 Firefox
6) Windows 7 Edge
7) Windows 7 Chrome

I'd be interested in any reports other NewMars members might have...

(th)

Offline

#189 2022-12-07 21:15:48

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 28,750

Re: Java (r) or Javascript Computer Language

Well, that is progress for sure.

Offline

#190 2022-12-08 09:23:16

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re #189

Thanks for noting the report... Today's work session will build on the successful parsing of the URL passed by Setup.

Tentatively, I'm thinking along the lines of...

1) Process last item at the top of the decision tree
2) Process regular items next with an Else to cover the first item

Today's work session includes Fetch by Worker .... the procedure to loop is on the agenda for tomorrow ....

JavaScript Worker Script for TestID Utility

Version 02 on 2022/12/08 Updates: Read URL - read cookie and create a cookie

Version information is saved at top of Script section

Current ID is: 12345 Runtime

StartID
EndID


Worker Called by Setup: Run Status

runReport: Progress detail is to be reported here
Length of whiteBoard before fetch 191
Current ID is: 12345 After Fetch of TestID12345
save data from Fetch
Length of whiteBoard after fetch 191
Path for output will be shown here
whiteBoard below

Report to console.log from inside Fetch
Length of result: 7589
Show urlTestID http://newmars.com/forums/userlist.php? … estID12345
Show if TestID found: TestID12345
Show if Member Member
Show location of match 2987
End of console.log from inside Fetch
This version ran on Edge on Windows 10

Development environment is Visual Studio Code

(th)

Offline

#191 2022-12-09 16:32:15

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut ....

Hopefully this report will be of interest to you ...

Visual Studio Code is a free development environment environment for JavaScript (and many other languages) ...

I've been using it since transferring from the Pentium III Windows XP system after it became clear the 2015 updates to JavaScript require a more modern development environment.

I've been happy with a (very limited) subset of the features of VSC ... It works well as an "intelligent" editor .... of particular value was the automated placement of parentheses and braces where they are needed, and the color coding (red means item not matched) and (yellow or blue or purple means matched).

That feature alone has saved hours of work, but it has not been able to catch all my errors.  Occasionally a missing bracket or parenthesis causes mystifying failures far from where the omission occurred.

In any case, and the reason for this post .... VSC just updated, and this time it is offering 3+ Gigabytes of enhanced capabilities.

I decided to let the installer go to work ... the new package includes Python and a C++ compiler, and countless (at least by me) new features.

A prominent new feature is node.js, which is itself a full featured development environment.

My impression is that Microsoft has decided to go all out in making this environment as productive as possible for millions if not billions (eventually) of it's users.

My intention was to work on Worker today, but the download and installation of all those packages is going to keep the little Windows 10 education system busy for a while.

(th)

Offline

#192 2022-12-09 18:58:19

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 28,750

Re: Java (r) or Javascript Computer Language

I am wondering if the data base issues are related to not having pointers in the registry as a key to point to where we are working.

We had to do this for our access data base that we created at work as it was not totally able to make use of exported data that would be able to be updated by the record that are created by access.

Offline

#193 2022-12-09 20:50:41

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re #192 about Housekeeping ....

Interesting point about the Registry. 

Best wishes for success with the (large scale) effort you have underway at work.  Trying to change a very large (and possibly very old) organization is going to require all the patience and persistence you and your team can muster.

Any organization still using Excel for anything is quite remarkable, from my perspective.  A client had to switch from Excel to SQL Server for a product in the field at 100's of customer sites, because Excel kept losing data. 

***
I'll return to the JavaScript exercise tomorrow.... the updates for Visual Studio Code appear to have finished. 

(th)

Offline

#194 2022-12-09 22:35:36

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 28,750

Re: Java (r) or Javascript Computer Language

We are making improvements to the current version of the material readiness tracker so that we can make use of it in more places. I also have been looking at about 4 other trackers that are unique for other types of materials used. One is for all types of Hazmat tracking of expiration dates to when work is expected to be performed so as to limit disposal of these as its costly to order Hazmat to only process it into the disposal process that federal and states control. Another is to work away from a paper process for shipping and receiving that has no electronic backup data to one that gives and app that create the paper from form to data base entry that will auto populate the paper format. Of course, bar coding and other features will be added so you can have tracking at every step in the travel from place to place.

Offline

#195 2022-12-10 07:22:51

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re #194

Thanks for this encouraging update on (what sounds like) progress in a team approach to solving a major problem in an old, large organization.

Modern Smart Phones have so many powerful features, it ** should ** be possible to help the organization make a technical leap of several decades without great expense for hardware, if the employees are willing to use their Smart phones to help out.

Alternatively, the low end Smart Phone offerings are quite powerful, and even a large and very old organization might be able to afford them.

(th)

Offline

#196 2022-12-11 13:32:51

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut ....

There was a bit of cleanup needed in modification of Worker to accept parameters from Setup ... it seems to be ready for the next step, which is to attempt to write a cookie with results from a fetch..

JavaScript Worker Script for TestID Utility

Version 03 on 2022/12/11 Updates: Read URL - read cookie and create a cookie

Version information is saved at top of Script section

Verified: Integer Start: 12345 Integer End: 12345 Path: file:///C:/Runtime/runlog.txt

StartID
12345
EndID
12345


Program will click hidden button below after Fetch returns with data


Worker Called by Setup: Run Status

runReport: Progress detail is to be reported here
Proposed Path is: Runtime
whiteBoard: Temporary data goes here
CurrentID: 12345
StartID: 12345
FinishID: 12345
RetryCount: 00000
Reporting from fx4_run after load event
Input to Worker accepted
Finished Processing! Current ID = FinishID
This version ran on Edge on Windows 10

Development environment is Visual Studio Code

In case you have time, here are the three files that go into a Runtime folder:

https://www.dropbox.com/s/8kc0k2ujbpi5f … o.txt?dl=0
https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0
https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0

(th)

Offline

#197 2022-12-12 13:02:45

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

Update after work session on Worker.htm ....

This process is going to be tedious, apparently.

The break points set for Worker do not take effect if Setup is called first, which is normal.  F5 can be used to restart Worker, but I have to manually insert a stop command into the source code before it is called by Setup.

It will be possible to step through the code to see why it is calling itself instead of performing a Fetch, as it was doing before recent changes.

There are no compile time errors, so the behavior is pure logic error.

Whatever this is, it will most likely turn out to be a spelling error of some kind.

(ie, using wrong variable name).

Taking a break...

(th)

Offline

#198 2022-12-13 12:26:10

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative...

Two steps forward and one step back .... that step back is a doozy!

Worker is now cycling properly .... However, the cookies I've requested never get set.  It turns out that this is another protection against hackers.

I didn't initially see that you'd specified "local" in the question title -- not sure if this was updated while I was writing my answer. Cookies are not set when browsing using the file:/// protocol, depending on the browser.

They are most definitely NOT being set by Edge.

I've already tried localStorage and found it unreliable in the sense that I'm looking for a solution that will run on all operating systems and all modern browsers.

The only reliable way of passing data I've found so far is the URL.

There ** is ** another (potentially reliable) way to store data .... that ** might ** be done by creating and updating a post on FluxBB.

That would require the operator be logged into NewMars, which I've been able to avoid so far.

Still, if all the anti-hacker measures prevent storage of data on the local system, then the remote server ** is ** available.

I'm reluctant to pursue that because one of the purposes of this initiative is to create a set of programs and procedures that anyone might use to gain a bit of insight into JavaScript and it's use in a Real Universe environment.

(th)

Offline

#199 2022-12-13 13:27:33

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re files for testing ...

If you have a spare ten minutes, here are the links to the current set for the JavaScript utility to look at TestID's ...

Worker: https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0

Setup: https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0

Proxy: https://www.dropbox.com/s/8kc0k2ujbpi5f … o.txt?dl=0

You can run a series and watch Worker call itself. 

For example: 12345 start 12350 finish.

The inability to store data is disappointing, but I understand the reality of the hacker community attempts to steal data and to modify web sites.

Please note that the Retry count is one greater than the number of items to be processed, because Worker makes one last call after the last item is finished.

***
Tested on Edge/Windows 10
Ubuntu 24.02 Chromium
Ubuntu 24.02 Firefox
Chromebook using:Version 84.0.4147.136 (Official Build) (32-bit)
Windows 7 ... set run to 56 items: file:///C:/Runtime/Worker.htm?CurrentID=12401&StartID=12345&FinishID=12400&RetryCount=00057

(th)

Offline

#200 2022-12-14 12:49:36

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 16,756

Re: Java (r) or Javascript Computer Language

For SpaceNut re JavaScript initiative ...

Here are the Runtime files again ...

This time, Worker is saving a snippet from each downloaded Fetch, and saving it in localStorage.  I'm proceeding on the assumption that Worker can see the localStorage it saved in a previous session, so that it might be able to prepare a report at the end of the job.

In the current state of the program, you can see the saved snippets by:
1) open console in browser
2) enter: localStorage
3) You should see a summary of the snippets created.
4) Enter: localStorage.TestID#####

That command should show the snippet for the TestID you selected to see.

You can remove localStorage items after a test by entering:
localStorage.clear

https://www.dropbox.com/s/pnemvchyw15fh … r.htm?dl=0

https://www.dropbox.com/s/n18o5nj76k3r2 … p.htm?dl=0

https://www.dropbox.com/s/8kc0k2ujbpi5f … o.txt?dl=0

I'm hoping you can find time to run the programs at some point.

***
In the next work session, I'll attempt to read the saved snippets to create a report to the screen at the end of the job.

Eventually, I'd like to attempt to create a file for output. That requires operator approval.

***
Update a bit later .... testing on Windows 7 with Chrome as the browser...

TestID12345
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=422387\">TestID12345</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2017-06-14</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
TestID12346
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=426914\">TestID12346</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2018-01-05</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
TestID12347
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=421108\">TestID12347</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2017-04-23</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
TestID12348
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=429490\">TestID12348</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2018-03-13</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
TestID12349
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=423609\">TestID12349</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2017-08-14</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
TestID12350
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=431217\">TestID12350</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2019-04-21</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
TestID12351
:
"<th class=\"tcr\" scope=\"col\">Registered</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"tcl\"><a href=\"profile.php?id=422730\">TestID12351</a></td>\n\t\t\t\t\t<td class=\"tc2\">Member</td>\n\t\t\t\t\t<td class=\"tc3\">0</td>\n\t\t\t\t\t<td class=\"tcr\">2017-06-30</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
length
:
7

The snippets above show the part of the  Fetch for the TestID's that includes the Registration date .... I'm thinking about attempting to create a report showing the distribution of spammer created ID's by date .... The graph should show a gradual increase from the early days of the forum to a crescendo just before SpaceNut closed the door.

(th)

Offline

Board footer

Powered by FluxBB