yashsingh1/xdaforums huggingface dataset:
[EVO 4G Q&A, Help & Troubleshooting] iggogg:
I had the same problem: http://xdaforums.com/showthread.php?p=16398845

Powered off the phone and went to bed. No sign of problems, battery life has been great, 50% charge on the phone. Woke up and it wouldn't budge. Took me a minute to figure out that it was the battery. Once I did, went to the Sprint store and they tested it, confirming it was dead. They replaced it quickly, no questions, no charge.
[Windows Mobile Software Development] Tribulattifather:
Here are the algorithms:

Points Plus = protein/10.94 + carbs/9.17 + fat/3.89 - fiber/12.49

Points Regular = calories/50 + fat/3.89 - fiber/5
[Windows Mobile Software Development] Corwin9S:
can you post printscreen of the others applications ?

just to know if it's only a "basic" formula calc or not
[Windows Mobile Software Development] Tribulattifather:
Here ya go mate, here's the old app from 2004:
[Windows Mobile Software Development] Corwin9S:
invalid attachment...

by the way, is it only a calculator ?
[Windows Mobile Software Development] deedee:
OK, this is really rough and ready. My first WM app so be gentle. Just a plain exe file, copy to device and run.

If it works I will try and "tart" it up a wee bit.
[Windows Mobile Software Development] Tribulattifather:
Wow, thank you. It works very well. Would you be willing to share your work/source code so i can learn what you did?
[Windows Mobile Software Development] deedee:
Here's a slightly prettier version.

I'll put the code etc up sometime tomorrow, but it basically is four text boxes with a button that converts each to numeric, applies the formula and shows it in the fifth text box.
[Windows Mobile Software Development] Tribulattifather:
This is all that I need. Thank you very much for your work.

I can't wait to take a look at the source ^>^
[Windows Mobile Software Development] ajhvdb:
So you have to type this all in, before you can eat it? Or do you need this the calculate a total per day?
[Windows Mobile Software Development] Tribulattifather:
I suppose one could do it this way but what I do is write the food i eat down as i eat it, then i calculate all the ponts later.

If i have too many points then i know to get rid of the foods with exessive points for the next day.

My particular goal is to eat well without tracking points - to train my mind to want healthy food choices.
[Windows Mobile Software Development] deedee:
Yup, the initial request was for a calculator to use on an item by item basis, which is what I have done.

The delay in releasing anything is that I got distracted by making it also do the old points scheme as well, which is nearly done. Hope to have a new exe file later tonight.

Are there any differences I should be aware of with regards to US and UK calculations?
[Windows Mobile Software Development] deedee:
OK, here's the latest version.

Does both old and new systems
[Windows Mobile Software Development] mlbear:
maybe need to change name

WW are very strick on anything named with Weight Watchers. But this app is so great and I thank you so much.
[Windows Mobile Software Development] Tribulattifather:
Interesting hypothesis: Letting users feel free to track the old way and the new way.

Also, the US way to calculate was the formula I gave on the first post.. Not sure what the UK way would be..

Would you still be willing to upload your source for the second and third .exe you created, out of the three you have ? ^>^

EDIT: How about the name WW4WM? Also, I think you should make this 'prettier' and try to get it sponsored by Omarket and XDA Marketplace.
[Windows Mobile Software Development] deedee:
I've created a place for this on SourceForge

Link here.

When I can work out how to post the code there I will do so, in the meantime here's a zip of the entire DotNet tree. Only includes the latest version.
[Windows Mobile Software Development] Corwin9S:
good job.

hope you will not have any probs with WW !

I've begin to do one too, but as you're the first releaser I give you the hand

;-)

i've included a possibility to have an .xml file in which you can add foods with some numbers and you can select this food in a droplist and then all fileds are prefilled.

maybe you can do something like that.

keep up this good job !
[Windows Mobile Software Development] deedee:
Thanks for the support, unfortunately I have sort of reached my developers skill limit for the moment.

Currently trying to work out how to do rounded buttons so the app looks nicer!
[Windows Mobile Software Development] Tribulattifather:
I can't wait to try your release too, corwin. I will try it s soon as released.

I plan on learning from your code too, dee.

Thank you both for all your work for my request.
[Windows Mobile Software Development] Corwin9S:
if anyone is interested i'll keep making, but i don't want to steal jobs from deedee !

can you give me some more infos ? like what is in the "options" menu ?

