|
If you say no, Elwood and I will come here for breakfast, lunch, and dinner every day of the week.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Interesting affect the frame rate has on the string vibration. Nice standing waves.
|
|
|
|
|
Great one
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Is that guitar in standard tuning ?
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
Er ... how could you possibly know? The three harmonics sounded right for a standard tuning but that doesn't mean a lot.
|
|
|
|
|
|
|
|
I hate how they're implemented in WinForms, I hate how their implemented in HTML. The whole issue of parsing out which radio button was selected and, on the flip side, selecting the correct radio button given "something", is such a PITA. And the "something" of course never matches what is typically persisted -- a FK ID. No, instead of having a sane list for radio buttons where you can correlate ID's from a lookup table to the data sources's FK's, no, you have to set the damn checked state. Grrr.
Well, regardless, I now have a decent wrapper (probably not the best, but WTF, it works) in Javascript for dealing with this nightmare, just like I implemented in WinForms ages ago.
Marc
|
|
|
|
|
|
Yes, Knockout (and I suspect other's of that ilk) do take some of the pain out of radio buttons.
Marc
|
|
|
|
|
Am I the only one who finds JavaScript a ugly and complicated mess? Even with Knockout you still get endless hard to read spaghetti bowls.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
No, you are not the only one!
Even I just escaped from 2 years of Web development!
That said TypeScript was quite nice!
|
|
|
|
|
I really dislike functional languages ever sice I was tortured with Lisp in some course while studying. Boxing everything in parantheses a thousand layers deep is not exactly my idea of readable code. How many parantheses do I need to close now? But granted, thats matter of personal preferences.
I also dislike interpreters. They only notice an error when they hit the line at runtime. That, together with JavaScript's awful 'keep going without complaining until you have no other choice' philosophy makes testing and quality assurance a hell. A single typo can make the entire following code unparsable and you must do a complete test even after small changes.
And what do you see when debugging? Variables that contain functions which contain other variables, which may contain even more functions... IF (a very big if!) the crappy debugger got its context right and allows you to hit breakpoints and examine anything at all.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Wow! This got off-topic in a hurry.
To move back, yes coding radio buttons is a pain, but it is the right mechanism for certain kinds of selections. There may be tools out there to ease the pain, but I haven't found them yet.
|
|
|
|
|
Well UI code always tend to get messy...
Since I embraced MVVM long time ago I found that it reduced UI spaghettiness greatly!
Even with JavaScript and HTML. MMV with Knockout was "relatively" cleaner!
|
|
|
|
|
The horror of horror application known as 'Microsoft Access' used to (I don't know if it still does as I shun it for the rabid cur it is) allow you to group radio buttons and consult their status and subscribe to their events at the group level - which is what I guess you have created.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Heck, I don't even care about events. I just want the FK ID for the selected item, or null if nothing was selected in the group. That's what I created, though I still need to see how Knockout does it, but since I prefer "model-less" web development (one day I'll write an article on that) I'd have to add a pseudo-model so Knockout has something to bind to.
Marc
|
|
|
|
|
So don't use them then. They're not supposed to be set programatically anyway. It's meant as a user selection device which means that you can pretty much do everything from the click event as any click automatically sets to checked.
|
|
|
|
|
Member 9082365 wrote: They're not supposed to be set programatically anyway
If I load existing selections, I damn well need to set the programmatically.
Marc
|
|
|
|
|
My goal is to get GIF files that can be handed over to a printer to print. Anyone who knows something about commercial printing is very welcome to reply! Now I am presuming that a commercial printer would be able to work with a GIF file, but if there is some other standard, I'm all ears.
I have a bunch of GIF files sized at about 10000 x 14000 that I used Paint.NET to produce from TIFF files (the GIFs are about 25M while the TIFFs are about 840M!) The original TIFF files were created by a scanner from thin, ink-printed plastic pieces, that had a few colors (i.e., like a cartoon). I haven't checked, but I presume that the although the original object was supposed to only have a few colors, that scanner picked up some slight variations of the few colors, and the GIF conversion process just fit whatever colors it detected into the 256-color map.
So I mainly want to get all the colors that are very close (i.e., all the colors that are really for the same original color) to get the same color, and to be mapped to color #1, #2, #3, etc. There is also some parts of these plastic pieces that are clear, so I figure that should be mapped to a color as well (color #0 maybe?) Now I know that the 32-bit BMP has an 8-bit part that signifies the level of transparency, but I am not sure how that would be done with a GIF. I can't seem to figure out how to do this in Paint.NET, but if it can be done, that would be great.
Thanks
|
|
|
|
|
While GIF doesn't support per-pixel alpha values, You can make palette entries entirely transparent or opaque, but it's only a 1bit flag - the pixel is there or it isn't. You should be able to make palette entries transparent with a menu option of some kind. Dunno, tried Paint.Net years ago and threw it out in preference of Gimp.
Also, for what it's worth, you'll get better compression with PNG, which uses the deflate compression scheme rather than the LZW one. As an example, the CP icon is a 4,795 byte gif. Converted to a png, its just 3,966 bytes. Depending on the material to be printed, you may also benefit from an image format that allows for colour-profiles to be embedded - important for accurate colour representation during print.
As for mapping the colours back to their original (desired) values, you may be able to posterize the image to the number of colours actually present. The final colour will be determined by the avg of the relevant pixels, so you should expect the colour to drift a little from the desired one. You can simply edit the palette after posterization such that it reflects the desired colours.
"When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon
|
|
|
|
|
Use Paint.NET and save as PNG.
Select the 8-bit option when you are presented with a selection of bit depths for storing the image.
|
|
|
|
|
You could use IrfanView to convert the TIFFs. It's free, incredibly powerful, and has a batch mode. You should use PNG for your output files as has been stated. IrfanView has a 'Decrease Color Depth' command which will reduce the output size considerably.
What to do about the transparent areas is another matter, you'd have to do that part manually. PNG supports transparency.
Regards
Nelviticus
|
|
|
|
|
I would strongly suggest using 8-bit PNGs rather than GIFs as PNGs have better compression.
For converting TIFFs to 8-bit PNGs (or GIFs) you can use GIMP with the Save for Web plugin. This plugin allows you to customize how the 24-bit image is converted to 8-bit indexed color in many ways, such as choosing the type of dithering, number of colors, etc. while giving a realtime view of the resulting image and its filesize.
GIMP also lets you posterize the image before exporting it, in which case you can set exactly which colors will be used.
|
|
|
|