Jump to content

Working Out Multis


Recommended Posts

I have just put up a new version. 0.2.1

 

http://www.askp40.dsl.pipex.com/multicalc.htm

 

I think I've fixed the problem with pasting, and you can now copy partial text from the translations boxes.

I also fixed a problem that if your formula had an E in it, and you had not yet found the value for E, it crashed. It was trying to do exponential and getting confused. For the moment I have disabled exponential.

 

If anyone spots anything else, let me know.

 

Thanks

 

Simon

Link to comment

It seems to me that it would make sense for this application to be written as a Cachemate plugin. It could get round a lot of the cutting and pasting, and is probably the best way forward for Palm users anyway.

 

The Royles Have written a version for the palm, see This Thread If you feel like doing a Cachemate plug in for Palm or PPC, feel free.

 

Sorry folks, another version.

I have fixed a bug where if the first thing to translate is in brackets, it ignores it!

Also if a number for a letter is 0, it was causing the calculation to be rejected.

It still rejects then whole part of the sum if you try to divide by 0 though.

 

Simon

Link to comment

Sorry folks, not been on the forum for a bit.

 

The multiple selection thing a'la the Palm version is in development, but work got in the way! Typical eh....

 

I'll get back to it soon, maybe over this long weekend, watch this space!

 

I'll add copy and past to all text boxes, just for you! :blink:

 

Simon

Link to comment

Would it be poaasable to provide a save as button so as to enter multiple sets of calcs, for a days cacheing, then enter the raw coords at home before set off then, when on site and gathering clues reload the calcs for that particular site, it would cut down on cut and paste and also allow the building of some calcs that sometimes have the data in the form,

 

e.g.

 

51 0a.bcd

01 0e.fgh

 

d=a-h

f=b+a-e

 

etc., had one like this yesteday and it took me ages and a pen and paper to work out the brackets in the pouring rain.

 

BTW Have you thought of making it shareware im sure contributions would be forthcoming.

 

The palm version does that, or somthing similar.

I was in the middle of re writing this one to do the same but life got in the way and I haven't touched the code for ages.

 

For the example above, you could have changed the code to

51 0a.bc(a-h)

01 0e.(b+a-e)gh

 

Which I think would have worked!

 

Thanks for the vote of confidence that it may be worth something, I'll not charge for it as I've had so much good information from this site and so much fun from the hobby I'd like to think I was giving something back.

 

Simon

Link to comment

Would it be poaasable to provide a save as button so as to enter multiple sets of calcs, for a days cacheing, then enter the raw coords at home before set off then, when on site and gathering clues reload the calcs for that particular site, it would cut down on cut and paste and also allow the building of some calcs that sometimes have the data in the form,

 

e.g.

 

51 0a.bcd

01 0e.fgh

 

d=a-h

f=b+a-e

 

etc., had one like this yesteday and it took me ages and a pen and paper to work out the brackets in the pouring rain.

 

BTW Have you thought of making it shareware im sure contributions would be forthcoming.

 

The palm version does that, or somthing similar.

I was in the middle of re writing this one to do the same but life got in the way and I haven't touched the code for ages.

 

For the example above, you could have changed the code to

51 0a.bc(a-h)

01 0e.(b+a-e)gh

 

Which I think would have worked!

 

Thanks for the vote of confidence that it may be worth something, I'll not charge for it as I've had so much good information from this site and so much fun from the hobby I'd like to think I was giving something back.

 

Simon

 

To clarify, Simon meant that the Palm version allows for multiple sets of calcs, so you can save them for when you return to that cache.

 

It does not allow for sub-calculations. You would have to substitute the values in the main calc as Simon suggests.

 

I also agree with Simon, I wrote it to contribute, so I will never charge for it (unless you want to buy me a pint if you meet me :blink: ).

 

Andy

Link to comment

I've used "Coordinates" on my Palm based Garmin iQue 3600 on the (very) few occasions I do Multi's. I've had it for some time now and "it works for me" :P. It will save each separate cache stage (numbers) that you have found.

 

Can't recall where I got it from but an earlier post in this thread mentioned the same prog. :D

Link to comment

I'm a big fan of the program and use it regularly. I agree that sub calculations can be bracketised but this is hard to do sitting under a bush in the wind and rain. The ability to define calculations in advance, for several caches, while in the comfort of home, and then load them in the field would be excellent.

Link to comment

Yes it would work, which is all very well for one calc, then however when you went on to the next one you would have to enter the raw data in the field which would possably mean a pen and paper,

 

Look at this one

 

 

Click here!

 

with the wind and rain, I dont want to do this on the fly I would like to do it at home and save it and then reload at the cache, Thoughts please.

 

Crikey :huh: I see what you mean!

 

All right, I'll dig out the code again and see what I can come up with. Don't hold your breath though!

 

Simon

Link to comment

It's come together a bit quicker than I thought it would so I'll be puting up a beta tonight after I've tried it on my PDA.

 

It's still written for 2003 but as it's using .Net 2, it will probably work on WM5 but I can't try that out.

 