and if you can give me a list of some predefined foods with already some values in "calories", "fat" and "fibers"...
[Windows Mobile Software Development] deedee:
Feel free to carry on, it sounds like your skills are much better than mine. This was my first WM program and so is very "simplistic".

I'd like to see how other things are done as it progresses.
[Windows Mobile Software Development] stephj:
Nicer buttons: It's a bit of an old post, but try post #3 in here.

http://xdaforums.com/showthread.php?t=499621
[Windows Mobile Software Development] Corwin9S:
so, here is my first release.

For not to mix up with WW4WM, I've named it 3WM (WeightWatchersWindowsMobile).

The language used is eVB, so you will need to have the runtimes installed. I've embedded all needed in the .cab file

Tests made :

- WM6.1 french, WQVGA = OK

- WM6.1 english, WQVGA = OK

- WM6.5.3 french, WQVGA = OK

- WM6.1 english, QVGA = OK

The graphics, buttons,... have to be normally redimensionnend in WVGA screens...

So, now... please do your feed-backs and tests ! Thanks

Changelog

17.01.2011 - v0.1

First release with

- upload items of food per xml file

- update dividers for formulas per xml file

- sounds

- only in english

To Do

- change standard buttons with glossy graphics

- implement other languages

- implement options tab

- add option to force loading (or not) the .xml food list

- add option to mute sounds

- add option to autocalculate (or not) if food item is selected

*- limit boxes to numerical entries (not only for calculating)

*- add a maximum points per day (MAPPED) and maximum points plus per day (MAPPPLED)

*- add option to remember points eaten and make addition (and warning)

Use

- fill fields with values for calculation

- hit "CALCUL" to do the calculation

- read values in PointsPlus and Points

- clic the LF (Load Food) button to load prefilled food items

- clic the + button to add prefilled food items for quick calculation

More details here : http://www.i900playeraddict.com/ddl/3WM/ReadMe.txt

Use of .xml file

It's possible to add predefined food items, with fat, fibers, proteins and carbons infos and details. For now, I've made two simple examples (totally fun and wrong), "Tomates" and "Steak"...

Attention, the name HAVE to be ingredients.xml in the xml_files folder

A.

Ingrédients

- if you want to add any item, please use this template :

<item>
<nom>
name of food item
</nom>
<cal>
value of calories/carbons of food item
</cal>
<fat>
value of fat of food item
</fat>
<fib>
value of fibers of food item
</fib>
<prot>
value of proteins of food item
</prot>
</item>

B.

Options dividers

in the same file, you can modify the values of formulas dividers :

<nb_calorie>
divider for calories/carbons
</nb_calorie>
<nb_protein>
divider for protein
</nb_protein>
<nb_fat>
divider for fat
</nb_fat>
<nb_fiber>
divider for fibers
</nb_fiber>

Beware that the decimal separator have to be a point .

Printscreen

Download
[Windows Mobile Software Development] deedee:
Works for me, use a picture box as a button image.

Having had a quick look at Corwin9S efforts I am going to file mine as closed. It was a worthwhile learning curve all the same.

Corwin

If you need different resolutions to test on, let me know, I have QVGA, WVGA and HVGA to hand.
[Windows Mobile Software Development] Corwin9S:
I usually use pictureboxes as buttons too, with a change of picture in the onclick (like i did in CpteMoi for example). It's ok, but it's quite easiest to use standard button... if you do not want graphicals aspects !

:-)

for resolutions tests, feel free to use the given .cab, I've already implemented the automatic redimensionnement of controls...
[Windows Mobile Software Development] Corwin9S:
just for given more infos about formulas :

Sources:

http://www.diet-blog.com/06/weight_watchers_points_top_secret.php

http://www.diet-blog.com/10/weight_watchers_points_plus.php
[Windows Mobile Software Development] Corwin9S:
well... do I have made a so perfect thing that no one wanted to test and to give feed-backs? or everything are so damn good ?

let me hesitate about that...

:-)

by the way, I'm open to have graphics... but due to the old evb language used, they have to be .bmp in 256 colors. So if they are pixel-magicians...
[Windows Mobile Software Development] deedee:
Can't help with the graphics, but I am going to try and write something for the PC to convert a CSV file into your XML one.
[Windows Mobile Software Development] deedee:
OK, here you go, one conversion program

Edit nutrition.csv to include all the foods you require in the drop down. It is capable of coping with commas in the description. If there are commas in the description, enclose this text in quotes.

Put the exe file in the same folder as "nutrition.csv". It will convert the contents of this file into "import.xml" in the same folder. Contents of this just need to copy/pasted into "ingredients.xml" and copied to the device.

One observation on the 3WWM program, it could do with idiot checks to ensure only numbers are in the boxes.

Oops, forgot the attachment.
[Windows Mobile Software Development] Corwin9S:
great job for the conversion program! you maybe can improve it in doing the option to recreate the whole ingredients.xml file. because in the ingredients.xml file, it should exist the infos for dividers (even if not presents the default values will be used), but most important, the ingredients.xml file have to be correctly enclosed with tags. So if you load existing one, add the new values made and then recreate a whole ingredients.xml file, this will be perfect!

You can make your conversion program in two "screens", the first one to edit main infos (in the "infos" tag) and the second one to edit food infos (in "item" tags).

I also have had an idea to put a "maximum points per day".

for the boxes, it allow you to put non numerical values in, but if you try to make the calculation, it will not allow you to and give you a warning. but you're right, I will modify the boxes for not being able to put something else as numbers.

any other feedbacks?
[Windows Mobile Software Development] deedee:
any chance of the code to read the xml file? save me reinventing the wheel to load it into the editor.
[Windows Mobile Software Development] Corwin9S:
hi. here you are for the code. But I don't know if you could use it, because it's in eVB

Option Explicit

Public Function ListingIngredients()

Dim wItem As ListItem

Dim i As Integer

Dim xDoc As DOMDocument
Dim xFile As File
Dim wBuffer As String
Rem Instanciation des objets
Set xDoc = CreateObject("Microsoft.XMLDOM")
Set xFile = CreateObject("FileCtl.File")
Call xFile.Open(Items_xml, _
fsModeInput, _
fsAccessRead, _
fsLockRead)
wBuffer = xFile.Input(xFile.LOF)
Call xFile.Close
Set xFile = Nothing
xDoc.async = False
Call xDoc.LoadXML(wBuffer)

Dim wList As MSXML.IXMLDOMNodeList
Set wList = xDoc.getElementsByTagName("item")

Dim wElement As MSXML.IXMLDOMElement
Dim wElementChild As MSXML.IXMLDOMElement

' items counter
Dim kk As Integer
kk = 0

For i = 0 To (wList.length - 1)
For Each wElementChild In wList.Item(i).childNodes

'wElementChild.Text = content of the present tag
'wElementChild.baseName = title of the present tag

kk = kk + 1

End If
Next
Next

If kk < 1 Then
MsgBox "No items listed. Verify your .xml file." & vbCrLf & vbCrLf & _
"Maybe there is no items in 'item' nodes", vbInformation + vbOKOnly, SwName
End If

Set xDoc = Nothing

End Function
[Windows Mobile Software Development] Corwin9S:
ok guys. here is now the 0.2 version

Changelog

18.01.2011

v0.2

- changed standard buttons with glossy graphics

- implement options tab

- add option to force loading (or not) the .xml food list

- add option to mute sounds

- add option to autocalculate (or not) if food item is selected

- limit boxes to numerical entries (not only for calculating)

- add a maximum points per day (MAPPED) and maximum points plus per day (MAPPPLED)

- add option to remember points eaten and make addition (and warning)

- add possibilities to increment personal points by clicking on the results of calculation

- made a new separate config.xml file for configurations infos

If you couldn't modify the options via the options tab, you could modify the options by editing the config.xml file.

To Do

- language options

- maybe the options tab a bit less "ugly"

Feedbacks

Please, do not hesitate to give me feedbacks, suggestions,... and items for the ingredients.xml file !

Use

Its use is very simple:

- Fill in the fields for the calculation

- Click on "Calculate" to calculate

- Data points are displayed and PointsPlus

- You can preload data for certain foods if they are existing in the file ingredients.xml

- Click on the box to load data from xml files in the list

- Click the + button to fill in and do the calculation for the food chosen from the list

- The number of points by current employees is displayed under the logo of WW

- By clicking on the result of calculations, you can add points to your number of personal items

- Click on the poster to delete the field contents of calculations

- I click on the button to access options

- If the number of personal points exceeds the maximum number of points (and the display of warnings is enabled), the background changes color results

Options

The options page can seem complex, but not so much!

- Language: not yet functional

