« first day (70 days earlier)      last day (3153 days later) » 
05:00 - 19:0019:00 - 22:00

5:44 AM
@rayryeng not the entire image .....but the centro ids of different parts is the feature vector...actually if u remember that i segmented the image using k means so i am using the mean/centoid position as a feature vector ....In my case where i have done 10 clustering ..ie 10 means i am only using one...the head one ... I have created a 340 vector consisting of head centroid's abcissa for 340 consequetive images
only the heads mean's x coordinate is mapped though 340 consecutive images not the entire 10 means
srry 1x340 vector
 
 
3 hours later…
9:02 AM
@rayryeng That is, no doubt, the best post of stackoverflow.
@LuisMendo Brilliant answer btw.
 
9:29 AM
@AnderBiguri Thanks, Ander! Answers with plots, specially animated gifs, are always fun
Fancy some code golf, anyone?
11
Q: The Margin is too Narrow

TheNumberOneAround the year 1637, Pierre de Fermat wrote in the margins of his copy of the Arithmetica: It is impossible to separate a cube into two cubes, or a fourth power into two fourth powers, or in general, any power higher than the second, into two like powers. I have discovered a truly marvelous...

There are two Matlab answers already!
 
haha indeed! they are the ones I most like! But the way yo made that interactive plot, thats very cool
 
I don't do that stuff in Matlab often. It reminds me more of programming Java/Android: add a listener that responds to certain events
 
yeah. Its not what matlab is designed for, but still possible to do!
I just realised that Matlab shows the status of the files with respect to your git origin if you have the folder on git
Never seen it before, its pretty cool
 
I don't use GIT, but I read something about Matlab being integrated with it
Anyone tried 2015b yet?
 
nop
Is it out? I guess I can ask for upgrade
 
9:36 AM
Amro said it was, if I recall correctly
 
downloading it right now ...
 
Maybe I will download it this weekend if I have some time. Downloading from Mathworks site is slow for me
 
I need to ask IT, and do stuff for getting it....
Are there some mayor imporvements?
like hg2
 
I don't think so
Well, Amro said it had better JIT optimization. That may be a major improvement, if it speeds things up
 
indeed
 
9:40 AM
Release Highlights
MATLAB Product Family

MATLAB: New execution engine that runs MATLAB® code faster

MATLAB: Graph and directed graph functions for creating, analyzing, and visualizing graphs and networks

MATLAB: Add-On Explorer — a single interface for adding community-authored and MathWorks® toolboxes, apps, functions, models, and hardware support

MATLAB: Hardware support for iOS sensors, Raspberry Pi™ 2, and BeagleBone Black

MATLAB Compiler SDK: Deployable MATLAB components for integration with applications written in Python®
 
@Ander "El motor de ejecución de MATLAB de nuevo diseño usa la compilación justo a tiempo (JIT) de todo el código de MATLAB, cuando el anterior motor de ejecución solo usaba la compilación JIT en determinados casos"
(Sorry, Mathworks automatically switches to Spanish for me)
 
Nice!
It also has better mex support
that is useful for me
 
Sounds promising indeed
 
10:01 AM
@LuisMendo, your solution for the code golf horizontal histogram does not use the last word from the input.
 
10:17 AM
@(s)char(arrayfun(@(n)repmat('*',1,n),cellfun(@numel,strsplit(s)),'un',0))
does work, but it's a couple of byte longer
 
11:05 AM
time to find a working R2015b version it seems
and getting punished for helping a very unclear OP isn't funny :D
Interesting: apparently you can't delete accepted answers, even though they are plain wrong and give errors.
 
11:34 AM
You can flag them or downvote them
 
it's my own answer :P
but I fixed it (at least, the code runs without errors. I still dont get what the OP wants), so I'll leave it there
 
11:49 AM
Using eval hum
You are going to get kicked from this forum, I am sorry.
 
thought as much
which is why the note
and why I wanted to remove it all together :P
 
Nah, its good. It is the answer to the question, though the whole thing is wrong from the beggining. AS you say, the OP should just do it somehow different
 
