pavlov:~ ararslan$ vim
Error detected while processing /Users/ararslan/.vimrc:
line 1:
E492: Not an editor command: potatoes
Press ENTER or type command to continue
This worked for me:
:set backspace=indent,eol,start
I'm not sure exactly what it does but it is listed as a possible solution here and here. I found this line in a vimrc file distributed with Ubuntu where the behavior of the mac "delete" key (otherwise known as the "backspace" key) works as ex...
@PhiNotPi I would like to add this to your koth server. I think everything will work (I didn't see if java 8 is supported). If something is wrong let me know
The Motivation
The desire for a KOTH server has been around for a while. There have been a couple notable meta discussions about it in the past:
Creating an official place to become a King of the Hill tester
How could we run KotHs in a distributed fashion?
By being able to host KOTHs on a se...
Par, 14 bytes
'a'z_,e,F[x;l!
Explanation (stack visualizer feature coming soon!):
## Implicit: push the input (as a string) to the stack
'a'z_ ## Push the range of a-z (the alphabet) to the stack
,e ## Invert stack, expand input string into individual characte...
(function(f){window.alert=f})(function(x){
var iu = document.getElementById("input");
// on browser?
if(iu){
iu.innerHTML += x + "<br>";
} else {
alert(x);
}
});
> User: My name is Conor, stupid. > > Cleverbot: I thought it was Ecchi. > > User: No, it isn't. > > Cleverbot: Why are you lying to me? > > User: Because you aren't real. > > Cleverbot: You aren't real. > > User: Oh yeah? Come say that to my FACE! > > Cleverbot: You have no face. You are a program. You are not a living organism. > > User: But... I was made! > > Cleverbot: But... You're not. > > User: What do you know? > > Cleverbot: What is a [][][]] implant? > > User: What the hell is your problem?
Goal
You're playing a computerised chess game. The display is in black and white only and the pixels are chunky. White pixels use a lot power compared to black pixels and you're concerned about your carbon footprint.
Given a square and a piece in chess notation, return the number of white pix...
Entry Pageviews
United States - 410
Russia - 163
Romania - 50
Turkey - 27
Saudi Arabia - 14
Taiwan - 11
Germany - 9
France - 8
China - 7
South Korea - 7
I think I must stay up all night to finish this LaT_X doc... sigh. It's ok that I'll still b in chat in this chatroom to prolong my finishing !odd moar
I always see number 14, everyday, anywhere. I see it in my math classes, jerseys, tag prices, everywhere that you can think of that has numbers. I tried to search for explanations but they all talk about numerology, and I don't know if numerology is even reliable or not. Maybe there are scientif...
Remember,Matrix effect in movie matrix,your challenge is to produce the same matrix effect through programming :
For e.g sample bash produces :
#!/bin/bash
#
# matrix: matrix-ish display for Bash terminal
# Author: Brett Terpstra 2012 <http://brettterpstra.com>
# Contributors: Lauri Ranta and C...
That moment when you cant water the Christmas tree because it isn't trimmed so you build giant PVC pipe system to pour water in the tree for you. (Note: I did this after trying every kitchen item that could hold water, a hose, a vacuum pipe, etc)
I recently asked the question in code golf, I have followed the standard template :
I have provided :
Sample input
Sample output
Sample code & rules
what else this community need in order to make the question clear,i cant get the point of closure behind it,myself from non-english country & i...
@BlueBerry-Vignesh4303 well, Im about to leave but here is my two cents: dont allow code obfuscation, add an explanation on what answers people should upvote, describe the wanted output in words, don't require an input of how long to run, etc.
Alternatively, keep it as popularity-contest, and judge on which produces the best-looking matrix effect, i.e. the one that most effectively protrays that of the movie
Remember,Matrix effect in movie matrix,your challenge is to produce the same matrix effect through programming :
For e.g sample bash produces :
#!/bin/bash
#
# matrix: matrix-ish display for Bash terminal
# Author: Brett Terpstra 2012 <http://brettterpstra.com>
# Contributors: Lauri Ranta and C...
@BlueBerry-Vignesh4303 Also, did you just take the example code from somewhere? You should definitely make sure that's legal, and give proper attribution.
APL, 9 bytes
{⎕←⍵:∇⍵}⎕
Explanation:
⎕ ⍝ read a number from the keyboard
{⎕←⍵: } ⍝ output it, and if it is true:
∇⍵ ⍝ call the function again with that input
The APL code page is an EBCDIC-based code page used specifically to write programs written in the APL programming language.
== Character set ==
Due to its origins on IBM Selectric Teleprinters, APL symbols have traditionally been represented on the wire using a unique, non-standard character set. In the beginning, there were few terminal devices which could reproduce them—the most popular ones being the Selectric fitted with a specific APL print head. Over time, with the universal use of high-quality graphic display, printing devices and Unicode support, the APL character font problem has largely...
@El'endiaStarman I don't see how there can be an edge when we're speaking of orbit... But I don't play spacewar, so it may have to do something with that ^^'
@El'endiaStarman Theorically, you could have a stable "orbit" by staying in position in the middle of the torus (didn't know how to say it in english ^^')
One thing I find really interesting is that there's a cycle of four pass-bys of the sun, and they alternate like this: two close in, then two further away, then two close in, and so forth.
It's not totally stable over the long term because I do gravity a linear step at a time, so the close parts get closer and the far parts get further until the ship hits the sun.
Spacewar! king-of-the-hill
If you've ever played Spacewar!, you know it was a fun game. If you haven't, know this: it was (and is) one of the very first and most important computer games. And it's still fun! The clone I grew up on is this one, which is, apparently and unfortunately, Windows only...
@El'endiaStarman You could probably improve the stability by using velocity Verlet instead of Euler updates. I posted an answer about that to gamedev some time back.
Hmm. Verlet integration doesn't appear to be perfect. If I put a ship into a really elongated orbit, then it precesses, like it did before.
Now, that could be because of two things: 1) the gravitational field is essentially constant very close to the sun (within 10 pixels, where the sun is 5 px in radius) and 2) there is a maximum speed for spaceships, imposed in the interest of making games playable.
Still shouldn't be that bad. And you could always try running multiple gravity steps between each collision check, if the collision detection really is too slow.
Your input will be a year, and will be no less than 1970. Your program should output next year on which New Year falls on the same day of the week.
Test Cases:
Below are the sample inputs and outputs
2001 => 2007
2047 => 2058
2014 => 2020
1970 => 1976
1971 => 1982
1977 => 1983
2006 => 2012
2...
I've seen some code golf languages that still a work in progress (functions being added etc), but they have already been made public and people are posting answers using those languages.
I'd like to know what the standard practice is regarding changes to the language as it's still being polished...
Draw a Christmas Star / Stellated Dodecahedron!
The process of stellation involves extending the faces of a polyhedron until they cross other faces. Thus starting with the dodecahedron, we obtain the following (images from https://en.wikipedia.org/wiki/Dodecahedron, attributed to the author ment...
I seem to remember seeing a pyth solution where the program ran a loop until the result was the same as in the last iteration. Anybody know how to do this? I need to traverse a grid until the coordinates point to itself.
Yeah that seems right. I don't know how to use reduce though (in general). Will the description make sense if i read up on reduce in general terms you think? I love how even the documentation for pyth is golfed :p
@user2298369 Haha, well, you might be able to figure it out by looking at some existing answers that use it. The only reason I knew that was because I saw it in a recent Pyth answer:
Pyth, 8
u+G!OTsQ
Try it online
This uses Pyth's second mode on reduce, that looks for repeated input then exits.
Explanation
u+G!OTsQ ## Implicit: Q=eval(input())
u sQ ## reduce with 2 arguments, which causes a loop until the reduce gets the
## same argument twice
+G ...
Is anyone planning any challenges along the lines of codegolf.stackexchange.com/questions/42761/… - I thinking about posting one with fewer vertical dimensions, and more trigonometry
Stack Exchange automagically detects serial
voting (when one user either
upvotes or downvotes many of another user's posts) and reverses it. In this
challenge, you will implement a very, very simple "serial vote" detector.
Input
The input is a string representing a list of votes. Every group of...
Hey would you guys like another happy number challenge codegolf.stackexchange.com/questions/2245/… but this time I ask you print the sequence of power-and-sum, and for input, you have the number itself, the power to which each digit is raised, and the base that we're happificating in?
Is there anyone who can look at some pyth code with me? I know it's wrong, but it's getting a bit convoluted and i'm very new to pyth so i'm finding it difficult to wrap my head around exactly how to proceed.
Got a paste with link to the online interpreter with my code and the input here: pastebin.com/67ygDqxU