Anyone using the old version, I suggest backing up your PDA and uninstalling the old one manually first.

You can also remove the extra controls I included as .Net 2 includes copy and past functionality by default.

 

If anyone has any comments or errors on the beta let me know with as much detail as possibly and I'll try to fix it for you.

 

Simon

Link to comment

Ahem, Only just got home so NOW I can upload the new version! :drama:

 

If you check the page again you will find another line with a link to the beta version.

 

Multicalc with new version

 

Let me know any issues it has.

 

Oh and no, you have to take off the N and E yourself as there may well be those letters in the coordinates!

 

Simon

Edited by SimonC_Here
Link to comment

The error is something to do with permissions on the directory you put the exe into.

I've tried it under the standard "Program Files" dir and on the SD card and it works from there. Where did you put the Exe the first time?

 

I know about the problem with the 3 numbers in 1 bracket. Its been around since the first one I think. I may have a look into it at some point as The Royals version does it properly, or you can change it to ((F+A)+D) which should work.

 

Glad it works on WM5. did either of you need to install .Net framework 2?

 

Simon

Link to comment

I've fixed the (3+2+1) problem. It now calculates the sum.

Watch for (a+b*c) thought.

 

if

A = 2

B = 3

C = 1

 

(A+B*C) = 5

Like this is will calculate properly,

However; if you have (a*b+c) it will work out as 8 where it should be 7

 

You can get around this by adding the correct brackets.

((a*b)+c) = 7

I'm currently trying to get the list on the front screen sortable so you might want to skip this and wait until I've done that.

 

Just replace the exe, and it should be fine.

 

Simon

Edited by SimonC_Here
Link to comment

I've fixed the (3+2+1) problem. It now calculates the sum.

Watch for (a+b*c) thought.

 

if

A = 2

B = 3

C = 1

 

(A+B*C) = 5

Like this is will calculate properly,

 

 

the given example doesn't actually make a difference which way round you do the calc..!

 

ie

 

(A+:)*C = 5

A+(B*C) = 5

 

does it actually do the multiplication first? ie, changing C to = 2, do we get...

 

A+(B*C)=8 (the mathematically correct solution)

or

(A+:ph34r:*C=10 (possibly the way a PC might do it!)

 

I could find out myself but I can't be bothered to find the PPC at the moment! And I thought it might be useful for others to know! As you say, its an easy workaround by putting the appropriate brackets in!

 

Many thanks for the prog - I may get to use it in anger if I get out caching sometime soon! :)

 

Dave

Link to comment

