You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...
@CᴏɴᴏʀO'Bʀɪᴇɴ Welcome to Programming Puzzles and Code Golf! This site is for programming competitions, not for general programming questions. For those try Stack Overflow, but be sure to check out their Help Center to ensure your question is high quality and on-topic. Thanks!
I did this challenge in AppleScript (mainly as a joke, but I started it...)... I tried to get it down really hard, but it's still 417 bytes. Should I post it?
@El'endiaStarman I get that that's an average, sure. It just doesn't match my internal definition of average. It's like asking for the square root of 25 and getting -5 as the answer. It's technically a square root of 25, but ewwww...
Render a Polygram
code-golf graphical-output geometry
I will flesh this out some more tomorrow.
Given the number of vertices n ≥ 3 and the "step size" 1 ≤ m < n/2 (indicating the distance between two connected vertices), output a graphical representation of the corresponding regular polygram....
In the context of a cellular automata where each cell's angle is updated to be the average of its eight neighbors' angles (then this is displayed as color).
@PhiNotPi I don't see a problem with creating files. Whether you give them access to the internet will depend on whether you want them to base their predictions purely on the price history you provide, or on news activity and variance between rival pricing sites
@PhiNotPi Also, "access to the internet" allows for human input. Disallowing the internet seems the easiest way to preclude this.
@PhiNotPi Entrants should be able to ask question on an SE site which gets migrated to a different SE site and then eventually closed as off-topic only to be resurrected by a different user in sandbox. This different user is your opponent KOTH bot
My school has its Homecoming dance next week, and there's someone in mind I want to ask. But I don't want to ask her the normal way. I want to send her a program that prints "Rachel, will you go to Homecoming with me?" However, if I just send her print"Rachel, will you go to Homecoming with me?",...
@Optimizer I assumed you meant two photographs, one for each eye, and both printed side by side. With a stereogram viewer it takes no longer than looking at a real scene. With two images side by side and manually adjusting your focus, it can take a few seconds to a few minutes depending on the person
If you just take 2 photos, one from the position of each eye, you can display them side by side and look at one with each eye to see the image in 3D. Depending on how difficult that turns out to be, you may need to put a piece of card in between to block the view of the other eye, or possibly look through 2 tubes. Alternatively you can use a stereogram viewer which has mirrors so your eyes don't need to look in unconventional directions
If you are doing it with just plain images with no equipment, you'll need to keep the images small and close together or your eyes won't be able to look at them separately
@Optimizer This one is quite effective, but you'll need to shrink your browser window down until the centres of the two flowers are closer together than your eyes are, otherwise it won't work
(this will show the flower in 3d, rather than a hidden image like the one you posted)
@Optimizer Note that there are two different types of stereogram - one with the left eye's view on the left, and the other with the left eye's view on the right.
The one I posted has the left eye's view on the left, and you need to let your eyes diverge (look behind the image). They also have the flipped version available, which will work with your method
@Optimizer Wait - your method works for diverging too. Nice :)
@Optimizer No I actually mean your method helps me to use the diverging technique almost instantly rather than after a few seconds - so I see correct depth information without a delay
@Optimizer Focusing on your finger would give the cross eyed technique. But just holding your finger there blocks the view to the image you are not meant to be looking at with each eye, so then looking through the image is much easier as the distracting other image is occluded
@PhiNotPi That seems significantly clearer now
@PhiNotPi I like that you score by product instead of sum. Seems like this will reward consistent behaviour rather than risky strategies that only occasionally do well.
I don't think I've actually heard the term, but that sounds like the idea that if you see two conflicting images with your eyes, the one seen by the dominant eye will...uh...dominate what you see.
Which I don't think is far fetched.
And no, I don't mean the Pokémon.
Let your eyes diverge (or converge) until the blue and yellow rectangles overlap. Now what color do you see?
Also, the bottom part is a checkerboard of blue and yellow. (Click on the image to see this.) Note that it's not gray!
@El'endiaStarman Both converging and diverging I see yellow slightly stronger, although I can flip between them at will (but not settle easily on a combination). This suggests both my eyes take precedence when seeing yellow, rather than one eye having dominance over the other. I have no idea whether that's typical
Actually it could just be the gamma of my screen - when viewed full size the checkerboard no longer looks mid grey - it's significantly lighter. So maybe everyone will see the yellow stronger on such a screen
Actually I doubt any combination of two of RGB against the remaining one would balance. You'd probably need to calculate the opposing colours specifically to have the same perceived brightness, and I don't know how much/whether that varies from person to person...
A Lab color space is a color-opponent space with dimension L for lightness and a and b for the color-opponent dimensions, based on nonlinearly compressed (e.g. CIE XYZ color space) coordinates. The terminology originates from the three dimensions of the Hunter 1948 color space, which are L, a, and b. However, Lab is now more often used as an informal abbreviation for the L-a-b representation of the CIE 1976 color space (or CIELAB, described below). The difference between the original Hunter and CIE color coordinates is that the CIE coordinates are based on a cube root transformation of the color...
@trichoplax I see something similar to this. The middle area is made of up blue and yellow patches, although I can focus on one color or the other.
The way I've heard eye dominance explained is "one eye determines position (of the object in you 2D visual field) while the other eye determines distance"
And I've heard that a way to determine dominance is to 1) Make a small triangular hole with your hands at arms' length. 2) Look at some object in the distance through the hole. 3) Bring the hole closer to your face, while still looking at the object. 4) Your hands will move to your dominant eye.
With the blue/yell and green/purple, I see splotches of the two colors. With the cyan/yellow, I sometime see splotches but sometimes see a greenish mixture.
I don't think I have depth issues, but doctors tell me otherwise. Makes me wonder what other people see that I don't. Seems to me I can discern depth just fine.
I've never had any problems with 3D or other stereoscopic stuff, so I dunno.