Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go »
No member browsing this thread
Thread Status: Active
Total posts in this thread: 116
Posts: 116   Pages: 12   [ Previous Page | 1 2 3 4 5 6 7 8 9 10 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 16417 times and has 115 replies Next Thread
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0o

Today copied the listobject table pre-sizing 'feature' into the Cache update routine and on the go could get rid of several made-redundant variables [why define when it was already defined;p). Reusable code again, but so small it was easier to just copy and adapt to the data on hand rather than making it a reusable module.

And, another vexing issue resolved, an age old peeve... the statusbar not updating progress after a while. Tried lots over the years, but now reverted to something in an MSDN article of 2002 [declared expired, supplied as-is]. After each statusbar progress message tell the macro to microsecond pause and allow the system to do it's thing [updating the screen]. Much lit about 'don't use', but it proved innocuous in testing... the statusbar now refreshes properly after each 250 records import with simple 'DoEvents' instruction. A few extra seconds processing time on minutes waiting and stressing if it runs or not taken away [on 9000 active records in the RS pages]

Hasta la croque monsieur.

P.S. Allowing DoEvents also lets through a few cycles to BOINC in case it feels starved and wants to quite jobs when the hunting is taking all the juice for a few minutes [when loaded to the brim] :P)
[Nov 17, 2015 11:46:43 AM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p

Great advances in the floating action bar department [See the screenshot links for the button set, meantime grown to 9 as eluded]. Now the bar can be dragged anywhere and resized [to zoom in on the small-print]. Run the macros, work on whatever you want and when done hit control+b and the bar is thrown back to it's docking spot and sized back to it's origin.

To top it off, added some power pivots in the 2010 version and power querying in the 2016. Elation and full depression at the same time. This office has a 'Merge Queries' function... instead of running all the xml pulls one by one, merge the output into a single table on-the-fly. Wish I had had access to that feature 6 months ago when starting on the Hunting tool development... so many convoluted workarounds developed to get things functioning, when here it's just a question of setting up a chain and pump...arrgh.

( shhh , but this is near live tapping into the Result Status resource, sitting here concatenation the 60 serial http addresses with offsets into one series)
[Nov 19, 2015 4:52:03 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p

And so we have reverted to a much simpler binary, boolean, yes/no, true/false all pushed into a code mask, which has just one outcome again, 1 or 0, 1 is credit, 0 is no credit.

Count	EOGVTA	Credit Yes/No (1/0)	Mask Status description
1816 111111 1 New Valid, This Period Modtime
7 111110 0 Old Valid, This Period Modtime, On Archive
0 111101 1 Old Valid, Previous Period Modtime, Not on Archive
3184 111100 0 Old Valid, Previous Period Modtime, On Archive
427 110001 0 Old Pval
38 110011 0 New PVal
24 110401 0 Old Pver
28 110411 0 New Pver
181 030201 0 Old Server/User Aborted
18 030211 0 New Server/User Aborted
2 140001 0 Old No Reply
2 140011 0 New No Reply
2 160201 0 Error Validation
5729 Total Count, Has to be equal to total active results


Each digit in a combination representing a state

Statûs Codes Explanation
E=Exit Status 1=No Error 0=Error
O=Outcome 1=No Error, 3=Error, 4 NoReply, 6=Error Validation, 7=Aborted
G=Granted 1=Yes, 0=No
V=ValidationState 1=Valid, 2=Invalid, 3 TME, 0/4=PV, 5=TooLate
T=ModTime Current 1=Yes 2=No
A=Archive 1 =No, 0=Yes

Instead of 6 nested condition checks, now a simple 1 or 0 index/match lookup, on the fly, of the generated mask with

=IF([@ModTm]=0;"";IF([@ExitStatus]=0;1;0)&[@Outcome]&IF([@Granted]>0;1;0)&[@ValState]&IF([@ThisPer];1;0)&IF([@NotArch];1;0))

Why checking the 'granted'... it's the only giveaway that I can determine that some faulty results were still courtesy credited... the 'Error Validation for instance and the Too Many Error take outs.

The power pivot revealed only 13 code combinations occurred on near 6000 results [5729, which matched to the ResultsAvailable field, of which only 2 codes lead to credit, 111111 and 111101. Monitoring with a unique code list generator ATM if new ones show up in the coming weeks, but it wont be many [I hope].

Spanner insert is what was long suspected... as the program fetches 250 max at a time, transacting continues, so the next 250 may in fact have shifted one or more up or down in the order, and you miss to fetch those records, or get duplicates. The archiving would not take the duplicates, but the missing, code 111101 were never, and not counted, because the ModTime was of a previous period. More drawingboard work to do. :(, but we did discover 4 records not counted, still on the RS pages, accounting for some of the 'WCG shows more credit than computed locally', and they now forward on are' :).

Hasta la penne aldente
[Nov 20, 2015 11:54:26 AM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p

And the power pivot put the finder on the sore spot... while fetching results, the time between pulling one page (#8) and the next (#9), was enough to grab a result twice

2001 OET1_0001479_xSDGP-L_rig_87793_0 5712 2000 oet1 Valid 27,71305309 0,865714431 0:00:51:57 0,867079854 0 27,71305309 32,01177213 0,998425262 1448073389 1 21-11-2015 2:36 29-11-2015 10:51 19-11-2015 10:51 5 1 21-11-2015 2:36 21-11-2015 12:06 TRUE TRUE 111111 2
2000 OET1_0001479_xSDGP-L_rig_87793_0 5711 1750 oet1 Valid 27,71305309 0,865714431 0:00:51:57 0,867079854 0 27,71305309 32,01177213 0,998425262 1448073389 1 21-11-2015 2:36 29-11-2015 10:51 19-11-2015 10:51 5 1 21-11-2015 2:36 21-11-2015 12:06 TRUE TRUE 111111 2

Actually in the set there were 11 results that had a computing time range of 51:51 to 51:59 at which time it becomes a closer look requirement.

Full tally after applying select and delete, just 1 off on 5714 active results.

The mask method did it's thing solidly, both 111111, valid, current period, not yet archived, so went ahead and merged the feature into the 'production' version... code 1/3rd of what the near impossible to reconstruct old lines of many nested If's.

Today, early rise, also learned a new remove / filter ListObject technique... yet again need for [more] speed was gained.

Hasta la ... [undecided on what we might eat today, paella maybe with cozze, of course :].
----------------------------------------
[Edit 1 times, last edit by SekeRob* at Nov 21, 2015 1:42:02 PM]
[Nov 21, 2015 1:36:35 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p

If you have trouble with duplicate records in the result fetches, use

ISNA(MATCH([@Name];OFFSET(NameCol;0;0;ROW()-1;1);0))

This digs through all the records from the top [NameCol], at offset 0,0 through to the previous last record [Row() - 1]. If ISNA is false i.e no match found, it's not a duplicate, if true, print 'Duplicate' instead of testing if this record needs inclusion in the current period based on the mask... no further testing if false of course, as that would be a waste of crunching cycles.

Unfortunately =IFNA is not a function available in Office 2010 and before, so can't use that, but it would be a simpler test / outcome function.... still trying to maintain backward compatibility.

Every knife has two sides to the blade cool .

P.S. On the outside chance, it could happen that the first of the duplicates has a newer timestamp than the second [newest at top fetch sort does not resolve this] and was validated in the few seconds between the first and the second pass... really off chance and need to see it happen before considering it worth another test level, if seeking more than perfection biggrin

(The paella is simmering on the stove)
[Nov 21, 2015 3:34:55 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p RC1 test

The best time to work is when everyone else is still asleep, or shaving, or having breakfast or stuck in traffic, all far away from your desk and be able to focus... Short pondering, again the pivot tool came to rescue for the reconciling, at noon stats fully automated. So rolled up in the midnight stats of 5673 results, was 2 short on credit for 4:04:32 hours or as annotated: 2xOET Shrt 0:04:04:32. This noon stats 2 showed up missed to be fetched at midnight with the mask "111101", valid, granted credit, not on archive, so better count them now...

OET1_0001479_xSDGP-L_rig_25826_0 5628 oet1 Valid 29.38 1.7128 0:01:42:46
OET1_0001475_xSDGP-L_rig_63669_0 5627 oet1 Valid 33.73 2.3627 0:02:21:46

Sure enough these add up to, yes 0:04:04:32

Now that we know that statistical chance is they won't be missed a second round [and hopes they have not yet been migrated off], defined an automated summary "Extra credit carried over from previous period". It starts to look like only 1 or 2 more pieces are missing from the 6000 part jigsaw, to make the summary, clear and complete without having to get up early to collect one's thoughts.

No hasta in the kitchen today, we go out for dinner... Pizza Diavola for me, with Annibal's favorite chianti devilish
[Nov 22, 2015 2:42:52 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p RC1 test

36 hours on FAHB and 4 new masks [6 digit number combos] were found, nicely listed out with the array function, nicely hotlinked to the offending results, but, frowning on those 110201's as they are not being credited, 2 is clearly the 'Invalid indicator for the 4th digit... hmmm.

The top off for today is, found some code at Contextures that could be adapted to purpose-name PivotTable drilldown reports [to investigate the heretic results], which then on closing the tool raises the 'To Delete or No Delete, That's the Question', if there are any 'DrillIn_Sheet#' pages, so next time the Hunting tool is opened, no relics are lingering.

Great was a discussion stumbled over at MrExcel about attaching hyperlinks Screentips to shapes [the Action Buttons], and then discovering the assigned macro would no longer execute. One was wondering if setting an event call off to the hyperlink address into a unused cell and launch the macro from there, but never got back. Wellllll, I tried and indeed this works great... now even the floating action bar can carry it's pop-up comment boxes, albeit just one-liners long as the screen is wide... better a bird in the hand than 10 in the air. What has me flummoxed though is, the hyperlinks calling the macro-event cell only executes one time. Only when saving the book, closing and opening will they work again, 2-3 times and then they die again. Is there any secret liaison between WCG and MSN ;?

Hasta la...
[Nov 24, 2015 2:55:18 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p RC1 test

Hah, no more flummoxing... when Screenupdating = false was executed and not restored to = true at end of macro, there's no event execution selecting a cell until that has happened. The closing of the book and reopening of course did this... another permanent fix applied. dancing

(No unbeatable dangerous liaisons ;P)
[Nov 24, 2015 3:57:14 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p RC1 test

Very very, very very close to complete automation of the fetch url formulation... desperate seeking susan solution, resorted to the .sendkey feature as there is [apparently intentionally], no code to modify the data connection web address url edit box. Now a formula is composing the urls with offset, member name, account key etc as per API, converts it to text, copies this into the buffer, then the script sends keys to do Alt Data Connection Properties Edit and a ^v~ to paste the string into the right box.

Surprisingly landed in .Net for the code as VBA does not have (documented) certain features such as wait and 'repeat any key n times'.

"SendWait(String)

Sends the given keys to the active application, and then waits for the messages to be processed."

Miraculously they work in Office 2016, then tried 2013, then tried 2010 and still working.

So here we are, good old keystroke macro execution, hahaha.
Sub ResultQueryAddress() 'ShortCut Ctrl+r

With Application
Dim addr As String
'.Run "ScreenOff"
MsgBox "Next, when web-screen appears, do Import > OK > Close"
[ResQryDyn].Calculate 'Update dynamic http qry address based on present parameters, member/acckey/offset
addr = [ResQryAddress].Value
.StatusBar = "Address, " & addr
.Wait (Now() + TimeValue("00:00:00"))
Range("ResQryAddress").Copy 'Takes the dynamic http address and stores it to clipboard
.Goto ("ResQryAddrFix") 'move to cell where to put the text value of previous line
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
'Range("ResQryAddrFix").Activate
.Wait (Now() + TimeValue("00:00:01"))
.SendKeys ("{F2}+{Home}"), True 'Clipboard_GetText
.SendKeys ("^c{Esc}{Del}"), True 'Copy the full http text in [ResQryAddrFix]
.SendKeys [ResQryKeys].Value, True 'Execute keystrokes stored in [ResQryKeys] cell.
DoEvents
'.Wait (Now + TimeValue("0:00:05")) 'Give it time to fetch the objective Results set
AppActivate Application.Caption
'.SendKeys ("+{Tab 7}"), True
.SendKeys ("%I{Enter}%C"), True 'goes to the sheet instead of the web connection address screen... argh.
DoEvents
.ScreenUpdating = True
.StatusBar = False
End With

End Sub
Sadly though the focus is lost when the web xml is pulled and the Import > OK > Close is ending in limbo, then gets processed in the sheet instead of the frame when done manually. AppActivate is no solution either as when having multiple workbooks open you end up in the wrong one [rolling dice]...agrh.

More drawingboard work, but we are down from originally 30 minutes per page to create to 10 minutes, to now 10 seconds, to close one with a manual %I(Enter}%C

Hasta la calamares fritos
[Nov 29, 2015 4:28:44 PM]   Link   Report threatening or abusive post: please login first  Go to top 
SekeRob
Master Cruncher
Joined: Jan 7, 2013
Post Count: 2741
Status: Offline
Reply to this Post  Reply with Quote 
Re: Hunting Tool 2.0p RC1 test

BTW, Microsoft, anno 2015
"Caution

If your application is intended for international use with a variety of keyboards, the use of Send could yield unpredictable results and should be avoided."
Yes it is, and thus no wonder more and more non-english governmental institutions are dumping MS for Linux+Open Office... wakey wakey Redmond!.
[Nov 29, 2015 4:34:14 PM]   Link   Report threatening or abusive post: please login first  Go to top 
Posts: 116   Pages: 12   [ Previous Page | 1 2 3 4 5 6 7 8 9 10 | Next Page ]
[ Jump to Last Post ]
Post new Thread