News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

chess engine

Started by daydreamer, July 10, 2019, 03:43:16 AM

Previous topic - Next topic

jj2007

#15
Quote from: AW on July 14, 2019, 02:44:56 PMAnd you show a double quote at the start of each line, only God knows why.

That's a bug indeed, I'll have to investigate. The rest is nonsense.

P.S.: That WHO csv file is kind of malformed, as it uses quotes where there is no need for quotes. If you open it in Excel and save it, the quotes will be removed.

In MasmBasic, there is a simple workaround: A Csv2Tab right after the Recall. Works perfect.

As always, csv is a can of worms.

aw27

Quote from: jj2007 on July 14, 2019, 07:50:48 PM
The rest is nonsense.
It's common sense, but that's OK  :thumbsup:. Note that with Powershell you can do it, and even change the table titles:


$desiredColumns = 'country','year', 'e_rr_pct_new','e_rr_pct_new_lo','e_rr_pct_new_hi','e_mdr_pct_rr_new','source_rr_ret','source_drs_coverage_ret'
$web = New-Object Net.WebClient
$web.DownloadString("https://extranet.who.int/tme/generateCSV.asp?ds=mdr_estimates") | ConvertFrom-Csv | Select $desiredColumns | Format-Table -AutoSize Country, Year, @{L='Header1';E={$_.e_rr_pct_new}}, @{L='Header2';E={$_.e_rr_pct_new_lo}}, @{L='Header3';E={$_.e_rr_pct_new_hi}},@{L='Header4';E={$_.e_mdr_pct_rr_new}},@{L='Header5';E={$_.source_rr_ret}},@{L='Header6';E={$_.source_drs_coverage_ret}}


Output:


country                                              year Header1 Header2 Header3 Header4 Header5      Header6
-------                                              ---- ------- ------- ------- ------- -------      -------
Afghanistan                                          2017 3.7     2       5.9     79      Model
Albania                                              2017 2.3     0.64    5.8     100     Surveillance National
Algeria                                              2017 2.5     1.1     4.3     67      Model
American Samoa                                       2017 2.3     0.86    4.4     78      Model
Andorra                                              2017 0       0       98      100     Surveillance National
Angola                                               2017 2.5     1.1     4.3     67      Model
Anguilla                                             2017 2.3     0.79    4.5     83      Model
Antigua and Barbuda                                  2017 2.3     0.79    4.5     83      Model
Argentina                                            2017 2.3     1.3     3.8     94      Survey       National
......
United Kingdom of Great Britain and Northern Ireland 2017 1.4     0.93    2       86      Surveillance National
United Republic of Tanzania                          2017 0.9     0.3     1.5     100     Survey       National
......
Zambia                                               2017 1.1     0.34    2.3     27      Survey       National
Zimbabwe                                             2017 4.6     3       6.2     39      Survey       National

aw27

Quote from: jj2007 on July 14, 2019, 07:50:48 PM
P.S.: That WHO csv file is kind of malformed, as it uses quotes where there is no need for quotes. If you open it in Excel and save it, the quotes will be removed.

You can only insert the double quotes when they are escaped, i.e, if you have 3 double quotes in a row.

jj2007

If you like this kind of stuff, try this UN database. Line 42257, for example (WB Staff estimates) is interesting. The correct decoding of column 1 would be

WB Staff estimates. Cambodia Poverty Assessment 2013 "Where Have All The Poor Gone?",  May 2013. Cambodia Socio-Economic Survey 2009.

aw27

Quote from: jj2007 on July 15, 2019, 01:07:24 AM
If you like this kind of stuff, try this UN database. Line 42257, for example (WB Staff estimates) is interesting. The correct decoding of column 1 would be

WB Staff estimates. Cambodia Poverty Assessment 2013 "Where Have All The Poor Gone?",  May 2013. Cambodia Socio-Economic Survey 2009.

All right, the UN database does not appear to conform to common practices.
However, the WHO.INT does appear to conform, they use double quotes even when not needed but there is nothing wrong with that.

daydreamer

thanks for showing me ways of make .exe smaller with help of fetch data from website ala Java applet way JJ&AW

so far chessboard can be made with 33 rects but also 33 2D polys are prefered because you can draw a pseudo3d chessboard chesspieces can be made with GDI 2Dpolys or ellipses&lines,trouble with make knights look good
later it maybe possible to make with 3dmeshes,could be nice to have Marinus advice on this
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

daydreamer

#21
havent got so far,3dmeshcreator unfinished
included some unfinished meshes as well
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding