« first day (69 days earlier)      last day (3153 days later) » 

9:19 PM
Here's my code golf entry for the day
1
A: It's my Birthday :D

rayryengMATLAB / Octave, 194 198 bytes n=input('');if(n==0)disp('Congratulations on your new baby! :D'),break;elseif(n<0)m=' '.';n=1;else m='$|'.';end,b='-~-'.';c=[m ' '.'];disp([[[' ';' '] c(:,repmat([1 2],1,n))];b(:,ones(2*n+1,1))]); Sample Runs I placed this into a script file called happy_birth...

Original question:
41
Q: It's my Birthday :D

Beta DecayIntroduction Today's my birthday (really!) and sadly I've had to organise my own party. Well, now you know, couldn't you at least make the cake? Challenge Given an integer n as input, write a full program to output a birthday cake with n candles on. Output A piece of cake with one candle on ...

 
-2
Q: How to put these images together?

ShawnI have 200 time points. For each time point, there is an image, the size of which is 40*40 double, corresponds to this time point. For example, image 1 corresponds to time point 1; image k corresponds to time point k (k = 1,2,...,200). I want to put all these 200 images together. The final size i...

this OP...
cant even create ONE SINGLE comment >.<
 
lololol
 
I'm tempted to draw from my vocabulary on eloquent English words to call someone names without them realising I do
 
"unrelated to my question"... nope
 
I was about to throw that in his face when he added the comment of time
just approve my edit and at least that'll be clear in the question
it's like asking "What tires do I need" and saying your type of car and the area you're driving in are irrelevant
 
9:32 PM
hahahahaha
 
done
 
@beaker cheers. Now I only need the upvote and then there's just 75 to go for 'refiner' badge :p
urgh, the OP
for some reason I have the feeling he is what we'd call in the Netherlands 'East-Indian deaf' i.e., deaf to selected information
 
well, you did promise a vectorized approach ;)
 
I did not
I pointed out there might be one
would something like this work: t=1:200; str=sprintf('image_%d',t)
 
that's what he heard
 
9:38 PM
if that creates a 1x200 (or 200x1) array, that's the vectorised way
Im not doing anything more tonight, Im knackered. If that solution worked, you have my permission to add it and make the answer community wiki or however that works
good night y'all
 
i'm sure there's a duplicate somewhere using eval ::shudder::
good night
 
sorry let me catch up.
I've been code golfing for a bit lol
 
@rayryeng :-D Nice room topic!
 
Beaker suggested it! :D
I spent the last hour trying to improve my code golf solution. I shaved it down by 5 bytes. It originally went up by 4 because I forgot to set a variable, then I got it back down again.
 
The old one was getting boring ;)
 
9:49 PM
lol sorry
@LuisMendo - That challenge took me about 30 minutes to do. I kept on reducing and reducing... trying to shave off characters and variable names.
189 is the best I could do :(. The Pyth implementation is 67 bytes lol. sigh.
 
Well, it's a very small factor! Pyth and CJam always beat me by about ten :-D
 
:D lol.
it makes you want to learn the language just to code golf.
 
Is there any other reason to learn them?
 
Someone should write a translation of MATLAB / Octave that is meant for code golfing.
 
It's tempting, yes. But Python is higher on my list
 
9:59 PM
@beaker - uh... to show off at parties?
 
We would call it MATL :-)
 
:D:D
 
@rayryeng You go to really boring parties, don't you? ;)
 
Or how about Moctl
can't forget about Octave!
@beaker - haha yes.
 
@rayryeng You mean to get sacked from parties
 
10:00 PM
NO absolutely not :D
0
Q: How to read data from an html page into a cell?

StuckInPhDI have to manually populate a spreadsheet of many webpages. I only have to pick up some details from every page such as its title, description, etc.. Doing this manually is becoming too monotonous and boring so I thought I could semi-automate it using Matlab. Suppose this is the page as an examp...

One of the answers was to regex the HTML page.
I'm reminded of this post
4427
A: RegEx match open tags except XHTML self-contained tags

bobinceYou 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...

 
Same here. hahaha
The Pony, he comes
ALL IS LOST
Hahaha
Pure poetry
I love it!
 
:D:D lol
 
But with title tags it may works, right?
 
Did you know that you can buy a shirt that has that post on the front?
 
As long as there's only one opening and one closing tag
 
10:06 PM
@LuisMendo - Yes... we don't know that for sure :( lol
 
Yes, I saw that T-shirt
I thought they sent it to you on 100k, or maybe 200k
Can you buy it?
 
I believe you can. I can't remember where I saw it for sale though...
but I did see it on some e-commerce website
 
I thought HTML pages only had one opening and one closing "title" tag. But I seldom write or edit HTML...
 
it does, but sometimes some people don't put in a title :O
so the regex will fail lol
 
:-)
 
10:10 PM
hehehe :D
 
10:34 PM
OK, time to go home. Getting a bit late here at work.
Buenas noches @LuisMendo! @beaker - will probably see you later tonight.
 
later @rayryeng
 
Bye, @rayryeng! Bonsoir!
 
10:56 PM
Good evening you too, @beaker! I'm going to bed
 
good night @LuisMendo
 
11:49 PM
I was going to bed. But this question was too interesting! :-D
1
Q: Matlab imline snapping

EricIs there a way to make the ends of a line created by imline snap to the nearest data point on a curve? I'm trying to measure the slope between two points on a curve. The imline is great, but the ends of the line created by it do not snap to data points on a curve. I'm wondering if I can drag t...

 

« first day (69 days earlier)      last day (3153 days later) »