Skip to content
The beaver is a proud and noble animal

The beaver is a proud and noble animal

Notes from a bemused canuck

  • Home
  • About
  • Bookmarks
  • Pictures
  • Resume
  • Wine
  • Random Recipe
  • Toggle search form

Tag: random shit

Off color dad jokes

Posted on July 25, 2018August 16, 2018 By admin

The Hand has been collecting politically incorrect Dad jokes with which to better torture Katy. Some favourites so far :

What do you call lesbian twins?
Lick-a-likes.

What drives a lesbian up the wall?
A crack in the ceiling.

What’s the difference between a lesbian and a Ritz cracker?
One’s a snack cracker and the other is a crack snacker.

What do lesbians need in order to get married?
A licker license.

What do you call a lesbian sharpshooter?
A crack shot.

What do you call a lesbian Eskimo?
Klondike.

What do you call three lesbians in a closet?
A licker cabinet.

What do you call an Irish lesbian?
Gaylick.

What do you call a lesbian dinosaur?
A Lickalotopus

uncategorized

Words written in Periodic Table elements

Posted on July 19, 2018July 23, 2018 By admin

This is how my brain works.

This morning, on my way to work, I remembered a t-shirt from a TV show we’re currently binging on with the word “sarcasm” written using element symbols from the periodic table:

I then started to wondered about how I would go about finding all the words that would be written using element symbols. So when I got into work, I quickly hacked this together. Out of a starting word set of 58109 words, I find 7417 “periodic” words. The longest word, and one of several with the most component elements (13) is:

Internationalisation, elements=In,Te,Rn,At,I,O,Na,Li,S,At,I,O,N

Other amusing ones are:

Inarticulateness, elements=In,Ar,Ti,Cu,La,Te,Ne,S,S
Supersaturation, elements=S,U,P,Er,S,At,U,Ra,Ti,O,N
Consciousnesses, elements=CO,N,Sc,I,O,U,Sn,Es,Se,S
Procrastination, elements=Pr,O,Cr,As,Ti,Na,Ti,O,N
Hyperinflation, elements=H,Y,P,Er,In,F,La,Ti,O,N
Falsification, elements=F,Al,Si,F,I,Ca,Ti,O,N,S
Perniciousness, elements=P,Er,Ni,C,I,O,U,Sn,Es,S
Perambulations, elements=P,Er,Am,B,U,La,Ti,O,N,S
Pontifications, elements=Po,N,Ti,F,I,Ca,Ti,O,N,S
Hallucinations, elements=H,Al,Lu,C,In,At,I,O,N,S
Voluptuousness, elements=V,O,Lu,Pt,U,O,U,Sn,Es,S
Sensationalism, elements=Se,N,S,At,I,O,Na,Li,Sm

And many, many more.

I then added a little tweak to filter out words that use repetitions of elements, and that brings down the number of “periodic” words to 5483. In that case, the longest word, and one of several with the most component elements (10) is:

Reclassification, elements=Re,Cl,As,Si,F,I,Ca,Ti,O,N


package wordlist;

import java.io.*;
import java.util.*;

public class PeriodicWordFinder {

    private TreeSet<String> words;
    private TreeSet<String> elements;
    private ArrayList<PeriodicWord> periodicWords;

    public PeriodicWordFinder() {
        init();
    }

