It finds an indexed permutation for the list. So each permutation index will give a new permutation... at least until you run out of integers which is at about 12 items.public staticboolean permutation(List values, int index) {
return permutation(values, values.size(), index);
}
private staticboolean permutation(List values, int n, int index) {
if ((index == 0) || (n == 0)) return (index == 0);
Collections.swap(values, n, n-(index % n));
return permutation(values,n-1,index/n);
}
Ssnot!
God Snot, Where God's Not.
Friday, May 24, 2013
Sometimes code can be pretty... and worthless.
Monday, May 20, 2013
Been a while since I posted.
I blame facebook. Keep posting minorly interesting things there and not here for nobody to see.
Tuesday, April 23, 2013
Successful marriages.
To say that those marriages which end in divorce are failures is to say that those marriages which end in death are successful.
Friday, April 12, 2013
Carrier Debate, fun
Oddly a slaughterfest. I loved the parts where Richard Carrier finished. Like he answered all the points and just sat back down with time on the clock.
Sunday, April 7, 2013
What you should want to dust a computer.
Computer people sometimes want canless air systems to blow out computers. But they cost like 60-100 bucks.
http://www.amazon.com/Metro-Vacuum-ED500-500-Watt-Electric/dp/B001J4ZOAW/ref=pd_sbs_op_1
Computer people should want AC air mattress pumps. They cost 17 bucks and you might already have one.
http://www.amazon.com/Coleman-120V-Electric-Quick-Pump/dp/B0009PURX6/ref=sr_1_2?ie=UTF8&qid=1365381470&sr=8-2&keywords=mattress+air+pump
http://www.amazon.com/Metro-Vacuum-ED500-500-Watt-Electric/dp/B001J4ZOAW/ref=pd_sbs_op_1
Computer people should want AC air mattress pumps. They cost 17 bucks and you might already have one.
http://www.amazon.com/Coleman-120V-Electric-Quick-Pump/dp/B0009PURX6/ref=sr_1_2?ie=UTF8&qid=1365381470&sr=8-2&keywords=mattress+air+pump
Friday, April 5, 2013
Idea of the day: Space exploration through sexism.
No woman has stepped foot on the moon. And no woman ever will! NASA knows that women have cooties.
You'd want to blame a coincidence but it really is sexism that tended women away. And you'd want to say that it's not true, but we can't go to the moon. China seems inclined to send folks to the moon again, maybe some Chinese woman will be the first woman on the moon. Heck Valintina Tereshcova was the first woman in space.
You'd want to blame a coincidence but it really is sexism that tended women away. And you'd want to say that it's not true, but we can't go to the moon. China seems inclined to send folks to the moon again, maybe some Chinese woman will be the first woman on the moon. Heck Valintina Tereshcova was the first woman in space.
Tuesday, April 2, 2013
Need a scale to size function for the actual monitor to the real life object?
Some programs have a zoom to scale function that requires training the program to know how large their pixels are, so they sometimes do things like ask what size a specific line is, so you take out a ruler and measure it.
A better way of doing that is by using the ISO 7810 standard to your advantage. Credit cards and most ID cards are all the same size. If you can indicate what size that is, you can scale images to the correct size without much effort and it works internationally etc.
Took half an hour to figure out a good standard candle but it turns out that international banking demanding a standard is actually quite useful.
A better way of doing that is by using the ISO 7810 standard to your advantage. Credit cards and most ID cards are all the same size. If you can indicate what size that is, you can scale images to the correct size without much effort and it works internationally etc.
Took half an hour to figure out a good standard candle but it turns out that international banking demanding a standard is actually quite useful.
Tuesday, March 12, 2013
Yay. FeministFrequency Video Game Tropes.
I've been a fan of FeministFrequency for a long time now. Since long before the dust-up. Apparently she got picked up by some anti-feminist folks who made all the usually death/rape threats. Which got her kickstarter project over funded and expanded the typical tropes she was going to do into a much larger project and ended up going away for a very long time.
But finally, new videos!
http://youtu.be/X6p5AZp7r_Q
Well the first episode has finally trickled in.
But finally, new videos!
http://youtu.be/X6p5AZp7r_Q
Well the first episode has finally trickled in.
Saturday, March 2, 2013
Is atheism a comfort?
Atheism offers me no bribes for my beliefs. It promises me no magical kingdoms, no bliss, no eternity with my family, no salvation from the fires of hell. The only thing it seems to give me is an understanding that reality is what it is. I believe atheism not because it offers me a prize, but because I genuinely believe that it's true.
Saturday, February 16, 2013
Saturday, February 9, 2013
Why can't heaven speak?
Why can't dead people in heaven talk to people on Earth. Nothing would put a person on the straight and narrow for Christ faster than a talk with their dead grandmother in heaven. It's no more compulsory than a talk with a living grandmother. But, oh so much better. Why then is there no communications?
Given Christianity this would serve God's purposes, ad hoc reasons must be given as they are pulled from one's ass.
Given atheism the answer is obvious (dead people are dead).
So atheism provides what amounts to a free explained phenomenon simply as a side effect. But, Christianity needs to make up something new to explain that problem.
This is evidence for atheism and evidence against Christianity.
Given Christianity this would serve God's purposes, ad hoc reasons must be given as they are pulled from one's ass.
Given atheism the answer is obvious (dead people are dead).
So atheism provides what amounts to a free explained phenomenon simply as a side effect. But, Christianity needs to make up something new to explain that problem.
This is evidence for atheism and evidence against Christianity.
Tuesday, February 5, 2013
Javascript
I've done a reasonable amount of java script coding lately implementing turtle graphics and lsystem as well as other projects and I must admit since the early 2000s the language has become dare I say, elegant. I don't know if that kind of evolution is possible for many languages but really it's no where near as horrible and trick ridden as I recall. Where you'd code it for IE because everything else would take code IE could take but if you coded for another browser it would go wonky and object. It was a pain. Now, it's actually a really pretty language, tossing functions around like variables and calling them and having variables properly react like what you'd want them to be.
Wednesday, January 16, 2013
Yes, but can't we still just accept it as plausible?
That's not how plausible works. I could say that I don't think that life on this process began with chemicals and random time like all the scientists doing real work on the subject actually think. But I think humans from the distant future traveled back in time and created this planet and invented the life on it.
Would you argue that is plausible and credible and open? Do you think there being no evidence against it or for it, is a mark in it's favor?
The answer really should be no. I can with enough special pleading make the claim that the moon is made out of green cheese something for which there is no evidence against. We know the density of the moon, well the cheese just happens to be very dense. We've been to the surface and found rocks, because it has rocks on the surface. If I explain away every objection with another bit of story I can get it to the point where we should find no evidence against the proposition of our moon being made out of green cheese in some kind of special way that makes it outwardly appear to be made out of rock.
Should we then say there's no evidence against the theory and at the very least we should consider it plausible and credible?
The actual answer is no. Evidence is largely defined by Bayes Theorem, and there are a few variables there for how ad hoc the hypothesis is and how much additional stuff you need to accept it and how good the alternative hypotheses actually are.
This is the case with Hameroff's theory. We should not consider it plausible or credible because it is stupid. It is trying to explain away a robust observation that our consciousness actually becomes aware of decisions our brains have made half a second later. It invokes utter crap that physicists and neuroscientists scoff in an attempt to explain these observations away. But, really we should just accept that those observations are true. The moon just happens to look exactly like it's made out of rock because it's made out of rocks. And our gap junctions have chemicals and only get triggered by chemicals and our brains consist of neurons firing in patterns because that's what we are, neurons firing in patterns. The truth isn't something that needs to be explained away with exotic explanations, it can actually just be true.
So, no. The fact that it's really absurd is actually considerable evidence against it. And the fact that the alternative is that what we see is what we get, and that explanation explains all the data that needs explaining suffices to say that a theory that needs to make thoughts exist in quantum fields and magically travel backwards in time, can go ahead and be discarded as wrong.
You may not solve the mystery of missing socks by involving elves. Elves are a greater mystery than missing socks. Socks go missing. You don't need to explain how because of QM they fell out of the universe and traveled forward in time and we'll end up getting them back. They really can just get lost. Brains really can just be a skullfull of neurons and chemicals. And the moon really can just be rock.
Hameroff and Penrose, nonsense²
Largely, this is cut and pasted from my reply to somebody on youtube about Hameroff and Penrose's idiotic theories about consciousness. It's really hard to explain how stupid they are but I fell I did a pretty good plain English explanation. And my blog is largely for myself, with the exception of the Trivia Bot parts that actually do a public service. But, I wouldn't want to lose such a nice reply so I put it here, where I could search and cite and rehash it in the future if it ever comes up.
-------------------
There's no evidence that particles that pop out of this universe likely by colliding with anti-particles or generally just doing so went into another universe. We just know that at the very very tiny spacetime is broiling with fun pops in and out of spacetime. There's very little to suggest there are any other universes involved or that this carries any information.
There are a series of experiments which have rather firmly established that what we are consciously aware of lags behind by about half a second. We can hit a baseball with a baseball bat but the actual decision isn't made consciously, but rather the conscious mind is informed of it later, and fills it in.
We've also done a lot of experiments with split brain patients and confabulation. Where a person is sat down, they are told via a message on their left side textually to stand up. They stand up. And are asked vocally why they stood up. The standing up was decided by the right brain, but the left brain is being asked to answer the question and they will wax poetic about how they were cold and left a jacket in the car or about how the chair isn't comfortable.
There's also an experiment where a person is shown two small pictures of people and asked who is more attractive. After they make the decision, the pictures are switched with a little slight of hand magic trick and they are further asked why they chose that picture (the one they didn't actually pick). They will explain the decision at length.
We know this stuff happens in the brain. But, then Hammeroff and Penrose don't think it does. It's not a quirky weird thing about the brain that consciousness is informed later and confabulates the answers as to why it made that decision. No. What happens according to them. Is that your conscious decision from the future magically travels back in time half a second through the quantum field and something about gap junctions to have actually made that decision that it could not have made.
This isn't some amazing truth they've stumbled on that means that atheists are really bad at their jobs, they are actually trying to argue that the Emperor has cloths on even though he's walking around naked. When you get passed the fancy buzz words and the physics you realize the physics has the richness of the particles and the quantum mechanics and all they have is a lot of made up stuff about how Quantum Mechanics therefore Consciousness is real rather than made up. Even though there is absolutely no indicator whatsoever that it's either needed or real.
I wouldn't really go out of your way to blame ego, or insist that he's proved souls existed because he proposed a theory you don't possess the acumen to poke holes in or the desire to do so. It's really nonsense. The universe is not a massive conspiracy to get your thoughts into your brain half a second early.
Tuesday, January 15, 2013
Coining a New Word: Hypothetica
Hypothetica: like estoricia or Americana, are those things of the esoteric or American. For example, "maybe there were swarms of bees and that's why he hid in that hole." or "maybe if there were a meteor heading towards Earth" those hypothetical things are hypothetica.
Sunday, January 6, 2013
Colorblindness and Maximally Distinct Color Palettes.
While I did bother to do a lot of legwork and effort to determine which colors are maximally distant the issue of color blindness was always on my mind. While you can push the list of distinct colors to a couple dozens (read left to right, top to bottom).
http://www.colblindor.com/2009/01/19/colorblind-colors-of-confusion/
It seems that given color blindness, you'd really be better off mixing in a few things other than just colors. While you could just use a static lookup list, which is likely the best for color distinction, you might want to consider if there's a better way to do that same thing with aspects that are more distinct to more people, like dashed lines, thicker lines, candicaned lines, marquee text made to fit a line, etc.
You get about four or five really distinct colors for those with lower gamuts of colors. And while my list is still really awesome. You might want to rethink your entire idea to use colors.
http://www.colblindor.com/2009/01/19/colorblind-colors-of-confusion/
It seems that given color blindness, you'd really be better off mixing in a few things other than just colors. While you could just use a static lookup list, which is likely the best for color distinction, you might want to consider if there's a better way to do that same thing with aspects that are more distinct to more people, like dashed lines, thicker lines, candicaned lines, marquee text made to fit a line, etc.
You get about four or five really distinct colors for those with lower gamuts of colors. And while my list is still really awesome. You might want to rethink your entire idea to use colors.
Monday, December 10, 2012
With a cause of justice, your enemies are easy to spot.
When your cause is justice, you can easily spot your enemies. They are the people who say they are your enemies and the people who say they are your friends and give you friendly advice that is aptly summed up as telling you to "Shut Up."
Monday, December 3, 2012
Saturday, November 24, 2012
Tat's Trivia Bot v. 3.66
Download: Tat's Trivia Bot, 3.66
The only thing this version really does is yell at you for not having your trivia directory correct. The previous version would simply die without yelling at you. This confused people considering the update in the later version of mIRC to move your mIRC directory from the program files directory to somewhere in your user applications directory. There's no real substantive changes beyond making it properly tell you your directory is wrong and blocking. But, this is apparently worthwhile because several of my very infrequent comments are, I believe, due to that quirk.
The only thing this version really does is yell at you for not having your trivia directory correct. The previous version would simply die without yelling at you. This confused people considering the update in the later version of mIRC to move your mIRC directory from the program files directory to somewhere in your user applications directory. There's no real substantive changes beyond making it properly tell you your directory is wrong and blocking. But, this is apparently worthwhile because several of my very infrequent comments are, I believe, due to that quirk.
Subscribe to:
Posts (Atom)