- Sounds: to enable or disable sounds when clicking

- XML to load automatically when you open the file. Xml ingredients

- Miscellaneous:

a / "AutoCalc points" to automatically calculate (and display the results) in the selection of a food in the list

b / "warn high points": change colors if the personal points exceed the maximum number of points

- MAPPED: maximum number of points per day

- MAPPPLED: maximum number of points per day

- Personal Items: The number of personal items in progress. Click "- reset -" to reset them

- Dividers: To change the values of the dividers in the formula

More details here : http://www.i900playeraddict.com/ddl/3WM/ReadMe.txt

Modifications of ingredients.xml file

Attention, the name HAVE to be ingredients.xml in the xml_files folder

A. Ingrédients

- if you want to add any item, please use this template :

<item>
<nom>
name of food item
</nom>
<cal>
value of calories/carbons of food item
</cal>
<fat>
value of fat of food item
</fat>
<fib>
value of fibers of food item
</fib>
<prot>
value of proteins of food item
</prot>
</item>

Printscreen

Download
[Windows Mobile Software Development] deedee:
I am getting there with a PC based program to edit the xml file, just to let you know I haven't forgotten things.
[Windows Mobile Software Development] Corwin9S:
cool !

have you noticed that there is now 2 different .xml files ?

- ingredients.xml which is for food items only

- config.xml which is for configuration. Those infos can be modified in the software.

I will be happy to test your PC solution which is so complementary and usefull !

Do you think you can handle editing both xml files via the PC ? will be good for those who has little screen resolutions.

About screen resolutions, can you (or someone else) test the soft in many screen resolutions ? and, of course, report feedbacks (and printscreens)... thanks in advance !

Sent using RapidRead!
[Windows Mobile Software Development] deedee:
Hi

Having an awful job writing the XML back out so have amended your structure slightly and in the process your app no longer reads it. Just my luck. :D

Can you have a look and see if its an easy fix, or should i persevere?

As for both files that shouldn't be too much of an issue once i solve the writing of XMLs.
[Windows Mobile Software Development] deedee:
Forgot to add that the configuration screen drops off the bottom of my display, i can see nothing below the boxes for calories and fat.
[Windows Mobile Software Development] Corwin9S:
hi and thanks for your job.

I've seen your .xml return and here are the mistakes which you can solve very easy

1. the names of your tags are not those used. here are yours

<Ingredients>
<ingredients>
<Name>Apple, medium</Name>
<Calories>80</Calories>
<Fat>0</Fat>
<Fibre>22</Fibre>
<Protein>0</Protein>
</ingredients>
</Ingredients>

you should made like this

<ingredients>
<item>
<nom>Apple, medium</nom>
<cal>80</cal>
<fat>0</fat>
<fib>22</fib>
<prot>33</prot>
</item>
</ingredients>

simply change those

Ingredients (first one) to ingredients

ingredients (the second) to item

Name to nom

Calories to cal

Fat to fat

Fibre to fib

Protein to prot

2. try to have the tag names all in small letters.

3. try to put a line carriage return before after each tag, it will be quite eaysier to read the .xml file after creation (if readed with notepad for example)

4. can you add this lines under the opening "ingredients" tag, at the top of the file ?

<infos>
<date>18.01.2011</date>
</infos>

and putting between the date and /date tags the date of the creation of the .xml file ?

5. in attachment I've putted a .xml file example with having made the replace and a printscreen of the loaded result.

6. beware that you HAVE to save your new ingredients.xml file in the ANSI format, nothing other. Else it will not be uploaded...

For your screen, if I good understand, you do not see proteins and fibers boxes ? Which configuration do you have ?

It's not really easy to put all those configurations and choices on one single options page... maybe making 2 pages ?

tx
[Windows Mobile Software Development] deedee:
OK, first attempt at import and export file program, it is still a wee bit rough, it doesn't handle special characters very well.

Export currently doesn't do the infos field, thats for later today.

The config file lis equally for another day.

My screen res is HVGA, 320x480
[Windows Mobile Software Development] Corwin9S:
great release.

the ingredients.xml file created is just simply working. :-)

for special chars, as it's ANSI... we can try to avoid them.

I will also redo the size of font in the droplist, because in wqvga it's kinda too big.

for your screen resolution, well... can you take a screenshot of main screen and one of options, please`? I will have a look at the code, but it seems I will need to redo some calculations, even for having the soft in landscape mode (only portrait for now).
[Windows Mobile Software Development] deedee:
Here you go, two screen caps.

I am going to try and get the config xml load sorted over the weekend.

Then i can work on the editing and saving changes.
[Windows Mobile Software Development] deedee:
May seem like a silly request but is it possible to get the config xml surrounded by <config> </config> tags?

<config>
<infos>
<nb_date>1/18/11</nb_date>
<filetype>base</filetype>
<nb_calorie>9.17</nb_calorie>
<nb_protein>10.94</nb_protein>
<nb_fat>3.89</nb_fat>
<nb_fiber>12.49</nb_fiber>
<autoxml>no</autoxml>
<sons>no</sons>
<mapped>220</mapped>
<mapppled>280</mapppled>
<autocalc>yes</autocalc>
<warn>yes</warn>
</infos>
</config>

It's so much easier to process as its then the same format as the ingredients file.
[Windows Mobile Software Development] Tribulattifather:
Wow, guys. Just wow.

I can't believe you two have turned my request into an app like this.

ʐ(^ʖ^)ᖨ
[Windows Mobile Software Development] Corwin9S:
@deedee

ok. I've modifed the sequence to recreat the config file after editing it in the soft. It's now like that :

<config><infos>
<date>1/22/11</date>
<filetype>base</filetype>
<nb_calorie>9.17</nb_calorie>
<nb_protein>10.94</nb_protein>
<nb_fat>3.89</nb_fat>
<nb_fiber>12.49</nb_fiber>
<autoxml>yes</autoxml>
<sons>no</sons>
<mapped>10</mapped>
<mapppled>10</mapppled>
<autocalc>no</autocalc>
<warn>no</warn>
</infos></config>

as you wanted.

@Tribulattifather

you're welcome. Happy to see you're happy with this!

Do you have tested it ?

What are your feedbacks ?

Does it already fits your needs ?

@3WM

ToDo list for versin 0.3

- implement other languages

- rewrite options pages (for more compatibilities)

ok- change config.xml tags

- visual confirmation for adding personal points

- modify disclaimer

- modify logo

Abandonned modifications

- landscape mode

- smaller resolutions as 320x240
[Windows Mobile Software Development] Tribulattifather:
I like it just the way it is. As I don't need more than the points calculator.

My other feedback would be to make sure the algorithm for the regular points system is correct:

1.) Divide the calories by 50.

2.) Divide the total fat grams by 12.

3.) Add the values from Steps One and Two to get the value of "X."

4.) Divide the dietary fiber grams by 5 to equal "Y."

5.) Take "X minus Y" to find the point value of the food item. Round up values higher than .5 and round down for values lower than .5.

If you abandon 320x240 then I am out of luck; my device is QVGA :(

Please continue developing for my device..
[Windows Mobile Software Development] Corwin9S:
i will check the formula again.

for the resolutions, I mean that I will not ensure that resolutions smaller than 320x240 will be ok. I will redraw a little bit the main screen for fitting correctly with 320x240
[Windows Mobile Software Development] Tribulattifather:
@Corwin9S

Thank you very much.

I really appreciate this.

@DeeDee

Would you be willing to write me a little tutorial on how to use the project files that you uploaded to sourceforge?

I really would like to take a look at what you did.

And what programs do I need to buy/download for all this to work.

I already have M$ Visual Studio Pro 2010(Installing it right now), .Net Framework 4 installed, Adobe CS4 Master Collection, Microsoft Visual C++ 2005, 2008 and 2010. But i'm sure that there is something else I am missing..
[Windows Mobile Software Development] deedee:
I am still working on the PC based editor, but as far as the WM version goes, unzip it all into a folder and then open the .sln file in Visual Studio and then hopefully all will become clear. I think everything has sensible names.

My developing is done in VS2005, Visual Basic portion as I have "upgraded" from VB6.
[Windows Mobile Software Development] deedee:
The formula I was using is

Points = Cal/50-(MIN(Fibre,4)/5)+(Fat/12)

only the first 4g of fibre counts.
[Windows Mobile Software Development] deedee:
OK, first release of the editor.

If it finds either config.xml or ingredients.xml in the same directory then they will be loaded.

Also included is a nutrition.csv file as a template for creating the import file.

To edit any field double click it and then change the text/value/tick status.

Special characters, aka non alphanumeric are read in as dingbats. It's on the list of things to fix.