User talk:Demivec: Difference between revisions
Content added Content deleted
No edit summary |
(Blanked the page) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<pre> |
|||
Demivec |
|||
thank you. |
|||
you did not offend me. |
|||
please note i have not finalized my solutions. |
|||
i will be going over each one continuously looking to make improvements. |
|||
i do not wish to shotgun this site with half-baked code. |
|||
for instance: i realized this morning that i may have cheated on the color quantization task. |
|||
and that one is FAR from finished. |
|||
i personally have to work on multiple problems at the same time or i usually will get stuck on one. |
|||
i also can not personally read nested code very well since my first esposure to computers was with spreadsheets. |
|||
regarding the tools i use an example might make the connect with spreadsheets clearer. |
|||
say i wanted to build an array from: [without typos] |
|||
int U[][9] = {{ 1, -2, 2, 2, -1, 2, 2, -2, 3}, |
|||
{ 1, 2, 2, 2, 1, 2, 2, 2, 3}, |
|||
{-1, 2, 2, -2, 1, 2, -2, 2, 3}}; |
|||
steps: |
|||
1] a little cleaning |
|||
here i could use a datasection but not for multi-dim arrays [i think] |
|||
1, -2, 2, 2, -1, 2, 2, -2, 3} |
|||
1, 2, 2, 2, 1, 2, 2, 2, 3} |
|||
-1, 2, 2, -2, 1, 2, -2, 2, 3} |
|||
2] build my mask |
|||
U(1,~1)=~2:U(2,~1)=~3:U(3,~1)=~4 |
|||
9 <--- hightlight 9 and hit f12 |
|||
3] generate indices to clipboard and output pane |
|||
U(1,~1)=~2:U(2,~1)=~3:U(3,~1)=~4 |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
|||
5 |
|||
6 |
|||
7 |
|||
8 |
|||
9 |
|||
4] break data into columns |
|||
1, -2, 2, 2, -1, 2, 2, -2, 3} |
|||
1, 2, 2, 2, 1, 2, 2, 2, 3} |
|||
-1, 2, 2, -2, 1, 2, -2, 2, 3} |
|||
a] highlight commas |
|||
b] hit find/replace toolbar icon |
|||
c] select tool "chr(10)" from tools menu |
|||
d] hit enter |
|||
e] reselect result and replace } with chr(10)+"^" [note the chr(10) is still in the replace with field] |
|||
5] build it [the tool is called BuildExtractMake.exe] |
|||
a] ~1,~2,... the columns to fill |
|||
b] ^ the number of rows delimiter |
|||
U(1,~1)=~2:U(2,~1)=~3:U(3,~1)=~4 |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
|||
5 |
|||
6 |
|||
7 |
|||
8 |
|||
9 |
|||
^ |
|||
1 |
|||
-2 |
|||
2 |
|||
2 |
|||
-1 |
|||
2 |
|||
2 |
|||
-2 |
|||
3 |
|||
^ |
|||
1 |
|||
2 |
|||
2 |
|||
2 |
|||
1 |
|||
2 |
|||
2 |
|||
2 |
|||
3 |
|||
^ |
|||
-1 |
|||
2 |
|||
2 |
|||
-2 |
|||
1 |
|||
2 |
|||
-2 |
|||
2 |
|||
3 |
|||
6] clean up |
|||
now the connection to spreadsheets becomes clear. |
|||
dim U(3,9) |
|||
U(1,1)= 1:U(2,1)=1:U(3,1)=-1 |
|||
U(1,2)=-2:U(2,2)=2:U(3,2)= 2 |
|||
U(1,3)= 2:U(2,3)=2:U(3,3)= 2 |
|||
U(1,4)= 2:U(2,4)=2:U(3,4)=-2 |
|||
U(1,5)=-1:U(2,5)=1:U(3,5)= 1 |
|||
U(1,6)= 2:U(2,6)=2:U(3,6)= 2 |
|||
U(1,7)= 2:U(2,7)=2:U(3,7)=-2 |
|||
U(1,8)=-2:U(2,8)=2:U(3,8)= 2 |
|||
U(1,9)= 3:U(2,9)=3:U(3,9)= 3 |
|||
since the entire purpose of a computer program is to take input and provide output... |
|||
how any programmer lives without BOTH input AND and output panes is hard for me to understand. |
|||
that's where all the experimentation takes place and that is the joy of programming. |
|||
the final results of that experimentation belong within an IDE to be organized and shared. |
|||
every IDE i have including VS2010 ultimate seems designed to take the joy OUT of programming. |
|||
so until the tasks are finalized... it is much easier for me to leave them with |
|||
ConsoleWrite[Type](Type) < cw[Type](Type) ~ "Debug" |
|||
StdOut[Type](Type) < so[Type](Type) ~ "Debug" commented. |
|||
but when they are "IDE ready" i will "clean'em up" |
|||
take care... brianO |
|||
</pre> |