Should I add the solution using dir as well? As in: if they are filenames, not variable names. It's an easy addition
 
Its, alright. The answer is good, as you are also pointing out that he should do it differentky
You could if you feel like. But is a -3 question, you can also just leave it like that
 
if I do REALLY good I might get reversal :P
 
11:54 AM
haha indeed
I already upvoted you
 
out of curiosity: can you vectorise sprintf? I can imagine it would thrown an error since you only use %d once, whilst you'd add a 200 length vector in it
 
what do you mean vectorize? how?
with arrayfun or something like that?
 
no, like sprintf('image_%d',1:200);
which Id like to give a 1*200 array of strings, instead of an error
 
yes you can
but gives 1 string
 
'image_1image_2image_3 ... >
 
12:00 PM
str=strsplit(sprintf('image_%d ',1:200),' ')
 
ah, so you can't really use it in this case
 
you need to delete the last one though
 
after lunch Ive got an hour to properly work this out, thanks buddy
 
posted on September 09, 2015 by Loren Shure

Have you ever wondered how Google provides the auto-complete feature in Google Suggest? Or sometimes you see results of hilarious or annoying auto-correct features on your smartphone? Today's guest blogger, Toshi Takeuchi, explains a natural language processing approach through a fun text mining example with Shakespeare.... read more >>

 
what?!? MATLAB AND Shakespeare? Brilliant!
 
12:07 PM
haha
I met a CS woman in the uni, doing machine learning to analyse shakespeare's writting style
so they coudl get features like "creativity, ..." out of poems
 
Do you know the infinite monkey-theorem?
 
@Adriaan Also work with code tho :P
 
@HamtaroWarrior in what?
 
Yeah I know
 
You can make monkey write for an infinite time, they will at some point write the whole code I'm currently editing ^^
 
12:11 PM
ach so. Yes indeed
 
And writte it more elegant than you :P
 
but Shakespear is more fun than code imho :P
 
@AnderBiguri or code golfing it!
@Adriaan indeed!
 
12:59 PM
@AnderBiguri Ive updated the question, see stackoverflow.com/questions/32467029/…
 
Nice! good job
 
thanks!
it's rather fun, trying out the formatting options of So
 
@Hoki Thank you! I've corrected it by a adding a space at the end
 
of course it was that simple ... I always go for the more convoluted option first. Well done.
 
@Hoki Actually your suggestion has 1 byte less! And your answer is great: much shorter :-)
 
1:12 PM
yep, a few byte less, but it fails for one of the criteria : if a double space is there I will have an empty line in my graph (It is not supposed to if I understand the OP correctly)
 
1:24 PM
2
Q: Nudity detection comparision /state of the art (lib/ opencv based VS custom computervision & hash-lists & client side)

jonasWhat are the missing details in the table right below? In other words Task here is to fill the gaps in the comparision table template right below == to "Take inventory of all 'the worlds' existing approaches for this developer task. (Yet widely un-known/covered) This is a wiki format question s...

This is by far the msot confusing question I ever read
and has 2 upvotes and 3 favorites
I have literally no idea whats going on there
 
1:42 PM
God This question formating is awful
 
I think (just think) that the user is asking: "please, can you do a 2 month research on nudity detecting algorithms"
 
The real question is : does he give data samples so we can try it? ;D
 
hahaha
 
2:02 PM
0
Q: Triangle Multiplication Table in Matlab

John_BarretHow would I write a script that will print the following? Up to n. where the user inputs n? 1 1 2 3 6 9 4 8 12 16 5 10 15 25 30 n......

I take it this will be our own golf challenge for the weekend? :P
 
2:13 PM
The easy, non golfed solution
[x,y]=meshgrid(1:n);
T=tril(x.*y);
 
Im not sure I can create a one-liner, but I can do it within 10 for sure
heh, that's even better than what I'd in mind. Kudo's @AnderBiguri !
 
:D
30 bytes (without T= and the last ;)
 
I'd have gone with a nested loop, since Im a total scrub
 
@AnderBiguri its patter detection right ?, i assmume its lil bit confusing because a black-clothed black human is mistaken with his nude form, but think about it, that might help much in paternal censorship more than proxies or dns-filtering do
 
2:36 PM
@AnderBiguri or tril(cumsum(meshgrid(1:n)))
 
Ive got a feeling I won't win any prizes in the golf tournament
 
or, golfed: tril((1:n)'*(1:n)) =)
That'll be 18 chars. Not sure I can do much better than that. =)
Hehe, @Adriaan, you might... You only need to write something shorter than 18 chars =)
 
I can do that.
^14 chars
 
Go ahead! =)
Is it possible to skip the parenthesis in MATLAB? I only tried it online in Octave.
@Adriaan, aha - aha - aha... :P
 
in that case MATLAB'd underline it with orange wiggles. Second 1:n Im reasonably sure of that you can drop the brackets, but with the first one it only transposes n instead of the full array if you leave out the brackets
 
2:47 PM
I didn't get that one at all... You could have saved a few more chars if you just wrote: "I won"
@Adriaan, I feel stupid now! :P
 
:D
you never said those chars had to mean anything ;)
 
order of operations won't let you do it without the parentheses, the colon operator isn't evaluated until after all of the other arithmetic
only thing evaluated after the colon operator is the logical operators
 
just out of curiosity: I'm working on quantum mechanics now and we often use the Bra-Ket notation (en.wikipedia.org/wiki/Bra%E2%80%93ket_notation). Is it somehow possible to use this in MATLAB? Not that I'd need to, but more as a kind of thought experiment
 
@excaza, that was what I thought as well... But then he said he could write something in 14, and removing 4 parenthesis would achieve that... timeit(@understand_joke); ans = 2 minutes.
 
I reckon it might be possible if you input your formula as a string and use some nasty character-recognition to deal with the operations
stackoverflow.com/posts/32482324/revisions that's exactly my edit, he just pasted his own name over it ...
 
2:56 PM
@A Yuck... Reminds me of something I saw once: Overloading operators in C++. Something equivalent of + = @builtin('minus')
 
yea
 
@Adriaan not exactly your edit, he also capitalized an M and bolded cftool
still stupid
 
@excaza jap, he could've at least given me my 2 rep :P
 
@Adriaan, it happens if you click "Improve edit" in the review queue. If he had clicked "Edit was helpful", it would be your name there...
 
Ray mentioned something like that; if he edits it himself after my edit, it gets applied instantly, instead of having to wait for 4 upvotes
but when he does it, it still bears the original edit made as well
 
2:59 PM
I thought "Edit was helpful" was checked by default... If he removed it, then he's kind of a douche...
 
@Adriaan - Correct about the edit.
 
Hej ray!
 
Ray is right, but he can still select edit was helpful and it would get your name. Well, it might have changed by now... I stopped reviewing edits after 1100-something
 
the latest edit says that you did it, but if you look at the history, it acknowledges that the previous person who proposed the edit is there.
Yes, it still registers as helpful... so long as the reviewer chooses to improve the edit.
 
oh well, I can do without the 2 rep, just thought it strange and possible douchy by that guy
 
3:00 PM
if you reject and edit, you don't get the rep... it's a douche thing to do.
Yeah I NEVER reject and edit.... unless it completely changes the perspective of the question.
@Adriaan - Hello!
If they're things like grammar changes or code formatting... sure thing.
 
Oh well, I got some rep today already from answers, so Im pretty fine with it
 
But it sounds like this guy took your work, rejected your edit and used your edit as a base for small improvements.
that's really a dick move to be honest. I've never done that.
 
Also, he didn't get any rep! You stop getting rep from editing after you hit 1500.
 
I thought it was 2k!
 
Or else people that really care about the Unicorn points could edit 100 posts each day.
 
3:02 PM
@StewieGriffin Ive also heard it stops after 2k (since your edits get approved instantly then). Ive read for sure that you only get rep for the first 500 edits
 
@rayryeng, OK, it might be 2000, it's been a while since I was there...
 
@AnderBiguri - That jonas guy has a reputation for asking confusing questions.
He has been around for a while, but hasn't asked a question... he has decided to come out of his cave.
 
