good day,
i found this message:
and i want to know more about it too.
==========================================
Hey all,
example:
$s_Colors="0066FF;0066CC;3366CC;0033FF;003399;0033 66;99CCFF;3399FF;0099FF;66
99CC;336699;006699;66CCFF;33CCFF;00CCFF;3399CC;009 9CC;003333;99CCCC;66CCCC;3
39999;669999;006666;336666;CCFFFF;99FFFF;66FFFF;33 FFFF;00FFFF;00CCCC;99FFCC;
66FFCC;33FFCC;00FFCC;33CCCC;009999;66CC99;33CC99;0 0CC99;339966;009966;006633
;66FF99;33FF99;00FF99;33CC66;00CC66;009933;99FF99; 66FF66;33FF66;00FF66;33993
3;006600;CCFFCC;99CC99;66CC66;669966;336633;003300 ;33FF33;00FF33;00FF00;00CC
00;33CC33;00CC33;66FF00;66FF33;33FF00;33CC00;33990 0;009900;CCFF99;99FF66;66C
C00;66CC33;669933;336600;99FF00;99FF33;99CC66;99CC 00;99CC33;669900;CCFF66;CC
FF00;CCFF33;CCCC99;666633;333300;CCCC66;CCCC33;999 966;999933;999900;666600;F
FFFFF;CCCCCC;999999;666666;333333;000000;43dddd;65 432b;777665;4443cc;CCCCC3;
A906B0;9CC33F;C8C8C8;688888;777752;66E554;7655FF;5 55577;D4DCE8;99AECE;3A5A8A
;9A0030;EF3F6B;FFF543;C906CF;AA2222 ";
And true a function i add random colors in the string,
$s_Colors.= ";".strtoupper($_POST['colorvalue']);
then i make one array:
$a_Colors=array_change_key_case(split(";",$s_Color s), CASE_UPPER);
when i do
sort($a_Colors);
print_r($a_Colors);
or
asort($a_Colors);
print_r($a_Colors);
the values are not correct sorted..!
oke i understand the difference of the hex index so anybody idea??
Cheers,
D
================================================== = 6 4084
me wrote: good day,
i found this message: and i want to know more about it too. ==========================================
Hey all,
example: $s_Colors="0066FF;0066CC;3366CC;0033FF;003399;0033 66;99CCFF;3399FF;0099FF;66 99CC;336699;006699;66CCFF;33CCFF;00CCFF;3399CC;009 9CC;003333;99CCCC;66CCCC;3 39999;669999;006666;336666;CCFFFF;99FFFF;66FFFF;33 FFFF;00FFFF;00CCCC;99FFCC; 66FFCC;33FFCC;00FFCC;33CCCC;009999;66CC99;33CC99;0 0CC99;339966;009966;006633 ;66FF99;33FF99;00FF99;33CC66;00CC66;009933;99FF99; 66FF66;33FF66;00FF66;33993 3;006600;CCFFCC;99CC99;66CC66;669966;336633;003300 ;33FF33;00FF33;00FF00;00CC 00;33CC33;00CC33;66FF00;66FF33;33FF00;33CC00;33990 0;009900;CCFF99;99FF66;66C C00;66CC33;669933;336600;99FF00;99FF33;99CC66;99CC 00;99CC33;669900;CCFF66;CC FF00;CCFF33;CCCC99;666633;333300;CCCC66;CCCC33;999 966;999933;999900;666600;F FFFFF;CCCCCC;999999;666666;333333;000000;43dddd;65 432b;777665;4443cc;CCCCC3; A906B0;9CC33F;C8C8C8;688888;777752;66E554;7655FF;5 55577;D4DCE8;99AECE;3A5A8A ;9A0030;EF3F6B;FFF543;C906CF;AA2222 "; And true a function i add random colors in the string, $s_Colors.= ";".strtoupper($_POST['colorvalue']);
then i make one array: $a_Colors=array_change_key_case(split(";",$s_Color s), CASE_UPPER); when i do sort($a_Colors); print_r($a_Colors);
or asort($a_Colors); print_r($a_Colors);
the values are not correct sorted..! oke i understand the difference of the hex index so anybody idea??
Cheers,
D ================================================== =
What exactly is NOT working? the UPPERCASE function: here is why - from
the manual:
array_change_key_case() changes the keys in the input array to be all
lowercase or uppercase. The change depends on the last optional case
parameter. You can pass two constants there, CASE_UPPER and CASE_LOWER.
The default is CASE_LOWER. **The function will leave number indices as
is.** and a hex value is considered a number.
try:
$a_Colors= explode(";",strtoupper($s_Colors));
sort($a_Colors);
print_r($a_Colors);
Michael Austin.
Hey Michael,
Wel as you probaly tested the colors are sorterd in a alpha numeric way but
not in a hex ritme..
I want to have a all the colors that are example in the range of red
together.. and if you make a test and print a table with the colors you see
that they are not sort properly.
Cheers,
M
"Michael Austin" <ma*****@firstdbasource.com> wrote in message
news:gr*****************@newssvr22.news.prodigy.co m... me wrote: good day,
i found this message: and i want to know more about it too. ==========================================
Hey all,
example:
$s_Colors="0066FF;0066CC;3366CC;0033FF;003399;0033 66;99CCFF;3399FF;0099FF;66
99CC;336699;006699;66CCFF;33CCFF;00CCFF;3399CC;009 9CC;003333;99CCCC;66CCCC;3
39999;669999;006666;336666;CCFFFF;99FFFF;66FFFF;33 FFFF;00FFFF;00CCCC;99FFCC;
66FFCC;33FFCC;00FFCC;33CCCC;009999;66CC99;33CC99;0 0CC99;339966;009966;006633
;66FF99;33FF99;00FF99;33CC66;00CC66;009933;99FF99; 66FF66;33FF66;00FF66;33993
3;006600;CCFFCC;99CC99;66CC66;669966;336633;003300 ;33FF33;00FF33;00FF00;00CC
00;33CC33;00CC33;66FF00;66FF33;33FF00;33CC00;33990 0;009900;CCFF99;99FF66;66C
C00;66CC33;669933;336600;99FF00;99FF33;99CC66;99CC 00;99CC33;669900;CCFF66;CC
FF00;CCFF33;CCCC99;666633;333300;CCCC66;CCCC33;999 966;999933;999900;666600;F
FFFFF;CCCCCC;999999;666666;333333;000000;43dddd;65 432b;777665;4443cc;CCCCC3;
A906B0;9CC33F;C8C8C8;688888;777752;66E554;7655FF;5 55577;D4DCE8;99AECE;3A5A8A ;9A0030;EF3F6B;FFF543;C906CF;AA2222 "; And true a function i add random colors in the string, $s_Colors.= ";".strtoupper($_POST['colorvalue']);
then i make one array: $a_Colors=array_change_key_case(split(";",$s_Color s), CASE_UPPER); when i do sort($a_Colors); print_r($a_Colors);
or asort($a_Colors); print_r($a_Colors);
the values are not correct sorted..! oke i understand the difference of the hex index so anybody idea??
Cheers,
D ================================================== =
What exactly is NOT working? the UPPERCASE function: here is why - from the manual:
array_change_key_case() changes the keys in the input array to be all lowercase or uppercase. The change depends on the last optional case parameter. You can pass two constants there, CASE_UPPER and CASE_LOWER. The default is CASE_LOWER. **The function will leave number indices as is.** and a hex value is considered a number.
try: $a_Colors= explode(";",strtoupper($s_Colors)); sort($a_Colors); print_r($a_Colors);
Michael Austin.
> "Michael Austin" <ma*****@firstdbasource.com> wrote in message news:gr*****************@newssvr22.news.prodigy.co m...
me wrote:
good day,
i found this message: and i want to know more about it too. ==========================================
Hey all,
example:
$s_Colors="0066FF;0066CC;3366CC;0033FF;003399;0033 66;99CCFF;3399FF;0099FF;66
99CC;336699;006699;66CCFF;33CCFF;00CCFF;3399CC;009 9CC;003333;99CCCC;66CCCC;3
39999;669999;006666;336666;CCFFFF;99FFFF;66FFFF;33 FFFF;00FFFF;00CCCC;99FFCC;
66FFCC;33FFCC;00FFCC;33CCCC;009999;66CC99;33CC99;0 0CC99;339966;009966;006633
;66FF99;33FF99;00FF99;33CC66;00CC66;009933;99FF99; 66FF66;33FF66;00FF66;33993
3;006600;CCFFCC;99CC99;66CC66;669966;336633;003300 ;33FF33;00FF33;00FF00;00CC
00;33CC33;00CC33;66FF00;66FF33;33FF00;33CC00;33990 0;009900;CCFF99;99FF66;66C
C00;66CC33;669933;336600;99FF00;99FF33;99CC66;99CC 00;99CC33;669900;CCFF66;CC
FF00;CCFF33;CCCC99;666633;333300;CCCC66;CCCC33;999 966;999933;999900;666600;F
FFFFF;CCCCCC;999999;666666;333333;000000;43dddd;65 432b;777665;4443cc;CCCCC3;
A906B0;9CC33F;C8C8C8;688888;777752;66E554;7655FF;5 55577;D4DCE8;99AECE;3A5A8A ;9A0030;EF3F6B;FFF543;C906CF;AA2222 "; And true a function i add random colors in the string, $s_Colors.= ";".strtoupper($_POST['colorvalue']);
then i make one array: $a_Colors=array_change_key_case(split(";",$s_Co lors), CASE_UPPER); when i do sort($a_Colors); print_r($a_Colors);
or asort($a_Colors); print_r($a_Colors);
the values are not correct sorted..! oke i understand the difference of the hex index so anybody idea??
Cheers,
D =============================================== ==== What exactly is NOT working? the UPPERCASE function: here is why - from the manual:
array_change_key_case() changes the keys in the input array to be all lowercase or uppercase. The change depends on the last optional case parameter. You can pass two constants there, CASE_UPPER and CASE_LOWER. The default is CASE_LOWER. **The function will leave number indices as is.** and a hex value is considered a number.
try: $a_Colors= explode(";",strtoupper($s_Colors)); sort($a_Colors); print_r($a_Colors);
Michael Austin.
me wrote:
Hey Michael,
Wel as you probaly tested the colors are sorterd in a alpha numeric
way but not in a hex ritme.. I want to have a all the colors that are example in the range of red together.. and if you make a test and print a table with the colors
you see that they are not sort properly.
Cheers,
M
[top-post-corrected]
Now that is a horse of a different color. :)
Once you have your array, you will need to break it down into RGB order
FFFFFF
|||||+--> Blue LSByte
||||+---> Blue MSByte
|||+----> Green LSByte
||+-----> Green MSByte
|+------> Red LSByte
+-------> Red MSByte
and sort where Red is predominate etc..., I am guessing you already
figured that one out. In essence you need a 3-dimensional array (not
multiple arrays)... and a way to sort it and still keep the colors intact.
to see how difficult this would be look at a chart I found: http://www.forestasia.com/tools/colour_chart.asp
After 2.5 hours, I am giving up and going to bed... good night.
Michael Austin.
oh... I guess I should have hit the send button.... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: lawrence |
last post by:
Is there an easy way to sort a 2 dimensional array alphabetically by
the second field in each row?
Also, when I use sort() on a two dimensional array, it seems to work a
lot like...
|
by: its me |
last post by:
Let's say I have a class of people...
Public Class People
Public Sex as String
Public Age as int
Public Name as string
end class
And I declare an array of this class...
|
by: Brett |
last post by:
I have two arrays and i wish to sort the first one numerically, but after
sorting, I would like the second array to be in the same matching order as
the first array.
ie.
@l1={3,1,2};...
|
by: Elijah Bailey |
last post by:
I want to sort a set of records using STL's sort() function,
but dont see an easy way to do it.
I have a
char *data;
which has size mn bytes where m is size of the record and
n is the...
|
by: gambler |
last post by:
let's say you have:
var games = new Array();
games = new GAME(gameNum, rotNum1, rotNum2, ... );
(
so a sparsley populate array which enables me to locate a game usin
the game number...
|
by: ritchie |
last post by:
Hi all,
I am new to this group and I have question that you may be able to
help me with.
I am trying to learn C but am currently stuck on this.
First of all, I have a function for each sort...
|
by: Steve Wasser |
last post by:
I need to sort a two-dimensional array. Each day I process a file with 9
comma-delimited fields, and varying amount of records (lines). I want to
pull in each line, split it according to the comma...
|
by: yeti349 |
last post by:
Hi, I'm using the following code to retrieve data from an xml file and
populate a javascript array. The data is then displayed in html table
form. I would like to then be able to sort by each...
|
by: Jan Smith |
last post by:
I've searched the overloads for the Array.Sort method, and I haven't found a
clear answer to my question. Maybe it's not in Array.Sort.
Here's the question:
I initialize an array X with the...
|
by: Alex Chudnovsky |
last post by:
I have come across with what appears to be a significant performance bug in
..NET 2.0 ArrayList.Sort method when compared with Array.Sort on the same
data. Same data on the same CPU gets sorted a...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |