|
You can poke fun at my observations if you wink it's a good idea. Now I'll lid this thread go.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
That idea is out of sight!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
You make my eyes sore. Got any website for that?
</end recursion>
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
I see what you did there.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
This one tickled me pink...
If you can't laugh at yourself - ask me and I will do it for you.
|
|
|
|
|
Inspired by OG's post a couple of days ago: The Lounge[^]
I needed a couple of extra USB charging points for some kit I'm testing. The nearest thing to hand was a European twin USB charger. I'm in the UK so it wouldn't fit the mains socket. However, I have an adapter so I fished it out. The adapter didn't work; I suspected the internal fuse. I dug out my multimeter to check the fuse but the multimeter battery was flat. I disassembled the multimeter, found replacement batteries and reassembled it. Checked the fuse - yes, it was blown. Found a replacement fuse but it wouldn't fit. It was nominally a 20mm fuse but it was 22mm long and the adapter was fussy. I disassembled the adapter to see if I could free a bit more space for the fuse but decided it would be too much hassle. After a bit more rummaging, I found a 20mm fuse that was only 20mm long. Fitted the new fuse, plugged in the adapter, plugged the charger into the adapter ... all working fine now.
It had only taken me 20 minutes, and it had saved me walking to the other side of the house to get another USB charger! Time for a cuppa!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Take your victories where you can!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Enjoy these victories while you can, as you get older putting on socks the same color is an acheivement.
|
|
|
|
|
Until you decide to throw away the whole socks drawer and buy 20 sets of identical socks.
I may or may not have done it
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I'm partial to solid gray!
|
|
|
|
|
Did that years ago - am I getting old? I didn't realise this was a symptom.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
I solved that years ago by buying 10 pairs at a time of solid black, and throwing the lot away when I'm down to seven.
Has the other advantage the pairing them up after a trip through the washing machine becomes trivial.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm cheap I alternate years when buying.
I buy darker gray at first then I throw away as they get worn and buy light gray.
The machine fads them so they kinda match the old ones.
|
|
|
|
|
Mike Hankey wrote: putting on socks the same color is an acheivement Allow me to share the wisdom of the ages, my son... Twice a year, I buy a 12 pack of Hanes crew socks. They are all the same color (white with some gray) and therefore go with everything.
If there's ever a case where I'm wearing something other than these socks, I wonder when I died and no one told me.
Software Zen: delete this;
|
|
|
|
|
This *almost* qualifies as a programming question, but not quite, so I apologize for playing footsie with breaking the rules.
Under System.Drawing in .NET there's a Color enumeration that has a bunch of predefined colors like DarkKhaki and AliceBlue , and such.
Is that enumeration based on anything other than some arbitrary list of colors microsoft's coders came up with?
What I mean is, is there some sort of named color palette for web colors or something that this enumeration is based on.
I'm asking in part, because I'm doing this to generate C++ code for a rather large enumeration of color values, I am shamelessly ripping from .NET
bool cpp17 = true;
Console.WriteLine("\t// predefined color values");
Console.WriteLine("\ttemplate<typename PixelType>");
Console.WriteLine("\tstruct color final {");
Console.WriteLine("\t\t// we use a super precise max-bit RGB pixel for this");
Console.WriteLine("\t\tusing source_type = rgb_pixel<HTCW_MAX_WORD>;");
var pia = typeof(Color).GetProperties(BindingFlags.Public | BindingFlags.Static);
for(var i = 0;i<pia.Length;i++)
{
var name = pia[i].Name;
if ("Transparent" != name)
{
if(cpp17)
{
Color c = (Color)pia[i].GetValue(null);
Console.WriteLine("\t\tconstexpr static const PixelType {0} = source_type(true,{1},{2},{3}).convert<PixelType>();", _ConvertCase(name), c.R / 255.0, c.G / 255.0, c.B / 255.0);
} else
Console.WriteLine("\t\tstatic const PixelType {0};",_ConvertCase(name));
}
}
Console.WriteLine("};");
if (!cpp17)
{
for (var i = 0; i < pia.Length; i++)
{
var name = pia[i].Name;
if ("Transparent" != name)
{
Color c = (Color)pia[i].GetValue(null);
Console.WriteLine("\ttemplate<typename PixelType> const PixelType color<PixelType>::{0} = color<PixelType>::source_type(true,{1},{2},{3}).convert<PixelType>();", _ConvertCase(name), c.R / 255.0, c.G / 255.0, c.B / 255.0);
}
}
}
That creates a templated "enumeration" of known color values in C++17 or C++14 depending on the cpp17 flag.
In essence creating code like this (C++17)
constexpr static const PixelType alice_blue = source_type(true,0.941176470588235,0.972549019607843,1).convert<PixelType>();
constexpr static const PixelType antique_white = source_type(true,0.980392156862745,0.92156862745098,0.843137254901961).convert<PixelType>();
constexpr static const PixelType aqua = source_type(true,0,1,1).convert<PixelType>();
constexpr static const PixelType aquamarine = source_type(true,0.498039215686275,1,0.831372549019608).convert<PixelType>();
constexpr static const PixelType azure = source_type(true,0.941176470588235,1,1).convert<PixelType>();
And the bottom line is I want to know how much trouble I'll get in by doing this. If the color values are standardized then I think I'm safe from any team of lawyers microsoft sics on me.
If they're not then I may need to come up with an alternative.
Real programmers use butterflies
|
|
|
|
|
|
Your google fu is stronger than mine. I bow to you, Sander-san**
**Yes I know, I'm mixing chinese and japanese things, but whatever. I don't know how to express "teacher" in mandarinized english.
Real programmers use butterflies
|
|
|
|
|
- Teacher in Japanese would be sensei
- If Google can be believed, teacher in Chinese (pinyin transliteration) is lǎo shī (which also translates to something like "old master" )
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Yeah I used to take karate, but I forgot what the san suffix meant at the end of the name. Your post sent me to google to look up. It's a title of respect, often used when addressing people in positions of respect, or otherwise formally. Like sir, for example. It would be used by a student addressing a teacher, but does not mean teacher per se. I overstated it on account of bad organic RAM between the ears.
I would have wanted something similar in Chinese, but I have no idea what it would be or if there's an even equivalent way to mangle Sander's name like that.
Real programmers use butterflies
|
|
|
|
|
Observe and learn, my young Padawan.
Your question was "Is that enumeration based on anything other than some arbitrary list of colors microsoft's coders came up with?"
So I thought, well CSS has the same colors and CSS is based on something.
So I googled "where do css named colors come from"
Searching "where do system.drawing named colors come from" gives you the same answer "NET Framework, Windows Forms, and Microsoft Internet Explorer. These colors and their names are based on the UNIX X11 color values."
It sounds almost too simple to work, yet it does
|
|
|
|
|
I know jack about CSS. Some of it comes back to me a little if I stare at it, but I never retain it.
So I wouldn't have made it past your first step.
Real programmers use butterflies
|
|
|
|
|
'Dark, the dark side it is! Very dark!'
'Shut up, Yoda! Get the bread out of the toaster earlier next time!'
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I love sending you a W3Schools [^] reference !
Aside from it harking to Q&A, therefore legitimizing your posting in The Lounge, it is the second of many consecutive pages of color info. Don't miss out on the others. Many are nice in that they're interactive allowing a gradient of fixed values for your start and end colors.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I found the previous two lists mentioned and after a bit more searching I came across a graphics design company that had a list of over seven hundred shades so I merged the three lists and came up with my own superset. Then I added some macros and have a list I can use with GDI, GDI+, and OpenGL which are the three I work with and have different color schemes. It is unlikely you need the full list so one of the previous two should suffice. I wanted to be a bit more comprehensive.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
One of the nicer things in my list is I made the macros such that one can get a list of the colors in text format which I use to populate lists and combo boxes. I will be happy to share that list and its associated files with you if you want them.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|