That one is brilliant
its just so confusing in so many ways
"fill the blanks"
 
@AnderBiguri - Which post is the best? lol
 
_____ : ___
 
3:03 PM
sorry still catching up.
 
0
Q: Nudity detection comparision /state of the art (lib/ opencv based VS custom computervision & hash-lists & client side)

jonasWhat are the missing details in the table right below? In other words Task here is to fill the gaps in the comparision table template right below == to "Take inventory of all 'the worlds' existing approaches for this developer task. (Yet widely un-known/covered) This is a wiki format question s...

I mean how do you fill the blank in _____ : ___
Fruit: Banana
Unclear: this question
 
@AnderBiguri even better than people posting their homework, people that post something where you have to figure out the answer AND the question!
 
Yes, accepted answers can't be deleted.
No matter how wrong they are. Flagging is only for posts that are inappropriate or don't answer the question.
or link only.
 
@HamtaroWarrior That one is NP-Hard
 
3:07 PM
I just had to!! =)
Please include tags: and . =)
 
lmao
There's only one question for each tag...
I'm actually surprised.
 
@rayryeng :D
 
funny :D lol
 
I think most code-nerds do not know what to do with actual human-beings, let alone nude human beings ;)
 
:D:D:D
 
3:11 PM
@Adriaan I'm pretty sure "code-nerds" know very well how to find/identify nudity online...
 
Yes they just don't admit it :D
I'm trying to find this post... where the OP asked a question... and the answer was absolute nonsense...
the answer was the OP's own answer to the question
it got flagged at least twice, and it didn't get deleted... because it was accepted.
 
1
A: Saving a specific simulation time

Adriaanfunction y = fcn(t,v,dv,tv) %#codegen y = zeros(length(t),1); % Initialise the array for ii = 1:length(t) if (v==tv+0.01) & (dv<0) y(ii)=t; else y(ii)=0; end y(y==0)=[]; end Two changes: added a semicolon after y=t to force it to not print it every time it is set. Second, your questio...

does anyone have more experience with Simulink than I do?
(not terribly difficult, I have none)
 
@Adriaan - You must have that minimal example message pasted somewhere lol
@Adriaan - I don't use Simulink... not as much as I'd like. With what I do, there's never a use for it.
 
@rayryeng when doing review queues I actually do have it under ctrl-v :P
 
I have a MVCE gist snippet since it happens so frequently
 
3:19 PM
hahah very nice.
 
I still don't full yget comment-formatting, especially links
 
What do you mean?
 
how to add them in a formatted way, like I can do in questions/answers
 
ah well it's very much the same.
 
so instead of http://google.co.uk, google itself being the hyperlink
 
