New Year's Resolutions: Assume Responsibility
Assume responsibility.
Play God.
Be God.
Create, judge, save.
Read and act and don't redact.
Write, save, revise, save, repeat.
Every word is a word of love for the future.
Every poem is a love poem for the future.
Every letter is a love letter to the future.
The end of the story was already written by you before you were born.
Time is strange.
The way is familiar.
See the lamp in the mirror.
Believe in the sun. Stare into the moon.
Think.
Reflect or die.
There are no forks in the road, but there are many twists and turns.
Whatever you are waiting for will come to you.
Whatever you truly seek, you have already found in the future.
You are the pen and the ink and the paper and the words and the reader and the reading and the meaning of the story and shelf in the library where they keep the book and all its sequels, and your name is its title and the subject, which is also who you are and how you feel and why you are exactly what and who and when and how you are as you are. And you are checked out to yourself and due right now, as you have requested yourself to be turned in and checked out to the future.

We know there were a few kinks with the holiday promotion. We've been working very hard to get them ironed out. If you have a paid/permanent account, keep on sending those coupons. Here's an update:
We're pleased to report that we've already sold over 100 virtual red ribbons in honor of National AIDS Awareness month. Remember, for each charitable vgift you purchase for $2.99, we'll donate 100 percent of gross proceeds to IAVI.org (the International AIDS Vaccine Initiative) to fund the development of an HIV vaccine. Once again, we thank you for your generosity.
Stop by the Virtual Gift Shop and share some holiday magic with your LiveJournal friends.
We're back with more dazzling pictures from around the world. Congrats to
marlenemcc, who has been awarded a virtual blue ribbon as the winner of our fourth photo contest. We hope you'll click over to LJ_Photophile poll and tell us your picks in pics!
For more fantastic user content, we'll meet you under the cut. ( Read more... )
Thanks, again, for reading. Here's wishing you the very merriest of holidays. We'll see you next year!
My bicycle was stolen earlier this evening. Sufficiently close to see the guy cycling away with it. Drove around a bit with Dave looking for it, but didn't find :-(
Last time I had my bike stolen I was in the downtown eastside. This time it was stolen from outside my house, NOT visible from the street or alley, around 23h00 at night.
Early Christmas came for this year in the form of an iPod touch. So far so good. Just a bit of music, tv shows and free games so far. Oh. And Internet. Lots of internet.
Posted via LiveJournal.app.
Look, Ma, these are my baby steps in algorithms!
# list is the elements to be permuted
# y is the number of results desired
# z is the number of elements per result
# equalizer keeps track of who got used how many times
def constrained_permutations list, y, z
list.uniq! # Never trust the user. We want no repetitions.
equalizer = {}
list.each { |element| equalizer[element] = 0 }
results = []
# Do this until we get as many results as desired
while results.size < y
pool = []
puts pool
least_used = equalizer.each_value.min
# Find how used the least used element was
while pool.size < z
# Do this until we have enough elements in this resultset
element = nil
while element.nil?
# If we run out of "least used elements", then we need to increment
# our definition of "least used" by 1 and keep going.
element = list.shuffle.find do |x|
!pool.include?(x) && equalizer[x] == least_used
end
least_used += 1 if element.nil?
end
equalizer[element] += 1
# This element has now been used one more time.
pool << element
end
results << pool
end
return results
end
constrained_permutations [0,1,2,3,4,5,6], 6, 2
=> [[4, 0], [1, 3], [2, 5], [6, 0], [2, 5], [3, 6]]
constrained_permutations [0,1,2,3,4,5,6], 6, 2
=> [[4, 5], [6, 3], [0, 2], [1, 6], [5, 4], [3, 0]]
Mirrored from Seven steps.
I don’t really have a better name for this. It’s also not completely clean, but it works. I had, almost a year ago (362 days ago), written a blog post about lexicographic permutations. That was about permutations of elements within one array.
Someone on ruby-forum asked about permutations between multiple arrays. I found something in C#, which I was happy to transcribe to Ruby and tweak a little.
def array_permutations array, index=0
# index is 0 by default : start at the beginning, more elegant.
return array[-1] if index == array.size - 1 # Return last element if at end.
result = []
array[index].each do |element| # For each array
array_permutations(array, index + 1).each do |x| # Permute permute permute
result << "#{element}, #{x}"
end
end
return result
end
So, we get this:
first = ['one', 'two'] second = ['three', 'four'] third = 'five', 'six'] result = array_permutations [first, second, third] => ["one, three, five", "one, three, six", "one, four, five", "one, four, six", "two, three, five", "two, thre e, six", "two, four, five", "two, four, six"]
Magic!
——
Edit – of course, my solution is hackish, and someone came up with a quicker and more elegant solution:
def fancy_array_permutation array
return array[0] if array.size == 1
first = array.shift
return first.product( fancy_array_permutation(array) ).map {|x| x.flatten.join(" ")}
end
This gives the same result as above.
Mirrored from Seven steps.

Get to know My Guests. Want to know who's checking you out? You can now view the 100 most recent, logged-in users who visited your journal during the past 30-day period with My Guests. For those who prefer to fly under the radar, you can update your My Guests privacy setting here.
Introducing My Stats. If you have a Paid or Permanent account, you can now see detailed reports on how many people are visiting your journal, friends pages, and entries (wherever they're posted on LiveJournal). You can also view data on comments and RSS requests. My Stats is only available to Paid and Permanent account holders, but you can upgrade anytime. (FYI, an annual subscription costs less than a large pizza with everything on it, PLUS it's rumored to make you lose weight in your sleep!) For additional details on this feature, read this article in
paidmembers.
Get ready to check your vital statistics!. To begin, mouse over Journal in the upper nav bar and select My Stats from the dropdown menu (Horizon) or select My Stats under Journal in the side bar (Vertigo). If you're using another design scheme, you can visit My Stats directly. You'll find My Guests on the My Stats tool bar.
You can view more awesome user content after the jump!
( Read more... )Thanks, again, for joining us. Until next time, stay snug!
![]() | You are viewing Log in Create a LiveJournal Account Learn more | Explore LJ: Life Entertainment Music Culture News & Politics Technology |