Most computer languages parse mathematical symbols based upon importance. (for anyone interested, here's one list)

In this case, the parsing seems off, most likely due to the way its been programmed rather than a limitation of the language.

 

Oh, I freely admit it's my programming! :rolleyes:

 

If you fancy supplying me with a vb.net function or class that takes a string in the format "([some equation but no brackets])" and returns the corect answer I will be heartily greatful.

 

[edit] ignore me, I'd forgotten about datatables. Instead of writing a BODMAS parser manually, the datatable's expression property does it for you. Bonus for .Net![/edit]

 

I've added the sorting which, when I upload it TONIGHT, will be Beta version 3.

 

Simon

Edited by SimonC_Here
Link to comment

Since the cut and paste functionality on CacheMate is not good, it ocurred to me that the PC is a much better place to be doing that stuff anyway. How about a PC program that can read and edit the data files used by Simon's utility. That way on the PC you could cut and paste equations from the original cache pages and create the datafile in advance. Then download it onto the PDA where you can choose which to run.

Link to comment

Since the cut and paste functionality on CacheMate is not good, it ocurred to me that the PC is a much better place to be doing that stuff anyway. How about a PC program that can read and edit the data files used by Simon's utility. That way on the PC you could cut and paste equations from the original cache pages and create the datafile in advance. Then download it onto the PDA where you can choose which to run.

 

Actually the multicalc.exe program will run on XP as long as .Net 2 is installed.

Just copy the exe to your desktop and run it from there. It will save/load the data file to the desktop as well.

 

Accidently double clicked on my dev copy on my computer and it started up!

 

Not tried all the things on it but it should work.

 

Simon

Link to comment

Bug report 1

Entries deleted from the list return from the dead.

 

1. Create a number of entries, delete one of them, then immediately exit from the program.

2. Re-start the program and the deleted entry will have returned, because it persists in the data file.

 

Workround

Once an entry has been deleted from the list it is necessary to select one of the others, view it, and then press "save". This overwrites the data file with a version in which the unwanted entry no longer exists.

 

(edited to say RTFM)

 

Bug report 2

When the "X" button is tapped, instead of remaining suspended in memory, the program genuinely terminates and is no longer present on the Windows task list. When re-run it must start again from cold. (WM5.0)

Edited by McKryton
Link to comment

Bug report 1

Entries deleted from the list return from the dead.

 

1. Create a number of entries, delete one of them, then immediately exit from the program.

2. Re-start the program and the deleted entry will have returned, because it persists in the data file.

 

Workround

Once an entry has been deleted from the list it is necessary to select one of the others, view it, and then press "save". This overwrites the data file with a version in which the unwanted entry no longer exists.

 

(edited to say RTFM)

It's a feature?! :(

 

I left it like that primarily because I didn't want to be saving the xml file every time you delete a record as you might want to delete a load in one go and I hate the "Saved sucessfully" popups. Also if you delete the wrong one you can get it back!

 

So if you delete a record or 10, click the save button (in the file menu).

 

Bug report 2

When the "X" button is tapped, instead of remaining suspended in memory, the program genuinely terminates and is no longer present on the Windows task list. When re-run it must start again from cold. (WM5.0)

 

I'm not sure what it looks like on WM5, but on 2003 it is an OK button which intentionally terminates the program. Personally I hate the way programs hang around when you click on the X and have a program running in the background that kills them properly.

It can be changed, but there are ways around it. "Start" -> "Today screen" is the one I use.

 

Let me know.

 

Simon

Edited by SimonC_Here
Link to comment

The behaviour always seemed odd to me too but it's part of the Windows Mobile design philosophy that once started, an application does not terminate when "closed" but remains running in the background. If running short of resources, the OS will automatically shut down the oldest inactive application. I flagged this as a bug only because the behaviour of the new version differs from the original.

 

btw. It seems inconsistent that substitutions involving "N" are ignored but those involving "S", "E" and "W" are calculated.

Link to comment

 

When the "X" button is tapped, instead of remaining suspended in memory, the program genuinely terminates and is no longer present on the Windows task list. When re-run it must start again from cold. (WM5.0)

 

I have a program that forces ALL programs to terminate properly, cos I actually prefer that! One man's bug is another man's.... you get the idea! :(

Link to comment

The behaviour always seemed odd to me too but it's part of the Windows Mobile design philosophy that once started, an application does not terminate when "closed" but remains running in the background. If running short of resources, the OS will automatically shut down the oldest inactive application. I flagged this as a bug only because the behaviour of the new version differs from the original.

 

You are right, I suppose I should stick to the design rules. I'll change it tomorrow. There is still the file -> exit route to get out cleanly.

and if you're like purple_pinapple you've already got a program to close it properly for you!

 

btw. It seems inconsistent that substitutions involving "N" are ignored but those involving "S", "E" and "W" are calculated.

 

Can you give me a calculation that is causing a problem please, I just put in n(n+a) with n=4 and a=2 and got 46 as expected.

 

Thanks

 

Simon

Edited by SimonC_Here
Link to comment

Hi Simon

 

Lat = (a+:((c-d) (e+f)(g-h).(i+j)(k-l)(m+n)

Lon = (a-:P(c+d)(e-f) (g+f)(i-j).(k+l)(m-n)(o+p)

 

A to P all have value = 1

 

Answer

Lat 20 20.20(1+N)

Lon 020 20.2(1-N)2

 

And of course the tool is now refusing to repeat the stunt and is working correctly

(I'm running it on my PC (Win XP))

Link to comment

And of course the tool is now refusing to repeat the stunt and is working correctly

(I'm running it on my PC (Win XP))

 

Ah one of *those* bugs... :P:(

 

I have found a school boy coding error though. I forgot to put scroll bars on the list so if you put too many coords on, you can't see them!

 

Will fix that and upload it tomorrow.

 

Simon

Link to comment

Apologies for the blame directly on you. I didn't intend it personally, and I understand how difficult this sort of programming can be.

I was primarily replying to purple_pineapple's post that its not how most computers work, they're not as dumb as they seem!

 

No offense taken, It was just lazy coding. It works now (I hope) and in about 5 lines of code rather than 40!

 

Simon

Link to comment

Apologies for the blame directly on you. I didn't intend it personally, and I understand how difficult this sort of programming can be.

I was primarily replying to purple_pineapple's post that its not how most computers work, they're not as dumb as they seem!

 

No offense taken, It was just lazy coding. It works now (I hope) and in about 5 lines of code rather than 40!

 

Simon

 

New and possibly final version. It still says beta 3 though :P .

 

Scroll bars work properly on the list view and the app now stays running if you hit the X in the top corner.

You can still kill it using File -> exit

 

Simon

Link to comment

Hi I have just installed V2.0 Beta 3 on my PDA running WM5 and Microsoft .Net CF 2.0

I removed an earlier version of both the programs before doing this.

 

Everything is working great - but I don't seem to be able to copy text from Cachemate - (I think I could before using Ctrl C)

 

Does anyone have any ideas (I can copy and paste from other programs) or is it a cachemate thing?

 

Thanks

Link to comment

Yeah it's not exactly a Cachmate problem, it's Microsoft's buggy version of IE for pocket PC. You can copy and paste from Cachemate, you just need to go to Edit rather than view.

 

Or you can do it from home before you set out.

 

Simon

 

Thanks Simon - Copy and paste from the edit option on cachemate works fine.

 

I am looking forward to trying it in 'the wild'

 

Steve

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...