90% of the time when I get up at work, I lock Windows (Ctrl+L). 10% of the time I don't. My monitors go to sleep when I step away for a while. When I sit back down, I have to decide whether I want to wait for them to wake back up (three seconds or so), or just risk typing my password into whatever box my cursor happened to be sitting in when I left.
Lucky for me, ctrl+shift+del opens the history tab in Chrome, so you guys didn't get to see my password
Your task is to give three different languages A, B, C, and write two different programs P and Q such that:
P is a quine in language A, but not a quine in B nor C;
Q is a quine in language B, but not a quine in A nor C; and
Q concatenated after P (without any new characters added in between...
A polyquine is both quine and polyglot.1 You are to write a quine which is valid in at least two different languages. This is code golf, so the shortest answer (in bytes) wins.
1 I made that up. Or rather, Geobits did. Apparently, he wasn't the first one either, though.
Rules for Quines
Only t...
@TimmyD Windows is great when you are a user, but can be a pain in the ass when admin'ing it
Simply deploying some apps, and running them on logon without the UAC popping out AND while getting them executed by the current user is kinda... tricky
It's the other way around for me... I would prefer working in a Unix environment simply because there isn't always X built-in tools you have to find a way to work around when you want to do some simple things...
I had the option when building a desktop last week to install a bunch of crap that would allow me to remotely manage Windows. I also had the option to recommend Windows 10 Pro over Windows 10 Home, for like $70 more. I said no to both options, and so I won't be complaining when I can't remotely manage the new machine.
It's really my own fault. I preferred faster boot times and cheaper OS over remote management capabilities.
@Katenkyo Sure it can. You can specify the installation privilege to be run under Local System via the SCCM client and how you advertise it to the user by changing some Group Policy settings. reference
@TimmyD Already tried to fiddle using the local system account, as it actually runs the executable as SYSTEM it causes a problem because I need this executable to see the currently logged user.
A standard, solved, 3×3×3 Rubik's Cube has 6 differently colored faces, where each face is a 3×3 grid of squares of one color. The white face is opposite the yellow, the red opposite orange, the blue opposite green, and when white points upward, red is to the left of blue:
Imagine an ant sits ...
In how many of the integer numbers between 0 and 10,000 does the digit 3 appear some place to the left of the digit 4? This would include, for example, the numbers 34, 374, 4384 and 3874, but would not include 27, 43, 3650 or 4333
So I am thinking you do 8x9x1x1+1x9x1+8x1x9x1+1x9x9x1 = 234?
But ...
The Thue-Morse sequence goes like 01101001
The way you generate it is:
Start by taking 0.
Negate what is left and append it to the end.
So, take 0. Negate it and add that to the end - 01
Then take that and negate it and add that to the end - 0110
And so on.
Another interesting property of t...
@CᴏɴᴏʀO'Bʀɪᴇɴ I think the best way might be to cut the string with ;., insert the replacement string before each piece, and concatenate the results back.
Say you want to replace ab by cd in aababbbaba. First you cut at occurrences of ab and get |a||bb|a| (it's an array of boxed strings). Then you insert cd before each piece and get |cda|cd|cdbb|cda|, and then you concatenate the pieces and get cdacdcdbbcda. Finally you remove the extra cd in the beginning and get acdcdbbcda.
I tried to implement it, but ;. doesn't want to play with me.
So, recently, I found myself reformatting my code for Vitsy to using anonymous class instances for commands rather than the normal method approach. For those who don't know, anonymous class instance syntax looks something like this:
...
private abstract static class SomeClass {
public abstra...
> This is the world we live in / And these are the hands we're given / Use them and let's start trying / To make it a place worth living in golf every language in
Welcome to Programming Puzzles & Code Golf! Questions without an objective primary winning criterion are off-topic, as they make it impossible to indisputably decide which entry should win. — Dennis ♦8 mins ago
No more re-typing the same comments over and over!
This script adds a little 'auto' link next to all comments boxes. When you click the link, you see a popup with 6 configurable auto-comments (canned responses), which you can easily click to insert.
This script was inspired by answers to thi...
Does worldbuilding irk anyone else? It's like a bunch of fiction writers trying to make their imaginations conform to everyone elses, which kinda defeats the purpose.
I have a side-length-5, 149-byte answer for the Happy Birthday challenge whenever I get around to implementing Rubik's rotation. It could definitely be golfed (85 no-ops currently), but it's just so darn perfectly aligned that I want to post it as-is.
'Tis the season...
And it's about time I posed my first question on Mathematica Stack Exchange.
So, here's an holiday quest for you Graphics (and P-Chem?) gurus.
What is your best code for generating a (random) snowflake in Mathematica?
By random I mean with different shapes that will mimic the ...
FYI: The moderators have decided to implement a new policy wherein comments along the lines of "Why the downvote(s)?" will be deleted on sight as "not constructive." If a downvoter has not explained a downvote, it's unlikely they'll ever explain it. Further, such comments can elicit potentially undeserved "sympathy upvotes." So if you get a downvote with no explanation, recheck your work for blaring inaccuracies, and if you're all good then don't sweat it. ¯\_(ツ)_/¯
I enjoy giving interesting problems to my peers who have not seen a lot of mathematics. It is a constant conversation I have with many friends who would interchange "mathematical thinking" with "mechanical thinking" in conversation. Consequently, I often make it my mission to elucidate why mathe...
Similarly to eykanal's answer, although demonstrating some interesting facts about medians and geometry as well. It demonstrates that $\displaystyle\sum_{n = 1}^{\infty}\frac{1}{2^n} = 1$:
Code review was from another era where even Jeff Atwood said it didn't really fit our model, but the sheer size of our audience and experience that went into it gave them the collateral to give it a shot. Even today, it still does not fit our model and it always seems to <air-quotes> "break" how ...
I'm assuming some goes for the code golf site? — x-x6 mins ago
Revised challenge: Find nonzero natural numbers a, b such that a^b (i.e., a raised to the b'th power) is equal to a++b (i.e., the base-10 concatenation of a and b)
@x-x Sure. Code Golf, Code Review, CS50, Patents; maybe less so Hardware Recs, Software Recs, World Building: these were all so-called experimental sites and, as our Historical Lock says, these may not be considered a good, on-topic [subject] for this site, so please do not use it as evidence that you can [make similar proposals] here. — Robert Cartaino ♦23 mins ago