3:25 PM
ah well that's very easy
It looks like this:
[Text to enter here](http://URL/here)
Isn't that what you did in your comments though?
 
ah, round braces in the end, thanks
 
so... [Google](http://www.google.co.uk)
 
no, I always use [mcve] and just the regular link for the rest
 
oh :)
@LuisMendo - I'm going to tackle the Fermat's Last Theorem in Python
the MATLAB version is out :p
 
okay, i have to catch up with all of your code golf... brb...
@StewieGriffin 16 chars in Octave:
tril((a=1:n)'*a)
 
3:46 PM
@beaker, can you do stuff like that in Octave? I don't approve! It should always be possible to copy an Octave-code into MATLAB...
That being said... Nice! Learned something new today =)
 
@StewieGriffin Yes, that and stuff like
magic(5)(2,4)
 
@beaker the post about that in MATLAB completely blew my mind
 
bahahaha.... @LuisMendo your O(N^2) technique wins over O(1) again...
 
@StewieGriffin @ray brilliant
 
what? lol
 
4:00 PM
The comment in pornoghraphy :P
 
oh yeah :D
0
A: The Margin is too Narrow

rayryengPython 2, 182 bytes I usually answer in MATLAB, but because there are already two solutions, I'd figure I'd try another language :) [c,x]=map(int,raw_input().split());print(max([('%d^%d + %d^%d < %d^%d'%(a,x,b,x,c,x),a**x+b**x) for b in range(1,c+1) for a in range(b,c+1) if a**x+b**x<c**x],key=...

I answered in Python. Luis and flawr took the MATLAB answers :(
 
The problem with python in codegolf, is that Pyth exists
 
oh I know.
I figured I'd throw in a Python 2 solution for the hell of it.
 
@StewieGriffin Now you have the "honour" to have been the creator of those tags :-P
@beaker What question are you referring to?
 
haha its good, not triyinh to disencourage you, just saying that generally it wont win
 
4:11 PM
yup lol.
I'm commenting so you can follow along.
the post.
 
The other day I had one of my answers edited in Meta. They changed "Matlab" into "MATLAB". And I realized it's true! The official name seems to be all-capitals.
Anyway, that's ugly. I don't intend to use it. It looks better with only first capital
 
Really? I always get annoyed by people capitalizing the name....
 
Me too!
But... they seem to be right
 
really? I use all capitals all the time lol.
 
Yust realized the room name is in capitals .... :P
 
4:15 PM
@AnderBiguri - Code explained
1
A: The Margin is too Narrow

rayryengPython 2, 182 bytes I usually answer in MATLAB, but because there are already two solutions in that language, I'd figure I'd try another language :) [c,x]=map(int,raw_input().split());print(max([('%d^%d + %d^%d < %d^%d'%(a,x,b,x,c,x),a**x+b**x) for b in range(1,c+1) for a in range(b,c+1) if a**...

 
Mathworks write it all capitalized
 
@rayryeng nice!
 
@LuisMendo The distance to the grid one... mmmm.... hang on
 
@rayryeng Then you're doing it the right way (all capitals). I hadn't noticed
 
I'm surprised nobody comment on "widely ... uncovered" in that nudity post ;)
 
4:16 PM
:-DD
 
Something weird was happening in that post. I can not believe that 3 people upvoted it and other 3 favourited it
In the pr0n one
 
@AnderBiguri - I think that guy has sock puppet accounts.
 
Since it's short for matrix laboratory you at least need to call it MatLab
but following the naming convention for most software libraries from the time, the acronym is all caps and we get MATLAB
 
@AnderBiguri Three people working for central censorship?
 
4:17 PM
That post cannot be favourited by so many people. It doesn't make sense.
 
@beaker Oh, that one. I hadn't seen your anwer
 
I've always called it MATLAB. lol.
 
@beaker Direct computation. Nice!
 
Do you also shout it loud when you are talking with someone? :P
 
Hahahaha
 
4:18 PM
@AnderBiguri - Thanks :D. It's nice to flex my Python muscles every now and then.
 
@beaker ahhaha probably. Some worried mothers.
 
@AnderBiguri - YES I DO
@AnderBiguri - BECAUSE IT MAKES ME SO EXCITED
 
hahahaha
 
@beaker Your approach only works for equally spaced grid points. But that's fine, because the OP asked for that. And in that case it's probably faster than mine
 
I feel bad. I should be helping people on SO answer questions, but I've been fixed with code golf lately.
and especially this last question lol... since I did it without MATLAB.
 
4:22 PM
I post codegolfs with fake accounts, so I have all of you guys playng around and I can answer something and get some unicorn points
 
@Ander Nice trick! :-D
 
@LuisMendo Yes, it will only work with equally spaced grids
and I slowed it down to O(M+N) by not taking the grid size as a parameter
 
@Hoki yea, I read that, but never figured out how to do links. But probably I just skimmed too fast ;) I did try [google][google.co.uk], but that obviously doesnt work
 
@Adriaan - you need the http:// keyword in there
If you don't, then it doesn't know where you're referring to.
and make sure you have the () around the second part :)
 
4:33 PM
and yes, the http:// is now mandatory (it didn't use to though)
 
@Hoki - I always use to just use http:// to be complete... that's just me being a bit of a perfectionist lol
@LuisMendo - flawr's solution
4
A: The Margin is too Narrow

flawrMatlab, 169 153 bytes The score can be +-1 depending on the unsolved problems in the comments=) The score stays the same. This is just a bruteforce search for the best (a,b) pair. Pretty disappointing: I first tried experimented with some 'fancy' stuff and then realized two simple nested for ...

Is it just me, or is the output variable q not being used anywhere? He can shave off some more bytes by making the function declaration without q.
 
@rayryeng Yes, I wrote that in a comment too
(two comments above yours)
:-)
 
oh I didn't see that lol. sorry.
 
GTG. Later!
 
bye!
 
5:03 PM
hello
 
6:01 PM
@Adriaan - I provided an answer to that question you commented on :)
0
A: Matlab vrrotvec2mat input argument

