@Doorknob冰 The only problem with scrolling in vim using j and k is that if I forget that I'm in insert mode, I just get a line of jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
I might be an idiot, but can subclasses call a parent's private methods in Java? I'm almost sure they can, but eclipse says I should change it to public.
The official tutorial may be of some use to you.
| Class | Package | Subclass | World
————————————+———————+—————————+——————————+———————
public | y | y | y | y
————————————+———————+—————————+——————————+———————
protected | y | y | y | n
———...
Consider a matrix M with 2 rows and n columns over integers given as the inpput. Now consider a fully random vector x whose values are either -1 or 1. The task is to compute the base 2 Shannon entropy of Mx
@AlexA. I slightly disagree. That is important for friendliness. But I have also observed that there is a slippery slope where everything just becomes puerile then no one likes to discuss interesting problems any more
@dorothy Heh, "puerile" is a pretty good word to describe how things go in here sometimes, with or without profanity. It's often been observed that this room rarely stays on the topic of code golf (or even vaguely related matters), though most are usually willing to engage in a good relevant discussion. :)
@KhaledAKhunaifer Dorothy was referring to a bound on n in the problem she discussed, whereas I think you were talking about the topic of the room being anything.
Nota bene (/ˈnoʊtə ˈbɛneɪ/, /ˈnoʊtə ˈbɛni/ or /ˈnoʊtə ˈbiːni/; plural form notate bene) is a Latin phrase meaning "note well". The phrase first appeared in English writing circa 1711.
Often abbreviated as "N.B.", "N.b." or "n.b.", nota bene comes from the Latin roots notāre ("to note") and bene ("well"). It is in the singular imperative mood, instructing one individual to note well the matter at hand. In present-day English, it is used, particularly in legal papers, to draw the attention of the reader to a certain (side) aspect or detail of the subject on hand, translating it as "pay attention...
@dorothy Did you know that you can reply directly to a message? When you hover over a message, a downward arrow will appear on the left side of it. Clicking that brings up a menu from which you can select "reply to this message." Similarly, the little arrow button on the right side of the message replies.
Given an input string, determine the number of regions that a page will be split into.
Consider the letter P. It has one enclosed region within the letter. Assume that each letter splits the page by one or more regions (i.e. a box is drawn around the character).
Input
A string of 0 or more cha...
So, uh, I wrote some additional code that runs the Spacewar! KotH as fast as possible. 20 games now take a whopping 8 seconds, instead of 30 minutes. :D :D
What's hard is having a conversation with a 12-year-old who's trying to lecture you on why IQ makes you inherently smarter than everyone else whilst trying to point out that there's no way in hell that it guarantees anything and it's an outdated test that proves nothing. ಠ_ಠ
@FlagAsSpam Tell that 12-year-old that the original point, and basically the only thing it's good for, is to test for mental disabilities, and as a test for measuring intelligence, it's about as good as a meter stick for measuring parsecs.
Despite my opinion on this, I did become a member of Mensa anyway, so take that with a grain of salt
@FlagAsSpam Yeah, a friend invited me and I was interested in the community at the time, but I haven't had any time to attend any gatherings in the two months since I signed up.
Because the end result is a 2xn x nx1= 2x1 matrix and the Shannon entropy of two symbols is 1 or 0, depending on whether the two integers in the 2x1 matrix are different or the same.
Title Computing the entropy
Input
A matrix M represented as two space separated lines of integers. Each line will have the same number of integers and each integer will be either -1 or 1. The number of integers per line will be at most 20.
Output
The binary Shannon entropy of Mx where the el...
Input
A matrix M represented as two space separated lines of integers. Each line will have the same number of integers and each integer will be either -1 or 1. The number of integers per line will be at most 20.
Output
The binary Shannon entropy of Mx where the elements of x are uniformly and...
I have written a program in C to generate Seed programs from a Befunge program. It is a very long, brute force calculation. So that it can be heavily optimised, the input variables are hardcoded using Macros. However, I was wondering if there was a better way to do this.
Here's the Mersenne Twis...
Guys. This code will find a Hello, World program in Seed in a reasonable amount of time. I've just got a really rubbish laptop. If anyone has a gaming Desktop, it should only take a few hours.
Have you got its speed? Or are you just going to run it.
Because there is a small possibility that it might run forever if it doesn't find the right seed after going through all the possible values of the unsigned long.
But that failure probably won't happen; people have said that it is probably possible for a Hello, World program to exist.
And I've set that program up with the smallest known, and probably smallest possible, Hello, World program in Befunge.
This challenge is based on Downgoat's Adjust your chair.
Challenge
You just adjusted your new chair! It fits you perfectly. However, the wheel is squeaky and you know the repair people will change the adjustment. Problem is, you don't have a ruler, so you'll have to write a program to measure i...
Let's map some strings to 2d space, fractal style. Your task is to compute a Hilbert curve and lay a string along it.
Task
The task is to take the single-line input string, and lay it out along a Hilbert curve big enough to contain it, but no bigger. Try to make the byte count as low as possi...
People often take the approach of code-golf unless that wouldn't work, in which case some form of code-challenge, probably popularity-contest. And then they criticize people when they don't.
@yeti No it doesn't. You select a language that fit's the task and optimize only hotspots. Speed optimizations only yield ugly code if you use the wrong language and tools.