    private void init(){
        try{
            words = read("wordlist.txt");
            elements = new TreeSet<>(new AlphaLengthComparaator());
            elements.addAll(read("elements.txt"));
            periodicWords = new ArrayList<>();

            System.out.println("words.size() = " + words.size());
            System.out.println("elements.size() = " + elements.size());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private TreeSet<String> read(String fileName) throws Exception{
        TreeSet<String> retval = new TreeSet<>();
        InputStream stream = getClass().getClassLoader().getResourceAsStream(fileName);
        BufferedReader in = new BufferedReader(new InputStreamReader(stream));
        String line;
        while ((line = in.readLine()) != null){
            line = line.toUpperCase().trim();
            //no elements contain Q or J
            if (line.contains("Q") || line.contains("J")){
                continue;
            }
            retval.add(line);
        }
        in.close();
        return retval;
    }

    private void findWords(boolean onlyUniqueElements) {
        for(String word : words){
            PeriodicWord pWord = new PeriodicWord(word);
            if ( periodicWord(pWord) ){
                //if the word only contains unique instances of elements, or we don't care
                if (checkUniqueElements(pWord) || !onlyUniqueElements) {
                    System.out.println("found: " + pWord);
                    periodicWords.add(pWord);
                }
            }
        }
    }

    private boolean periodicWord(PeriodicWord word) {
        if (word.getWord().length() == 0)
            return true;

        for (String element : elements){
            if (word.getWord().startsWith(element)){
                word.getElements().add(element);
                word.setWord(word.getWord().substring(element.length()));
                return periodicWord(word);
            }
        }
        return false;
    }

    private boolean checkUniqueElements(PeriodicWord pWord) {
        //if elements are duplicated, size of hashset will be different than size of original list
        return (pWord.getElements().size() == new HashSet<>(pWord.getElements()).size());
    }


    public static void main(String[] args){
        PeriodicWordFinder ew = new PeriodicWordFinder();
        ew.findWords(true);
    }

    private class AlphaLengthComparaator implements Comparator<String>{
        @Override
        public int compare(String o1, String o2) {
            Integer l1 = o1.length();
            Integer l2 = o2.length();
            int lengthComparison = l1.compareTo(l2);
            if (lengthComparison == 0){
                return o1.compareTo(o2);
            } else {
                return l1.compareTo(l2)*-1;
            }
        }
    }

    private class PeriodicWord {

        private String word; //will get mangled during recursion
        private String initialWord; //keep track of initial word
        private ArrayList<String> elements; //will get updated during recursion

        public PeriodicWord(String word) {
            this.initialWord = word;
            this.word = word;
        }

        public void setWord(String word) {
            this.word = word;
        }

        public String getWord() {
            return word;
        }

        public ArrayList<String> getElements() {
            if (elements == null)
                elements = new ArrayList<>();
            return elements;
        }

        @Override
        public String toString() {
            return initialWord +", elements=" + String.join(",", elements);
        }
    }
}

uncategorized

Design fail

Posted on July 16, 2018 By admin

uncategorized

Butterflies 

Posted on July 13, 2018July 16, 2018 By admin

Schilliger have their annual-ish butterfly greenhouse.

uncategorized

Someone somewhere has an interesting story

Posted on July 8, 2018July 9, 2018 By admin

On our way to drop Ben off at the train station this morning, we saw this. A shopping trolley and a bicycle. The bike was actually lying in a heap on its side. Five hours later, when we came home, it was still there, except now someone had straightened the bike. Realize though that the Migros is a good 10 minute walk away and this was left near a pretty busy roundabout. 

uncategorized

Is this compliant with the travel policy? 

Posted on July 6, 2018July 9, 2018 By admin

If Roko has an accident and we all die, half the digital nutrition and health team snuffs it. 

uncategorized

How to… 

Posted on June 27, 2018June 28, 2018 By admin

uncategorized

You gotta believe!

Posted on June 26, 2018 By admin

https://www.flubu.com/blog/wp-content/uploads/2018/06/You_Gotta_Believe.mp4

Scene for feature-film-in-progress Seder-Masochism, animated by Nina Paley
Music: “You Gotta Believe” sung by the Pointer Sisters, circa 1976

Original dancing goddesses: blog.ninapaley.com/2018/01/01/24-free-goddess-gifs/

uncategorized

SO. MUCH. FLUFF.

Posted on June 22, 2018 By admin

Snow Leopards can’t roar like other big cats but they have the most majestic tails ever to compensate. Their tails are almost as long as they are – somewhere between 80 to 105 centimetres long! They are mainly used to help them balance, however, they can also serve as a perfect object to OM NOM NOM on!

It’s unknown exactly why snow leopards enjoy biting their enormous, fluffy tails. Some theories are that biting their tails helps keep them warm in the harsh cold of their natural environments. Others suggest that it’s simply a form of play behavior. Maybe it’s simply genetic, or maybe they just can’t resist the fluff? Just look at those tails.

uncategorized

Steampunk Transformers

Posted on May 29, 2018 By admin

From the mind of Brian Kesinger

uncategorized

Posts pagination

Previous 1 … 10 11 12 … 86 Next

Power to the beaver!

Show me the beaver!
June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« May    

Quote of the day

- "Sodomy non sapiens," said Albert under his breath.
- "What does that mean?"
- "Means I'm buggered if I know."
--Mort and Albert are facing a problem (Terry Pratchett, Mort)

Random Posts

  • Medical marijuana and big pharma, oh my
  • Duckies!
  • [Recipe] Baked Camembert
  • To my oldest friend
  • Attack of things that go buzz
reading leopard

Tags

bobble the little blue owl boobies brought to you by the fda cats chonk christmas comics computers are evil covid-19 dealing with idiots dilbert dog ducks galleries geek god bless the land of the free holidays house I am Canadian land of cheese and chocolate linked news lolcat london news from the stupid not my dog nsfw pets pictures potd2014 qotd random shit re-member recipes relationship shrill slice of life stress Tao the british way The Peanut things i miss travel video wine work

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2025 The beaver is a proud and noble animal.

Powered by PressBook Premium theme

 

Loading Comments...