PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dumb question for the week.  (Read 243 times)

Petrus Vorster

  • Senior Member
  • ***
  • Posts: 437
Dumb question for the week.
« on: August 28, 2019, 02:00:27 PM »

May I bother you gents with probably the dumbest question of the month?

I am still playing around with a old shelved project that I never could get working.

I tried back then to send a Tracking number to a website and get the return data without opening the site.
That didn't work in the slightest.

The site creators let me know today they have made an API for it....and then it followed with a bunch or tech remarks etc.
Firstly, they said the API was for Middleware. Ok...
Then they send me the actual API functions with a call function that looks like this:
Quote
GET http://165.8.11.47/api/parcels?requestorId=47cf2d5b-f07b-4e20-b116-11e1c1a0bc00&trackingNumbers=TU133257421ZA

Before i make another fool of myself sounding dumb there, rather ask here where everyone is used to my baffoonery....

1) Middleware? That should then by my understanding be something they run as a bridge between the server and the apps running on phones?
2) This Server, if its an Appserver, can one still make some sort of call to it via a normal web connection or means in FB or PB?
3) Given the APP server address starts with an IP address, i figure the Middleware alone have internal access to that address and that you cannot make an external call to that server via the normal internet route?

Or am I as usual completely off the target again?

-Peter
Logged

Petrus Vorster

  • Senior Member
  • ***
  • Posts: 437
Re: Dumb question for the week.
« Reply #1 on: August 28, 2019, 02:04:33 PM »

Well behold!
On the web, i can actually reach the server, and it replies one entire page of stuff and things one could parse and filter.

Now, given my shortcomings on this topic, how do i then retrieve that response from that website in my own application?
Logged

raymw

  • Senior Member
  • ***
  • Posts: 284
Re: Dumb question for the week.
« Reply #2 on: August 28, 2019, 03:01:30 PM »

Can't think at the moment, but parsing the page would be relatively easy, I think.
edited to add - There are some winfbx functions that will most likely do it, i tried a few of the examples, but it is well beyond my paygrade, but I'm sure the more knowledgeable will help
« Last Edit: August 28, 2019, 03:38:52 PM by raymw »
Logged

raymw

  • Senior Member
  • ***
  • Posts: 284
Re: Dumb question for the week.
« Reply #3 on: September 10, 2019, 03:44:54 PM »

A different dumb question - hope that's OK. I seem to get a number or error messages with -ve line numbers, no idea what causes them, other than my extensive playing with the gui. I've found that opening the basic file in notepad++, the compiler log file line numbers are the same as line numbers in notepad++. I've managed to sort out some of the problems, since it shows which part of the gui is causing the problem. Now, the dumb question, some of the form tools - buttons, text boxes whatever, fly off the form if snap lines are enabled, but they are still visible in the notepad++  listing,(but not in the gui nor Winfbe code page). Will it cause other problems, if I simply correct the location to be somewhere in the form area, and then delete it from the gui, assuming that is possible? I suppose I could try it, but not sure what other code associated with said tool, is lurking in the background? There is not much need to delete them, other than the sequence of editable items is disrupted - e.g. text1, text2, text4 (text3 somewhere it shouldn't be). I believe the errant behaviour has been cured in the latest release of  Winfbe, and I try not to use the snap lines recklessly.

edit to say - seems to cause no problems, if done with care.
« Last Edit: September 12, 2019, 07:57:17 AM by raymw »
Logged

Petrus Vorster

  • Senior Member
  • ***
  • Posts: 437
Re: Dumb question for the week.
« Reply #4 on: September 18, 2019, 02:28:26 PM »

Thanks to an old Post from Eddy van Esch in 2016, a little tweaking and it worked!
Now, its just parsing the info, and then they keywords filter, but its done.

Thanks Again Eddy!
Logged

raymw

  • Senior Member
  • ***
  • Posts: 284
Re: Dumb question for the week.
« Reply #5 on: September 20, 2019, 01:59:38 PM »

Having collected temperature data over the past month or so, I'm going to end up with pretty large sequential text files. In order to select the time periods I may be interested in, I'm reading all the data into memory and doing searches in there. Initially, there is an advantage to pure text files, but even if I were to use a more appropriate file layout, I would still run into the same sort of problem. I believe I read  the maximum string that free basic can handle is 2Gbytes in size. The largest array that I can set to  be able to read each line of text into is
Code: [Select]
dim shared allofit(100000000) as string. What happens if either the 2Gb or array limit is exceeded?. I think it does not fail gracefully. I've found numerous instances of the crashed program existing as active tasks after I've finished. A month's worth of data is about 140,000 lines of more or less 35 characters per line. I suppose i could parse it into a more abbreviated line format.
Logged