rayryengIf you want to understand this function, you need to know the Rodrigues Rotation formula, which is also known as the axis-angle rotation formula. I'll explain this to you with some introduction first. In Linear Algebra, the most standard way to rotate a point, whether it's 2D or 3D is to use a ...

 
rayreng ur thoughts on that
 
@rayryeng you have way too much time on your hands
 
@Adriaan - lol lunchj break :)
 
I ve just had dinner
 
you're not watching the apple livestream??? :-o
 
6:05 PM
and "That question you commented on" is rather broad in my case :P
 
@beaker - Nah lol.
I'm not watching it because it's going to make me buy more of their products and I don't have money
 
3 new platforms to code for ;)
 
haha yup
 
6:25 PM
This is the most interesting post I've seen on code golf
Given a source image and a target image, you are to recolorize the target image using only the colours from the source image and make it look convincing.
307
Q: American Gothic in the palette of Mona Lisa: Rearrange the pixels

Calvin's HobbiesYou are given two true color images, the Source and the Palette. They do not necessarily have the same dimensions but it is guaranteed that their areas are the same, i.e. they have the same number of pixels. Your task is to create an algorithm that makes the most accurate looking copy of the Sou...

 
pff, and you didnt even solve this over coffee?
 
hahahaha
 
Im dissapointed in you @rayryeng
on a side note: Im the only one in this month's top MATLAB with a ratio below 1 :P stackoverflow.com/tags/matlab/topusers
 
how did you figure that out?
 
pressing the 'top-users' button was pretty easy
 
6:34 PM
no I meant the ratio lol
 
and dividing two numbers in my head isnt rocket-science either
oh, I meant score/answers
 
ohhh
 
so basically I answer way too much and too consice/crappy
 
yeah I can't see your point/score numbers.
Those are for only visible to you if you're not in the top 20.
never mind I see you
face palm. 40/50 isn't so bad!
That just means you like to answer a lot of questions from new users... who don't know how to accept yet.
 
no, score means upvotes
total upvotes, not total rep gained
the same which count for the tag badges
 
6:36 PM
oh, I always thought it was total rep. Now that makes more sense.
 
:P
 
yeah that annoys me.
Simply accepting doesn't count towards the tag count.
 
4 upvotes on 50 questions'd be ridiculously bad :P
 
haha yes.
 
I got hammered over a -3 question today, so I did some more work trying out SO's formatting and luckily reversed the score :P
 
6:40 PM
-3 question? You asked one?
 
God no, Im not that bad
I made the mistake of answering it :p
2
A: How to put these images together?

AdriaanDynamic variables Note that whilst this is possible, it's considered to be bad programming (see for instance here). It would be much better to load your images directly into either a 3D array or a cell structure, avoiding dynamic variable names. I just posted this for completeness; if you ever h...

 
ohhhh
oh yes that one.
 
Ander almost kicked me for daring to use eval :P
 
Surprised I didn't see that there. I've upvoted.
yeah... try not to use it. Avoid it if you can.
the main reason why you avoid using eval is not only does it make your code less readable, but JIT does not kick in with eval expressions.
 
I had to in this case, though Im still in the dark as to how the OP gets his images
 
6:42 PM
so it also makes your code slow.
yeah sometimes you have to use it... one case is if you want to generate 100000000 different variables lol.
which is considered bad practice - use a structure with dynamic field names instead.
 
or a cell array
 
yes! definitely that.
 
which you can at least call using indexing
 
05:00 - 19:0019:00 - 22:00

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