diff --git a/external_library/gem/ruby_wordcram/clickable_words.rb b/external_library/gem/ruby_wordcram/clickable_words.rb new file mode 100644 index 0000000..724f288 --- /dev/null +++ b/external_library/gem/ruby_wordcram/clickable_words.rb @@ -0,0 +1,52 @@ +# How to make a wordcram that pops up extra information +# when you click on a word. +# +# Each frame, we want to draw the wordcram, and some info +# about the word that's been clicked on (or hovered over). +# Each frame, you need to clean up what the last frame drew. +# +# Since laying out a wordcram is expensive, and there's +# (currently) no way to quickly re-render a wordcram, +# we don't want to make the wordcram in draw(). +# (Besides, each frame would probably come out different.) +# Instead, render the wordcram in the setup() method, and +# cache it as a PImage. Then, in draw(), render that image +# first, which will overlay the last frame's image. +require 'ruby_wordcram' + +attr_reader :wc, :cached_image, :last_clicked_word + +def settings + size(700, 400) +end + +def setup + sketch_title 'Clickable Words' + background(255) + # Make the wordcram + @wc = WordCram.new(self).from_web_page('http://wikipedia.org') + wc.draw_all + # Save the image of the wordcram + @cached_image = get + # Set up styles for when we draw stuff to the screen (later) + text_font(create_font('sans', 150)) + text_align(CENTER, CENTER) + @last_clicked_word = nil +end + +def draw + # First, wipe out the last frame: re-draw the cached image + image(cached_image, 0, 0) + # If the user's last click was on a word, render it big and blue: + unless last_clicked_word.nil? + no_stroke + fill 255, 190 + rect 0, height / 2 - text_ascent / 2, width, text_ascent + text_descent + fill(30, 144, 13, 150) + text(last_clicked_word.word, width / 2, height / 2) + end +end + +def mouse_clicked + @last_clicked_word = wc.get_word_at(mouse_x, mouse_y) +end diff --git a/external_library/gem/ruby_wordcram/data/LiberationSerif-Regular.ttf b/external_library/gem/ruby_wordcram/data/LiberationSerif-Regular.ttf new file mode 100644 index 0000000..e7616da Binary files /dev/null and b/external_library/gem/ruby_wordcram/data/LiberationSerif-Regular.ttf differ diff --git a/external_library/gem/ruby_wordcram/data/MINYN___.TTF b/external_library/gem/ruby_wordcram/data/MINYN___.TTF new file mode 100644 index 0000000..0ab1fea Binary files /dev/null and b/external_library/gem/ruby_wordcram/data/MINYN___.TTF differ diff --git a/external_library/gem/ruby_wordcram/data/names.txt b/external_library/gem/ruby_wordcram/data/names.txt new file mode 100644 index 0000000..bd83c8f --- /dev/null +++ b/external_library/gem/ruby_wordcram/data/names.txt @@ -0,0 +1,864 @@ +Mary 1.0 f +Patricia 0.40813997 f +Linda 0.39368582 f +Barbara 0.37276533 f +Elizabeth 0.35640928 f +Jennifer 0.35450742 f +Maria 0.31494865 f +Susan 0.302016 f +Margaret 0.2921263 f +Dorothy 0.276531 f +Lisa 0.26778242 f +Nancy 0.2544694 f +Karen 0.25370863 f +Betty 0.25332826 f +Helen 0.25218713 f +Sandra 0.23925447 f +Donna 0.22175732 f +Carol 0.21491061 f +Ruth 0.2137695 f +Sharon 0.19855459 f +Michelle 0.19741346 f +Laura 0.19399011 f +Sarah 0.19322938 f +Kimberly 0.19170788 f +Deborah 0.18790415 f +Jessica 0.18638267 f +Shirley 0.18333967 f +Cynthia 0.17839484 f +Angela 0.17801446 f +Melissa 0.17573223 f +Brenda 0.17306961 f +Amy 0.17154813 f +Anna 0.16736402 f +Rebecca 0.1635603 f +Virginia 0.1635603 f +Kathleen 0.16127805 f +Pamela 0.15823507 f +Martha 0.15671358 f +Debra 0.15519209 f +Amanda 0.15367061 f +Stephanie 0.15214911 f +Carolyn 0.14644352 f +Christine 0.1453024 f +Marie 0.14416128 f +Janet 0.14416128 f +Catherine 0.14187904 f +Frances 0.14073792 f +Ann 0.13845569 f +Joyce 0.13845569 f +Diane 0.13655382 f +Alice 0.13579307 f +Julie 0.13236973 f +Heather 0.12818563 f +Teresa 0.12780525 f +Doris 0.12742488 f +Gloria 0.12742488 f +Evelyn 0.122480035 f +Jean 0.11981742 f +Cheryl 0.11981742 f +Mildred 0.11905667 f +Katherine 0.11905667 f +Joan 0.116394065 f +Ashley 0.11525295 f +Judith 0.11297071 f +Rose 0.11259034 f +Janice 0.10840624 f +Kelly 0.10764549 f +Nicole 0.10688475 f +Judy 0.10498288 f +Christina 0.104602516 f +Kathy 0.1034614 f +Theresa 0.10308102 f +Beverly 0.10155953 f +Denise 0.10041841 f +Tammy 0.098516546 f +Irene 0.09585394 f +Jane 0.09509319 f +Lori 0.09433245 f +Rachel 0.09205021 f +Marilyn 0.091669835 f +Andrea 0.08976798 f +Kathryn 0.08900723 f +Louise 0.08710536 f +Sara 0.08710536 f +Anne 0.08672499 f +Jacqueline 0.08672499 f +Wanda 0.08596425 f +Bonnie 0.08482313 f +Julia 0.08482313 f +Ruby 0.08406238 f +Lois 0.08368201 f +Tina 0.08368201 f +Phyllis 0.08330163 f +Norma 0.08292126 f +Paula 0.08254089 f +Diana 0.08216052 f +Annie 0.08216052 f +Lillian 0.08025865 f +Emily 0.07911754 f +Robin 0.07911754 f +Peggy 0.07911754 f +Crystal 0.07873716 f +Gladys 0.07797642 f +Rita 0.077596046 f +Dawn 0.076835304 f +Connie 0.076074556 f +Florence 0.076074556 f +Tracy 0.07493343 f +Edna 0.07493343 f +Tiffany 0.07417269 f +Carmen 0.07417269 f +Rosa 0.07379232 f +Cindy 0.073031574 f +Grace 0.07189045 f +Wendy 0.07036896 f +Victoria 0.0684671 f +Edith 0.06808673 f +Kim 0.067706354 f +Sherry 0.067706354 f +Sylvia 0.06732598 f +Josephine 0.06732598 f +Thelma 0.06656523 f +Shannon 0.06656523 f +Sheila 0.06656523 f +Ethel 0.06618486 f +Ellen 0.06580449 f +Elaine 0.06580449 f +Marjorie 0.06580449 f +Carrie 0.06504375 f +Charlotte 0.064283 f +Monica 0.063141875 f +Esther 0.063141875 f +Pauline 0.06276151 f +Emma 0.06276151 f +Juanita 0.062381137 f +Anita 0.06162039 f +Rhonda 0.06162039 f +Hazel 0.061240017 f +Amber 0.060859643 f +Eva 0.06047927 f +Debbie 0.059718527 f +April 0.058577407 f +Leslie 0.058577407 f +Clara 0.058197033 f +Lucille 0.058197033 f +Jamie 0.058197033 f +Joanne 0.057055917 f +Eleanor 0.057055917 f +Valerie 0.056675546 f +Danielle 0.056675546 f +Megan 0.055914797 f +Alicia 0.055534422 f +Suzanne 0.05515405 f +Michele 0.05515405 f +Gail 0.05515405 f +Bertha 0.05439331 f +Darlene 0.054012936 f +Veronica 0.054012936 f +Jill 0.054012936 f +Erin 0.05363256 f +Geraldine 0.05363256 f +Lauren 0.052111067 f +Cathy 0.052111067 f +Joann 0.0517307 f +Lorraine 0.051350325 f +Lynn 0.051350325 f +Sally 0.051350325 f +Regina 0.05058958 f +Erica 0.04944846 f +Beatrice 0.04944846 f +Dolores 0.049068086 f +Bernice 0.04868772 f +Audrey 0.048307344 f +Yvonne 0.04792697 f +Annette 0.047546595 f +June 0.047546595 f +Samantha 0.047166225 f +Marion 0.04640548 f +Dana 0.04640548 f +Stacy 0.046025105 f +Ana 0.04564473 f +Renee 0.04564473 f +Ida 0.04488399 f +Vivian 0.04488399 f +Roberta 0.044503614 f +Holly 0.044503614 f +Brittany 0.044503614 f +Melanie 0.04412324 f +Loretta 0.04374287 f +Yolanda 0.04374287 f +Jeanette 0.04374287 f +Laurie 0.043362495 f +Katie 0.042982124 f +Kristen 0.04222138 f +Vanessa 0.04222138 f +Alma 0.04222138 f +Sue 0.04222138 f +Elsie 0.041841004 f +Beth 0.041841004 f +Jeanne 0.04146063 f +Vicki 0.04146063 f +Carla 0.040699888 f +Tara 0.040699888 f +Rosemary 0.040699888 f +Eileen 0.03993914 f +Terri 0.03993914 f +Gertrude 0.039178394 f +Lucy 0.039178394 f +Tonya 0.038798023 f +Ella 0.038417652 f +Stacey 0.038417652 f +Wilma 0.037656903 f +Gina 0.037656903 f +Kristin 0.037656903 f +Jessie 0.037276533 f +Natalie 0.037276533 f +Agnes 0.037276533 f +Vera 0.037276533 f +Willie 0.03689616 f +Charlene 0.03689616 f +Bessie 0.036515787 f +Delores 0.036135413 f +Melinda 0.03575504 f +Pearl 0.03575504 f +Arlene 0.03575504 f +Maureen 0.034994297 f +Colleen 0.034994297 f +Allison 0.034994297 f +Tamara 0.034994297 f +Joy 0.034613922 f +Georgia 0.034613922 f +Constance 0.034613922 f +Lillie 0.03423355 f +Claudia 0.03423355 f +Jackie 0.03423355 f +Marcia 0.03423355 f +Tanya 0.033853177 f +Nellie 0.033853177 f +Minnie 0.033853177 f +Marlene 0.033472802 f +Heidi 0.033472802 f +Glenda 0.033472802 f +Lydia 0.03271206 f +Viola 0.03271206 f +Courtney 0.03271206 f +Marian 0.03271206 f +Stella 0.032331686 f +Caroline 0.032331686 f +Dora 0.031951312 f +Jo 0.031570937 f +Vickie 0.031190569 f +Mattie 0.030810194 f +Terry 0.030429821 f +Maxine 0.03004945 f +Irma 0.03004945 f +Mabel 0.029669076 f +Marsha 0.029669076 f +Myrtle 0.029669076 f +Lena 0.029288704 f +Christy 0.029288704 f +Deanna 0.02890833 f +Patsy 0.02890833 f +Hilda 0.028527958 f +Gwendolyn 0.028147586 f +Jennie 0.027767211 f +Nora 0.027767211 f +Margie 0.027386839 f +Nina 0.027386839 f +Cassandra 0.027386839 f +Leah 0.027386839 f +Penny 0.027006468 f +Kay 0.027006468 f +Priscilla 0.027006468 f +Naomi 0.027006468 f +Carole 0.027006468 f +Brandy 0.026626093 f +Olga 0.026626093 f +Billie 0.02624572 f +Dianne 0.02624572 f +Tracey 0.02624572 f +Leona 0.02624572 f +Jenny 0.02586535 f +Felicia 0.02586535 f +Sonia 0.02586535 f +Miriam 0.025104603 f +Velma 0.025104603 f +Becky 0.025104603 f +Bobbie 0.02472423 f +Violet 0.02472423 f +Kristina 0.02472423 f +Toni 0.02434386 f +Misty 0.023963485 f +Mae 0.023963485 f +Shelly 0.023583112 f +Daisy 0.023583112 f +Ramona 0.023583112 f +Sherri 0.023583112 f +Erika 0.02320274 f +Katrina 0.02320274 f +Claire 0.02320274 f +Lindsey 0.022822365 f +Lindsay 0.022822365 f +Geneva 0.022441994 f +Guadalupe 0.022441994 f +Belinda 0.022441994 f +Margarita 0.022441994 f +Sheryl 0.022441994 f +Cora 0.02206162 f +Faye 0.02206162 f +Ada 0.021681247 f +Natasha 0.021681247 f +Sabrina 0.021681247 f +Isabel 0.021681247 f +Marguerite 0.021300877 f +Hattie 0.021300877 f +Harriet 0.021300877 f +Molly 0.020920502 f +Cecilia 0.020920502 f +Kristi 0.020920502 f +Brandi 0.020920502 f +Blanche 0.020920502 f +Sandy 0.020920502 f +Rosie 0.020920502 f +Joanna 0.020920502 f +Iris 0.020920502 f +Eunice 0.02054013 f +Angie 0.02054013 f +Inez 0.020159757 f +Lynda 0.020159757 f +Madeline 0.019779384 f +Amelia 0.019779384 f +Alberta 0.019779384 f +Genevieve 0.019399012 f +Monique 0.019399012 f +Jodi 0.019399012 f +Janie 0.019399012 f +Maggie 0.019399012 f +Kayla 0.019399012 f +Sonya 0.019399012 f +Jan 0.019399012 f +Lee 0.019399012 f +Kristine 0.019399012 f +Candace 0.019399012 f +Fannie 0.019018639 f +Maryann 0.019018639 f +Opal 0.019018639 f +Alison 0.019018639 f +Yvette 0.019018639 f +Melody 0.019018639 f +Luz 0.018638266 f +Susie 0.018638266 f +Olivia 0.018638266 f +Flora 0.018638266 f +Shelley 0.018638266 f +Kristy 0.018257894 f +Mamie 0.018257894 f +Lula 0.018257894 f +Lola 0.018257894 f +Verna 0.018257894 f +Beulah 0.018257894 f +Antoinette 0.018257894 f +Candice 0.017497148 f +Juana 0.017497148 f +Jeannette 0.017497148 f +Pam 0.017497148 f +Kelli 0.017497148 f +Hannah 0.017116776 f +Whitney 0.017116776 f +Bridget 0.017116776 f +Karla 0.016736401 f +Celia 0.016736401 f +Latoya 0.01635603 f +Patty 0.01635603 f +Shelia 0.01635603 f +Gayle 0.01635603 f +Della 0.01635603 f +Vicky 0.01635603 f +Lynne 0.01635603 f +Sheri 0.015975656 f +Marianne 0.015975656 f +Kara 0.015595284 f +Jacquelyn 0.015595284 f +Erma 0.015595284 f +Blanca 0.015595284 f +Myra 0.015214911 f +Leticia 0.015214911 f +Pat 0.015214911 f +Krista 0.015214911 f +Roxanne 0.015214911 f +Angelica 0.014834538 f +Johnnie 0.014834538 f +Robyn 0.014834538 f +Francis 0.014834538 f +Adrienne 0.014834538 f +Rosalie 0.014834538 f +Alexandra 0.014834538 f +Brooke 0.014834538 f +Bethany 0.014834538 f +Sadie 0.014834538 f +Bernadette 0.014834538 f +Traci 0.014454165 f +Jody 0.014454165 f +Kendra 0.014454165 f +Jasmine 0.014454165 f +Nichole 0.014454165 f +Rachael 0.014454165 f +Chelsea 0.014454165 f +Mable 0.014454165 f +Ernestine 0.014454165 f +Muriel 0.014454165 f +Marcella 0.014073793 f +Elena 0.014073793 f +Krystal 0.014073793 f +Angelina 0.014073793 f +Nadine 0.013693419 f +Kari 0.013693419 f +Estelle 0.013693419 f +Dianna 0.013693419 f +Paulette 0.013693419 f +Lora 0.013693419 f +Mona 0.013313047 f +Doreen 0.013313047 f +Rosemarie 0.013313047 f +Angel 0.013313047 f +Desiree 0.013313047 f +Antonia 0.013313047 f +Hope 0.012932675 f +Ginger 0.012932675 f +Janis 0.012932675 f +Betsy 0.012932675 f +Christie 0.012932675 f +Freda 0.012932675 f +Mercedes 0.012552301 f +Meredith 0.012552301 f +Lynette 0.012552301 f +Teri 0.012552301 f +Cristina 0.012552301 f +Eula 0.012552301 f +Leigh 0.01217193 f +Meghan 0.01217193 f +Sophia 0.01217193 f +Eloise 0.01217193 f +Rochelle 0.01217193 f +Gretchen 0.01217193 f +Cecelia 0.01217193 f +Raquel 0.011791556 f +Henrietta 0.011791556 f +Alyssa 0.011791556 f +Jana 0.011791556 f +Kelley 0.011791556 f +Gwen 0.011791556 f +Kerry 0.011791556 f +Jenna 0.011411183 f +Tricia 0.011411183 f +Laverne 0.011411183 f +Olive 0.011411183 f +Alexis 0.011411183 f +Tasha 0.011411183 f +Silvia 0.01103081 f +Elvira 0.01103081 f +Casey 0.01103081 f +Delia 0.01103081 f +Sophie 0.01103081 f +Kate 0.01103081 f +Patti 0.01103081 f +Lorena 0.01103081 f +Kellie 0.01103081 f +Sonja 0.01103081 f +Lila 0.01103081 f +Lana 0.01103081 f +Darla 0.01103081 f +May 0.01103081 f +Mindy 0.01103081 f +Essie 0.01103081 f +Mandy 0.01103081 f +Lorene 0.010650438 f +Elsa 0.010650438 f +Josefina 0.010650438 f +Jeannie 0.010650438 f +Miranda 0.010650438 f +Dixie 0.010650438 f +Lucia 0.010650438 f +Marta 0.010650438 f +Faith 0.010650438 f +Lela 0.010650438 f +Johanna 0.010650438 f +Shari 0.010650438 f +Camille 0.010650438 f +Tami 0.010270065 f +Shawna 0.010270065 f +Elisa 0.010270065 f +Ebony 0.010270065 f +Melba 0.010270065 f +Ora 0.010270065 f +Nettie 0.010270065 f +Tabitha 0.010270065 f +Ollie 0.010270065 f +Jaime 0.010270065 f +Winifred 0.010270065 f +Kristie 0.010270065 f +Marina 0.010270065 f +Alisha 0.010270065 f +Aimee 0.010270065 f +Rena 0.010270065 f +James 1.0 m +John 0.9858348 m +Robert 0.94725734 m +Michael 0.79234475 m +William 0.738698 m +David 0.71217597 m +Richard 0.51326096 m +Charles 0.45901144 m +Joseph 0.4231465 m +Thomas 0.4159132 m +Christopher 0.3119349 m +Daniel 0.2935503 m +Paul 0.28571427 m +Mark 0.28270042 m +Donald 0.2805907 m +George 0.27938515 m +Kenneth 0.24894513 m +Steven 0.23508136 m +Edward 0.23477998 m +Brian 0.22182037 m +Ronald 0.21850513 m +Anthony 0.21729958 m +Kevin 0.20223026 m +Jason 0.19891502 m +Matthew 0.19801085 m +Gary 0.19590114 m +Timothy 0.19288728 m +Jose 0.18474984 m +Larry 0.18022905 m +Jeffrey 0.17811935 m +Frank 0.17510547 m +Scott 0.16455697 m +Eric 0.1639542 m +Stephen 0.16274865 m +Andrew 0.16184448 m +Raymond 0.14707655 m +Gregory 0.1329114 m +Joshua 0.13110307 m +Jerry 0.13019891 m +Dennis 0.12507534 m +Walter 0.12025316 m +Patrick 0.1172393 m +Peter 0.114828214 m +Harold 0.11181434 m +Douglas 0.1106088 m +Henry 0.11000603 m +Carl 0.10427968 m +Arthur 0.100964434 m +Ryan 0.098854735 m +Roger 0.09704641 m +Joe 0.09674503 m +Juan 0.0952381 m +Jack 0.094936706 m +Albert 0.09463532 m +Jonathan 0.09433393 m +Justin 0.09373116 m +Terry 0.09373116 m +Gerald 0.09312838 m +Keith 0.092827 m +Samuel 0.092224225 m +Willie 0.09101868 m +Ralph 0.084990956 m +Lawrence 0.084990956 m +Nicholas 0.08288126 m +Roy 0.08227848 m +Benjamin 0.081374325 m +Bruce 0.07926462 m +Brandon 0.07836045 m +Adam 0.07805907 m +Harry 0.07564797 m +Fred 0.07564797 m +Wayne 0.075045206 m +Billy 0.07474382 m +Steve 0.07414105 m +Louis 0.07323689 m +Jeremy 0.0729355 m +Aaron 0.072332725 m +Randy 0.069921635 m +Howard 0.06931887 m +Eugene 0.06931887 m +Carlos 0.06901748 m +Russell 0.06751055 m +Bobby 0.06720916 m +Victor 0.06690778 m +Martin 0.065099455 m +Ernest 0.06479807 m +Phillip 0.0641953 m +Todd 0.0641953 m +Jesse 0.06298976 m +Craig 0.06208559 m +Alan 0.061482817 m +Shawn 0.060277276 m +Clarence 0.059373114 m +Sean 0.059373114 m +Philip 0.059373114 m +Chris 0.059373114 m +Johnny 0.05877034 m +Earl 0.05816757 m +Jimmy 0.057564795 m +Antonio 0.057263408 m +Danny 0.057263408 m +Bryan 0.057263408 m +Tony 0.057263408 m +Luis 0.056962024 m +Mike 0.056962024 m +Stanley 0.056057867 m +Leonard 0.056057867 m +Nathan 0.05575648 m +Dale 0.055455092 m +Manuel 0.05455093 m +Rodney 0.054249547 m +Curtis 0.054249547 m +Norman 0.05334539 m +Allen 0.05244123 m +Marvin 0.05153707 m +Vincent 0.05063291 m +Glenn 0.05033152 m +Jeffery 0.050030135 m +Travis 0.050030135 m +Jeff 0.050030135 m +Chad 0.049728755 m +Jacob 0.049728755 m +Lee 0.048824593 m +Melvin 0.048824593 m +Alfred 0.048824593 m +Kyle 0.04822182 m +Francis 0.04822182 m +Bradley 0.047920432 m +Jesus 0.046714887 m +Herbert 0.046714887 m +Frederick 0.0464135 m +Ray 0.046112113 m +Joel 0.045810726 m +Edwin 0.044605184 m +Don 0.043701023 m +Eddie 0.043399636 m +Ricky 0.042495478 m +Troy 0.041591316 m +Randall 0.041591316 m +Barry 0.040385775 m +Alexander 0.039783 m +Bernard 0.03827607 m +Mario 0.037673295 m +Leroy 0.037673295 m +Francisco 0.03737191 m +Marcus 0.03737191 m +Micheal 0.037070524 m +Theodore 0.037070524 m +Clifford 0.037070524 m +Miguel 0.036769137 m +Oscar 0.036769137 m +Jay 0.035563592 m +Jim 0.035563592 m +Tom 0.035262205 m +Calvin 0.034659434 m +Alex 0.034659434 m +Jon 0.034659434 m +Ronnie 0.03405666 m +Bill 0.033755276 m +Lloyd 0.033755276 m +Tommy 0.033755276 m +Leon 0.033755276 m +Derek 0.033755276 m +Warren 0.033152502 m +Darrell 0.032549728 m +Jerome 0.032549728 m +Floyd 0.03224834 m +Leo 0.031946953 m +Alvin 0.031645566 m +Tim 0.031344183 m +Wesley 0.031344183 m +Gordon 0.031344183 m +Dean 0.031344183 m +Greg 0.031344183 m +Jorge 0.031344183 m +Dustin 0.031042796 m +Pedro 0.031042796 m +Derrick 0.031042796 m +Dan 0.030440025 m +Lewis 0.02983725 m +Zachary 0.02983725 m +Corey 0.029535864 m +Herman 0.029234478 m +Maurice 0.029234478 m +Vernon 0.029234478 m +Roberto 0.029234478 m +Clyde 0.028631704 m +Glen 0.028330319 m +Hector 0.028330319 m +Shane 0.028028933 m +Ricardo 0.028028933 m +Sam 0.027727546 m +Rick 0.027426159 m +Lester 0.027426159 m +Brent 0.027124774 m +Ramon 0.027124774 m +Charlie 0.027124774 m +Tyler 0.026823387 m +Gilbert 0.026823387 m +Gene 0.026220614 m +Marc 0.026220614 m +Reginald 0.025316454 m +Ruben 0.024713684 m +Brett 0.024713684 m +Angel 0.024713684 m +Nathaniel 0.024412297 m +Rafael 0.024412297 m +Leslie 0.024412297 m +Edgar 0.02411091 m +Milton 0.02411091 m +Raul 0.023809524 m +Ben 0.023508137 m +Chester 0.023508137 m +Cecil 0.023508137 m +Duane 0.02320675 m +Franklin 0.02320675 m +Andre 0.022905363 m +Elmer 0.022302592 m +Brad 0.022001205 m +Gabriel 0.022001205 m +Ron 0.021699818 m +Mitchell 0.021699818 m +Roland 0.021699818 m +Arnold 0.021699818 m +Harvey 0.021699818 m +Jared 0.021398433 m +Adrian 0.020795658 m +Karl 0.020795658 m +Cory 0.020494275 m +Claude 0.020494275 m +Erik 0.020494275 m +Darryl 0.020192888 m +Jamie 0.0198915 m +Neil 0.0198915 m +Jessie 0.019590113 m +Christian 0.019590113 m +Javier 0.019590113 m +Fernando 0.019590113 m +Clinton 0.019590113 m +Ted 0.019288728 m +Mathew 0.019288728 m +Tyrone 0.019288728 m +Darren 0.019288728 m +Lonnie 0.019288728 m +Lance 0.01898734 m +Cody 0.01898734 m +Julio 0.01898734 m +Kelly 0.01898734 m +Kurt 0.018685956 m +Allan 0.018384568 m +Nelson 0.018384568 m +Guy 0.018083181 m +Clayton 0.018083181 m +Hugh 0.018083181 m +Max 0.017781796 m +Dwayne 0.017781796 m +Dwight 0.017480409 m +Armando 0.017480409 m +Felix 0.017480409 m +Jimmie 0.017480409 m +Everett 0.017179023 m +Jordan 0.016877638 m +Ian 0.016877638 m +Wallace 0.016877638 m +Ken 0.016576251 m +Bob 0.016576251 m +Jaime 0.016576251 m +Casey 0.016274864 m +Alfredo 0.016274864 m +Alberto 0.015973477 m +Dave 0.015973477 m +Ivan 0.015973477 m +Johnnie 0.015672091 m +Sidney 0.015672091 m +Byron 0.015672091 m +Julian 0.015672091 m +Isaac 0.015370704 m +Morris 0.015370704 m +Clifton 0.015069319 m +Willard 0.015069319 m +Daryl 0.015069319 m +Ross 0.015069319 m +Virgil 0.014767932 m +Andy 0.014767932 m +Marshall 0.014767932 m +Salvador 0.014767932 m +Perry 0.014767932 m +Kirk 0.014767932 m +Sergio 0.014767932 m +Marion 0.014466546 m +Tracy 0.014466546 m +Seth 0.014466546 m +Kent 0.014466546 m +Terrance 0.014466546 m +Rene 0.014466546 m +Eduardo 0.014165159 m +Terrence 0.014165159 m +Enrique 0.013863773 m +Freddie 0.013863773 m +Wade 0.013562387 m +Austin 0.013261001 m +Stuart 0.013261001 m +Fredrick 0.012959614 m +Arturo 0.012959614 m +Alejandro 0.012959614 m +Jackie 0.012959614 m +Joey 0.012959614 m +Nick 0.012959614 m +Luther 0.012959614 m +Wendell 0.012658227 m +Jeremiah 0.012658227 m +Evan 0.012658227 m +Julius 0.012658227 m +Dana 0.012658227 m +Donnie 0.012356842 m +Otis 0.012356842 m +Shannon 0.012055455 m +Trevor 0.012055455 m +Oliver 0.012055455 m +Luke 0.012055455 m +Homer 0.012055455 m +Gerard 0.012055455 m +Doug 0.012055455 m +Kenny 0.011754069 m +Hubert 0.011754069 m +Angelo 0.011754069 m +Shaun 0.011754069 m +Lyle 0.011452681 m +Matt 0.011452681 m +Lynn 0.011452681 m +Alfonso 0.011452681 m +Orlando 0.011151296 m +Rex 0.011151296 m +Carlton 0.011151296 m +Ernesto 0.011151296 m +Cameron 0.011151296 m +Neal 0.011151296 m +Pablo 0.010849909 m +Lorenzo 0.010849909 m +Omar 0.010849909 m +Wilbur 0.010849909 m +Blake 0.010849909 m +Grant 0.010849909 m +Horace 0.010849909 m +Roderick 0.010849909 m +Kerry 0.010849909 m +Abraham 0.010548523 m +Willis 0.010548523 m +Rickey 0.010548523 m +Jean 0.010548523 m +Ira 0.010548523 m +Andres 0.010247137 m +Cesar 0.010247137 m +Johnathan 0.010247137 m +Malcolm 0.010247137 m +Rudolph 0.010247137 m +Damon 0.010247137 m +Kelvin 0.010247137 m +Rudy 0.010247137 m +Preston 0.010247137 m diff --git a/external_library/gem/ruby_wordcram/data/usconst.txt b/external_library/gem/ruby_wordcram/data/usconst.txt new file mode 100644 index 0000000..27b9cf5 --- /dev/null +++ b/external_library/gem/ruby_wordcram/data/usconst.txt @@ -0,0 +1,865 @@ +We the People of the United States, in Order to form a more perfect Union, +establish Justice, insure domestic Tranquility, provide for the common +defence, promote the general Welfare, and secure the Blessings of Liberty to +ourselves and our Posterity, do ordain and establish this Constitution for the +United States of America. + +Article 1. + +Section 1 +All legislative Powers herein granted shall be vested in a Congress of the +United States, which shall consist of a Senate and House of Representatives. + +Section 2 +The House of Representatives shall be composed of Members chosen every second +Year by the People of the several States, and the Electors in each State shall +have the Qualifications requisite for Electors of the most numerous Branch of +the State Legislature. + +No Person shall be a Representative who shall not have attained to the Age of +twenty five Years, and been seven Years a Citizen of the United States, and who +shall not, when elected, be an Inhabitant of that State in which he shall be +chosen. + +Representatives and direct Taxes shall be apportioned among the several States +which may be included within this Union, according to their respective Numbers, +which shall be determined by adding to the whole Number of free Persons, +including those bound to Service for a Term of Years, and excluding Indians not +taxed, three fifths of all other Persons. + +The actual Enumeration shall be made within three Years after the first Meeting +of the Congress of the United States, and within every subsequent Term of ten +Years, in such Manner as they shall by Law direct. The Number of +Representatives shall not exceed one for every thirty Thousand, but each State +shall have at Least one Representative; and until such enumeration shall be +made, the State of New Hampshire shall be entitled to choose three, +Massachusetts eight, Rhode Island and Providence Plantations one, Connecticut +five, New York six, New Jersey four, Pennsylvania eight, Delaware one, Maryland +six, Virginia ten, North Carolina five, South Carolina five and Georgia three. + +When vacancies happen in the Representation from any State, the Executive +Authority thereof shall issue Writs of Election to fill such Vacancies. + +The House of Representatives shall choose their Speaker and other Officers; and +shall have the sole Power of Impeachment. + +Section 3 +The Senate of the United States shall be composed of two Senators from each +State, chosen by the Legislature thereof, for six Years; and each Senator shall +have one Vote. + +Immediately after they shall be assembled in Consequence of the first Election, +they shall be divided as equally as may be into three Classes. The Seats of the +Senators of the first Class shall be vacated at the Expiration of the second +Year, of the second Class at the Expiration of the fourth Year, and of the +third Class at the Expiration of the sixth Year, so that one third may be +chosen every second Year; and if Vacancies happen by Resignation, or otherwise, +during the Recess of the Legislature of any State, the Executive thereof may +make temporary Appointments until the next Meeting of the Legislature, which +shall then fill such Vacancies. + +No person shall be a Senator who shall not have attained to the Age of thirty +Years, and been nine Years a Citizen of the United States, and who shall not, +when elected, be an Inhabitant of that State for which he shall be chosen. + +The Vice President of the United States shall be President of the Senate, but +shall have no Vote, unless they be equally divided. + +The Senate shall choose their other Officers, and also a President pro tempore, +in the absence of the Vice President, or when he shall exercise the Office of +President of the United States. + +The Senate shall have the sole Power to try all Impeachments. When sitting for +that Purpose, they shall be on Oath or Affirmation. When the President of the +United States is tried, the Chief Justice shall preside: And no Person shall be +convicted without the Concurrence of two thirds of the Members present. + +Judgment in Cases of Impeachment shall not extend further than to removal from +Office, and disqualification to hold and enjoy any Office of honor, Trust or +Profit under the United States: but the Party convicted shall nevertheless be +liable and subject to Indictment, Trial, Judgment and Punishment, according to +Law. + +Section 4 +The Times, Places and Manner of holding Elections for Senators and +Representatives, shall be prescribed in each State by the Legislature thereof; +but the Congress may at any time by Law make or alter such Regulations, except +as to the Place of Choosing Senators. + +The Congress shall assemble at least once in every Year, and such Meeting shall +be on the first Monday in December, unless they shall by Law appoint a +different Day. + +Section 5 +Each House shall be the Judge of the Elections, Returns and Qualifications of +its own Members, and a Majority of each shall constitute a Quorum to do +Business; but a smaller number may adjourn from day to day, and may be +authorized to compel the Attendance of absent Members, in such Manner, and +under such Penalties as each House may provide. + +Each House may determine the Rules of its Proceedings, punish its Members for +disorderly Behavior, and, with the Concurrence of two-thirds, expel a Member. + +Each House shall keep a Journal of its Proceedings, and from time to time +publish the same, excepting such Parts as may in their Judgment require +Secrecy; and the Yeas and Nays of the Members of either House on any question +shall, at the Desire of one fifth of those Present, be entered on the Journal. + +Neither House, during the Session of Congress, shall, without the Consent of +the other, adjourn for more than three days, nor to any other Place than that +in which the two Houses shall be sitting. + +Section 6 +The Senators and Representatives shall receive a Compensation for their +Services, to be ascertained by Law, and paid out of the Treasury of the United +States. They shall in all Cases, except Treason, Felony and Breach of the +Peace, be privileged from Arrest during their Attendance at the Session of +their respective Houses, and in going to and returning from the same; and for +any Speech or Debate in either House, they shall not be questioned in any other +Place. + +No Senator or Representative shall, during the Time for which he was elected, +be appointed to any civil Office under the Authority of the United States which +shall have been created, or the Emoluments whereof shall have been increased +during such time; and no Person holding any Office under the United States, +shall be a Member of either House during his Continuance in Office. + + +Section 7 +All bills for raising Revenue shall originate in the House of Representatives; +but the Senate may propose or concur with Amendments as on other Bills. + +Every Bill which shall have passed the House of Representatives and the Senate, +shall, before it become a Law, be presented to the President of the United +States; If he approve he shall sign it, but if not he shall return it, with his +Objections to that House in which it shall have originated, who shall enter the +Objections at large on their Journal, and proceed to reconsider it. If after +such Reconsideration two thirds of that House shall agree to pass the Bill, it +shall be sent, together with the Objections, to the other House, by which it +shall likewise be reconsidered, and if approved by two thirds of that House, it +shall become a Law. But in all such Cases the Votes of both Houses shall be +determined by Yeas and Nays, and the Names of the Persons voting for and +against the Bill shall be entered on the Journal of each House respectively. If +any Bill shall not be returned by the President within ten Days (Sundays +excepted) after it shall have been presented to him, the Same shall be a Law, +in like Manner as if he had signed it, unless the Congress by their Adjournment +prevent its Return, in which Case it shall not be a Law. + +Every Order, Resolution, or Vote to which the Concurrence of the Senate and +House of Representatives may be necessary (except on a question of Adjournment) +shall be presented to the President of the United States; and before the Same +shall take Effect, shall be approved by him, or being disapproved by him, shall +be repassed by two thirds of the Senate and House of Representatives, according +to the Rules and Limitations prescribed in the Case of a Bill. + + +Section 8 +The Congress shall have Power To lay and collect Taxes, Duties, Imposts and +Excises, to pay the Debts and provide for the common Defence and general +Welfare of the United States; but all Duties, Imposts and Excises shall be +uniform throughout the United States; + +To borrow money on the credit of the United States; + +To regulate Commerce with foreign Nations, and among the several States, and +with the Indian Tribes; + +To establish an uniform Rule of Naturalization, and uniform Laws on the subject +of Bankruptcies throughout the United States; + +To coin Money, regulate the Value thereof, and of foreign Coin, and fix the +Standard of Weights and Measures; + +To provide for the Punishment of counterfeiting the Securities and current Coin +of the United States; + +To establish Post Offices and Post Roads; + +To promote the Progress of Science and useful Arts, by securing for limited +Times to Authors and Inventors the exclusive Right to their respective Writings +and Discoveries; + +To constitute Tribunals inferior to the supreme Court; + +To define and punish Piracies and Felonies committed on the high Seas, and +Offenses against the Law of Nations; + +To declare War, grant Letters of Marque and Reprisal, and make Rules concerning +Captures on Land and Water; + +To raise and support Armies, but no Appropriation of Money to that Use shall be +for a longer Term than two Years; + +To provide and maintain a Navy; + +To make Rules for the Government and Regulation of the land and naval Forces; + +To provide for calling forth the Militia to execute the Laws of the Union, +suppress Insurrections and repel Invasions; + +To provide for organizing, arming, and disciplining, the Militia, and for +governing such Part of them as may be employed in the Service of the United +States, reserving to the States respectively, the Appointment of the Officers, +and the Authority of training the Militia according to the discipline +prescribed by Congress; + +To exercise exclusive Legislation in all Cases whatsoever, over such District +(not exceeding ten Miles square) as may, by Cession of particular States, and +the acceptance of Congress, become the Seat of the Government of the United +States, and to exercise like Authority over all Places purchased by the Consent +of the Legislature of the State in which the Same shall be, for the Erection of +Forts, Magazines, Arsenals, dock-Yards, and other needful Buildings; And + +To make all Laws which shall be necessary and proper for carrying into +Execution the foregoing Powers, and all other Powers vested by this +Constitution in the Government of the United States, or in any Department or +Officer thereof. + +Section 9 +The Migration or Importation of such Persons as any of the States now existing +shall think proper to admit, shall not be prohibited by the Congress prior to +the Year one thousand eight hundred and eight, but a tax or duty may be imposed +on such Importation, not exceeding ten dollars for each Person. + +The privilege of the Writ of Habeas Corpus shall not be suspended, unless when +in Cases of Rebellion or Invasion the public Safety may require it. + +No Bill of Attainder or ex post facto Law shall be passed. + +No capitation, or other direct, Tax shall be laid, unless in Proportion to the +Census or Enumeration herein before directed to be taken. + +No Tax or Duty shall be laid on Articles exported from any State. + +No Preference shall be given by any Regulation of Commerce or Revenue to the +Ports of one State over those of another: nor shall Vessels bound to, or from, +one State, be obliged to enter, clear, or pay Duties in another. + +No Money shall be drawn from the Treasury, but in Consequence of Appropriations +made by Law; and a regular Statement and Account of the Receipts and +Expenditures of all public Money shall be published from time to time. + +No Title of Nobility shall be granted by the United States: And no Person +holding any Office of Profit or Trust under them, shall, without the Consent of +the Congress, accept of any present, Emolument, Office, or Title, of any kind +whatever, from any King, Prince or foreign State. + +Section 10 +No State shall enter into any Treaty, Alliance, or Confederation; grant Letters +of Marque and Reprisal; coin Money; emit Bills of Credit; make any Thing but +gold and silver Coin a Tender in Payment of Debts; pass any Bill of Attainder, +ex post facto Law, or Law impairing the Obligation of Contracts, or grant any +Title of Nobility. + +No State shall, without the Consent of the Congress, lay any Imposts or Duties +on Imports or Exports, except what may be absolutely necessary for executing +its inspection Laws: and the net Produce of all Duties and Imposts, laid by +any State on Imports or Exports, shall be for the Use of the Treasury of the +United States; and all such Laws shall be subject to the Revision and Control +of the Congress. + +No State shall, without the Consent of Congress, lay any duty of Tonnage, keep +Troops, or Ships of War in time of Peace, enter into any Agreement or Compact +with another State, or with a foreign Power, or engage in War, unless actually +invaded, or in such imminent Danger as will not admit of delay. + +Article 2. + +Section 1 +The executive Power shall be vested in a President of the United States of +America. He shall hold his Office during the Term of four Years, and, together +with the Vice-President chosen for the same Term, be elected, as follows: + +Each State shall appoint, in such Manner as the Legislature thereof may direct, +a Number of Electors, equal to the whole Number of Senators and Representatives +to which the State may be entitled in the Congress: but no Senator or +Representative, or Person holding an Office of Trust or Profit under the United +States, shall be appointed an Elector. + +The Electors shall meet in their respective States, and vote by Ballot for two +persons, of whom one at least shall not lie an Inhabitant of the same State +with themselves. And they shall make a List of all the Persons voted for, and +of the Number of Votes for each; which List they shall sign and certify, and +transmit sealed to the Seat of the Government of the United States, directed to +the President of the Senate. The President of the Senate shall, in the Presence +of the Senate and House of Representatives, open all the Certificates, and the +Votes shall then be counted. The Person having the greatest Number of Votes +shall be the President, if such Number be a Majority of the whole Number of +Electors appointed; and if there be more than one who have such Majority, and +have an equal Number of Votes, then the House of Representatives shall +immediately choose by Ballot one of them for President; and if no Person have a +Majority, then from the five highest on the List the said House shall in like +Manner choose the President. But in choosing the President, the Votes shall be +taken by States, the Representation from each State having one Vote; a quorum +for this Purpose shall consist of a Member or Members from two-thirds of the +States, and a Majority of all the States shall be necessary to a Choice. In +every Case, after the Choice of the President, the Person having the greatest +Number of Votes of the Electors shall be the Vice President. But if there +should remain two or more who have equal Votes, the Senate shall choose from +them by Ballot the Vice-President. + +The Congress may determine the Time of choosing the Electors, and the Day on +which they shall give their Votes; which Day shall be the same throughout the +United States. + +No person except a natural born Citizen, or a Citizen of the United States, at +the time of the Adoption of this Constitution, shall be eligible to the Office +of President; neither shall any Person be eligible to that Office who shall not +have attained to the Age of thirty-five Years, and been fourteen Years a +Resident within the United States. + +In Case of the Removal of the President from Office, or of his Death, +Resignation, or Inability to discharge the Powers and Duties of the said +Office, the same shall devolve on the Vice President, and the Congress may by +Law provide for the Case of Removal, Death, Resignation or Inability, both of +the President and Vice President, declaring what Officer shall then act as +President, and such Officer shall act accordingly, until the Disability be +removed, or a President shall be elected. + +The President shall, at stated Times, receive for his Services, a Compensation, +which shall neither be increased nor diminished during the Period for which he +shall have been elected, and he shall not receive within that Period any other +Emolument from the United States, or any of them. + +Before he enter on the Execution of his Office, he shall take the following +Oath or Affirmation: + +"I do solemnly swear (or affirm) that I will faithfully execute the Office of +President of the United States, and will to the best of my Ability, preserve, +protect and defend the Constitution of the United States." + +Section 2 +The President shall be Commander in Chief of the Army and Navy of the United +States, and of the Militia of the several States, when called into the actual +Service of the United States; he may require the Opinion, in writing, of the +principal Officer in each of the executive Departments, upon any subject +relating to the Duties of their respective Offices, and he shall have Power to +Grant Reprieves and Pardons for Offenses against the United States, except in +Cases of Impeachment. + +He shall have Power, by and with the Advice and Consent of the Senate, to make +Treaties, provided two thirds of the Senators present concur; and he shall +nominate, and by and with the Advice and Consent of the Senate, shall appoint +Ambassadors, other public Ministers and Consuls, Judges of the supreme Court, +and all other Officers of the United States, whose Appointments are not herein +otherwise provided for, and which shall be established by Law: but the Congress +may by Law vest the Appointment of such inferior Officers, as they think +proper, in the President alone, in the Courts of Law, or in the Heads of +Departments. + +The President shall have Power to fill up all Vacancies that may happen during +the Recess of the Senate, by granting Commissions which shall expire at the End +of their next Session. + +Section 3 +He shall from time to time give to the Congress Information of the State of the +Union, and recommend to their Consideration such Measures as he shall judge +necessary and expedient; he may, on extraordinary Occasions, convene both +Houses, or either of them, and in Case of Disagreement between them, with +Respect to the Time of Adjournment, he may adjourn them to such Time as he +shall think proper; he shall receive Ambassadors and other public Ministers; he +shall take Care that the Laws be faithfully executed, and shall Commission all +the Officers of the United States. + +Section 4 +The President, Vice President and all civil Officers of the United States, +shall be removed from Office on Impeachment for, and Conviction of, Treason, +Bribery, or other high Crimes and Misdemeanors. + +Article 3. + +Section 1 +The judicial Power of the United States, shall be vested in one supreme Court, +and in such inferior Courts as the Congress may from time to time ordain and +establish. The Judges, both of the supreme and inferior Courts, shall hold +their Offices during good Behavior, and shall, at stated Times, receive for +their Services a Compensation which shall not be diminished during their +Continuance in Office. + +Section 2 +The judicial Power shall extend to all Cases, in Law and Equity, arising under +this Constitution, the Laws of the United States, and Treaties made, or which +shall be made, under their Authority; to all Cases affecting Ambassadors, other +public Ministers and Consuls; to all Cases of admiralty and maritime +Jurisdiction; to Controversies to which the United States shall be a Party; to +Controversies between two or more States; between a State and Citizens of +another State; between Citizens of different States; between Citizens of the +same State claiming Lands under Grants of different States, and between a +State, or the Citizens thereof, and foreign States, Citizens or Subjects. + +In all Cases affecting Ambassadors, other public Ministers and Consuls, and +those in which a State shall be Party, the supreme Court shall have original +Jurisdiction. In all the other Cases before mentioned, the supreme Court shall +have appellate Jurisdiction, both as to Law and Fact, with such Exceptions, and +under such Regulations as the Congress shall make. + +The Trial of all Crimes, except in Cases of Impeachment, shall be by Jury; and +such Trial shall be held in the State where the said Crimes shall have been +committed; but when not committed within any State, the Trial shall be at such +Place or Places as the Congress may by Law have directed. + +Section 3 +Treason against the United States, shall consist only in levying War against +them, or in adhering to their Enemies, giving them Aid and Comfort. No Person +shall be convicted of Treason unless on the Testimony of two Witnesses to the +same overt Act, or on Confession in open Court. + +The Congress shall have power to declare the Punishment of Treason, but no +Attainder of Treason shall work Corruption of Blood, or Forfeiture except +during the Life of the Person attainted. + +Article 4. + +Section 1 +Full Faith and Credit shall be given in each State to the public Acts, Records, +and judicial Proceedings of every other State. And the Congress may by general +Laws prescribe the Manner in which such Acts, Records and Proceedings shall be +proved, and the Effect thereof. + +Section 2 +The Citizens of each State shall be entitled to all Privileges and Immunities +of Citizens in the several States. + +A Person charged in any State with Treason, Felony, or other Crime, who shall +flee from Justice, and be found in another State, shall on demand of the +executive Authority of the State from which he fled, be delivered up, to be +removed to the State having Jurisdiction of the Crime. + +No Person held to Service or Labour in one State, under the Laws thereof, +escaping into another, shall, in Consequence of any Law or Regulation therein, +be discharged from such Service or Labour, But shall be delivered up on Claim +of the Party to whom such Service or Labour may be due. + +Section 3 +New States may be admitted by the Congress into this Union; but no new States +shall be formed or erected within the Jurisdiction of any other State; nor any +State be formed by the Junction of two or more States, or parts of States, +without the Consent of the Legislatures of the States concerned as well as of +the Congress. + +The Congress shall have Power to dispose of and make all needful Rules and +Regulations respecting the Territory or other Property belonging to the United +States; and nothing in this Constitution shall be so construed as to Prejudice +any Claims of the United States, or of any particular State. + +Section 4 +The United States shall guarantee to every State in this Union a Republican +Form of Government, and shall protect each of them against Invasion; and on +Application of the Legislature, or of the Executive (when the Legislature +cannot be convened) against domestic Violence. + +Article 5. + +The Congress, whenever two thirds of both Houses shall deem it necessary, shall +propose Amendments to this Constitution, or, on the Application of the +Legislatures of two thirds of the several States, shall call a Convention for +proposing Amendments, which, in either Case, shall be valid to all Intents and +Purposes, as part of this Constitution, when ratified by the Legislatures of +three fourths of the several States, or by Conventions in three fourths +thereof, as the one or the other Mode of Ratification may be proposed by the +Congress; Provided that no Amendment which may be made prior to the Year One +thousand eight hundred and eight shall in any Manner affect the first and +fourth Clauses in the Ninth Section of the first Article; and that no State, +without its Consent, shall be deprived of its equal Suffrage in the Senate. + +Article 6. + +All Debts contracted and Engagements entered into, before the Adoption of this +Constitution, shall be as valid against the United States under this +Constitution, as under the Confederation. + +This Constitution, and the Laws of the United States which shall be made in +Pursuance thereof; and all Treaties made, or which shall be made, under the +Authority of the United States, shall be the supreme Law of the Land; and the +Judges in every State shall be bound thereby, any Thing in the Constitution or +Laws of any State to the Contrary notwithstanding. + +The Senators and Representatives before mentioned, and the Members of the +several State Legislatures, and all executive and judicial Officers, both of +the United States and of the several States, shall be bound by Oath or +Affirmation, to support this Constitution; but no religious Test shall ever be +required as a Qualification to any Office or public Trust under the United +States. + +Article 7. + +The Ratification of the Conventions of nine States, shall be sufficient for the +Establishment of this Constitution between the States so ratifying the Same. + +Done in Convention by the Unanimous Consent of the States present the +Seventeenth Day of September in the Year of our Lord one thousand seven hundred +and Eighty seven and of the Independence of the United States of America the +Twelfth. In Witness whereof We have hereunto subscribed our Names. + +George Washington - President and deputy from Virginia + +New Hampshire - John Langdon, Nicholas Gilman + +Massachusetts - Nathaniel Gorham, Rufus King + +Connecticut - William Samuel Johnson, Roger Sherman + +New York - Alexander Hamilton + +New Jersey - William Livingston, David Brearley, William Paterson, Jonathan +Dayton + +Pennsylvania - Benjamin Franklin, Thomas Mifflin, Robert Morris, George Clymer, +Thomas Fitzsimons, Jared Ingersoll, James Wilson, Gouvernour Morris + +Delaware - George Read, Gunning Bedford Jr., John Dickinson, Richard Bassett, +Jacob Broom + +Maryland - James McHenry, Daniel of St Thomas Jenifer, Daniel Carroll + +Virginia - John Blair, James Madison Jr. + +North Carolina - William Blount, Richard Dobbs Spaight, Hugh Williamson + +South Carolina - John Rutledge, Charles Cotesworth Pinckney, Charles Pinckney, +Pierce Butler + +Georgia - William Few, Abraham Baldwin + +Attest: William Jackson, Secretary + + +Amendment 1 +Congress shall make no law respecting an establishment of religion, or +prohibiting the free exercise thereof; or abridging the freedom of speech, or +of the press; or the right of the people peaceably to assemble, and to petition +the Government for a redress of grievances. + +Amendment 2 +A well regulated Militia, being necessary to the security of a free State, the +right of the people to keep and bear Arms, shall not be infringed. + +Amendment 3 +No Soldier shall, in time of peace be quartered in any house, without the +consent of the Owner, nor in time of war, but in a manner to be prescribed by +law. + +Amendment 4 +The right of the people to be secure in their persons, houses, papers, and +effects, against unreasonable searches and seizures, shall not be violated, and +no Warrants shall issue, but upon probable cause, supported by Oath or +affirmation, and particularly describing the place to be searched, and the +persons or things to be seized. + +Amendment 5 +No person shall be held to answer for a capital, or otherwise infamous crime, +unless on a presentment or indictment of a Grand Jury, except in cases arising +in the land or naval forces, or in the Militia, when in actual service in time +of War or public danger; nor shall any person be subject for the same offense +to be twice put in jeopardy of life or limb; nor shall be compelled in any +criminal case to be a witness against himself, nor be deprived of life, +liberty, or property, without due process of law; nor shall private property be +taken for public use, without just compensation. + +Amendment 6 +In all criminal prosecutions, the accused shall enjoy the right to a speedy and +public trial, by an impartial jury of the State and district wherein the crime +shall have been committed, which district shall have been previously +ascertained by law, and to be informed of the nature and cause of the +accusation; to be confronted with the witnesses against him; to have compulsory +process for obtaining witnesses in his favor, and to have the Assistance of +Counsel for his defence. + +Amendment 7 +In Suits at common law, where the value in controversy shall exceed twenty +dollars, the right of trial by jury shall be preserved, and no fact tried by a +jury, shall be otherwise re-examined in any Court of the United States, than +according to the rules of the common law. + +Amendment 8 +Excessive bail shall not be required, nor excessive fines imposed, nor cruel +and unusual punishments inflicted. + +Amendment 9 +The enumeration in the Constitution, of certain rights, shall not be construed +to deny or disparage others retained by the people. + +Amendment 10 +The powers not delegated to the United States by the Constitution, nor +prohibited by it to the States, are reserved to the States respectively, or to +the people. + +Amendment 11 +The Judicial power of the United States shall not be construed to extend to any +suit in law or equity, commenced or prosecuted against one of the United States +by Citizens of another State, or by Citizens or Subjects of any Foreign State. + +Amendment 12 +The Electors shall meet in their respective states, and vote by ballot for +President and Vice-President, one of whom, at least, shall not be an inhabitant +of the same state with themselves; they shall name in their ballots the person +voted for as President, and in distinct ballots the person voted for as +Vice-President, and they shall make distinct lists of all persons voted for as +President, and of all persons voted for as Vice-President and of the number of +votes for each, which lists they shall sign and certify, and transmit sealed to +the seat of the government of the United States, directed to the President of +the Senate; + +The President of the Senate shall, in the presence of the Senate and House of +Representatives, open all the certificates and the votes shall then be counted; + +The person having the greatest Number of votes for President, shall be the +President, if such number be a majority of the whole number of Electors +appointed; and if no person have such majority, then from the persons having +the highest numbers not exceeding three on the list of those voted for as +President, the House of Representatives shall choose immediately, by ballot, +the President. But in choosing the President, the votes shall be taken by +states, the representation from each state having one vote; a quorum for this +purpose shall consist of a member or members from two-thirds of the states, and +a majority of all the states shall be necessary to a choice. And if the House +of Representatives shall not choose a President whenever the right of choice +shall devolve upon them, before the fourth day of March next following, then +the Vice-President shall act as President, as in the case of the death or other +constitutional disability of the President. + +The person having the greatest number of votes as Vice-President, shall be the +Vice-President, if such number be a majority of the whole number of Electors +appointed, and if no person have a majority, then from the two highest numbers +on the list, the Senate shall choose the Vice-President; a quorum for the +purpose shall consist of two-thirds of the whole number of Senators, and a +majority of the whole number shall be necessary to a choice. But no person +constitutionally ineligible to the office of President shall be eligible to +that of Vice-President of the United States. + +Amendment 13 +1. Neither slavery nor involuntary servitude, except as a punishment for crime +whereof the party shall have been duly convicted, shall exist within the United +States, or any place subject to their jurisdiction. + +2. Congress shall have power to enforce this article by appropriate +legislation. + +Amendment 14 +1. All persons born or naturalized in the United States, and subject to the +jurisdiction thereof, are citizens of the United States and of the State +wherein they reside. No State shall make or enforce any law which shall abridge +the privileges or immunities of citizens of the United States; nor shall any +State deprive any person of life, liberty, or property, without due process of +law; nor deny to any person within its jurisdiction the equal protection of the +laws. + +2. Representatives shall be apportioned among the several States according to +their respective numbers, counting the whole number of persons in each State, +excluding Indians not taxed. But when the right to vote at any election for the +choice of electors for President and Vice-President of the United States, +Representatives in Congress, the Executive and Judicial officers of a State, or +the members of the Legislature thereof, is denied to any of the male +inhabitants of such State, being twenty-one years of age, and citizens of the +United States, or in any way abridged, except for participation in rebellion, +or other crime, the basis of representation therein shall be reduced in the +proportion which the number of such male citizens shall bear to the whole +number of male citizens twenty-one years of age in such State. + +3. No person shall be a Senator or Representative in Congress, or elector of +President and Vice-President, or hold any office, civil or military, under the +United States, or under any State, who, having previously taken an oath, as a +member of Congress, or as an officer of the United States, or as a member of +any State legislature, or as an executive or judicial officer of any State, to +support the Constitution of the United States, shall have engaged in +insurrection or rebellion against the same, or given aid or comfort to the +enemies thereof. But Congress may by a vote of two-thirds of each House, remove +such disability. + +4. The validity of the public debt of the United States, authorized by law, +including debts incurred for payment of pensions and bounties for services in +suppressing insurrection or rebellion, shall not be questioned. But neither the +United States nor any State shall assume or pay any debt or obligation incurred +in aid of insurrection or rebellion against the United States, or any claim for +the loss or emancipation of any slave; but all such debts, obligations and +claims shall be held illegal and void. + +5. The Congress shall have power to enforce, by appropriate legislation, the +provisions of this article. + +Amendment 15 +1. The right of citizens of the United States to vote shall not be denied or +abridged by the United States or by any State on account of race, color, or +previous condition of servitude. + +2. The Congress shall have power to enforce this article by appropriate +legislation. + +Amendment 16 +The Congress shall have power to lay and collect taxes on incomes, from +whatever source derived, without apportionment among the several States, and +without regard to any census or enumeration. + +Amendment 17 +The Senate of the United States shall be composed of two Senators from each +State, elected by the people thereof, for six years; and each Senator shall +have one vote. The electors in each State shall have the qualifications +requisite for electors of the most numerous branch of the State legislatures. + +When vacancies happen in the representation of any State in the Senate, the +executive authority of such State shall issue writs of election to fill such +vacancies: Provided, That the legislature of any State may empower the +executive thereof to make temporary appointments until the people fill the +vacancies by election as the legislature may direct. + +This amendment shall not be so construed as to affect the election or term of +any Senator chosen before it becomes valid as part of the Constitution. + +Amendment 18 +1. After one year from the ratification of this article the manufacture, sale, +or transportation of intoxicating liquors within, the importation thereof into, +or the exportation thereof from the United States and all territory subject to +the jurisdiction thereof for beverage purposes is hereby prohibited. + +2. The Congress and the several States shall have concurrent power to enforce +this article by appropriate legislation. + +3. This article shall be inoperative unless it shall have been ratified as an +amendment to the Constitution by the legislatures of the several States, as +provided in the Constitution, within seven years from the date of the +submission hereof to the States by the Congress. + +Amendment 19 +The right of citizens of the United States to vote shall not be denied or +abridged by the United States or by any State on account of sex. + +Congress shall have power to enforce this article by appropriate legislation. + +Amendment 20 +1. The terms of the President and Vice President shall end at noon on the 20th +day of January, and the terms of Senators and Representatives at noon on the 3d +day of January, of the years in which such terms would have ended if this +article had not been ratified; and the terms of their successors shall then +begin. + +2. The Congress shall assemble at least once in every year, and such meeting +shall begin at noon on the 3d day of January, unless they shall by law appoint +a different day. + +3. If, at the time fixed for the beginning of the term of the President, the +President elect shall have died, the Vice President elect shall become +President. If a President shall not have been chosen before the time fixed for +the beginning of his term, or if the President elect shall have failed to +qualify, then the Vice President elect shall act as President until a President +shall have qualified; and the Congress may by law provide for the case wherein +neither a President elect nor a Vice President elect shall have qualified, +declaring who shall then act as President, or the manner in which one who is to +act shall be selected, and such person shall act accordingly until a President +or Vice President shall have qualified. + +4. The Congress may by law provide for the case of the death of any of the +persons from whom the House of Representatives may choose a President whenever +the right of choice shall have devolved upon them, and for the case of the +death of any of the persons from whom the Senate may choose a Vice President +whenever the right of choice shall have devolved upon them. + +5. Sections 1 and 2 shall take effect on the 15th day of October following the +ratification of this article. + +6. This article shall be inoperative unless it shall have been ratified as an +amendment to the Constitution by the legislatures of three-fourths of the +several States within seven years from the date of its submission. + +Amendment 21 +1. The eighteenth article of amendment to the Constitution of the United States +is hereby repealed. + +2. The transportation or importation into any State, Territory, or possession +of the United States for delivery or use therein of intoxicating liquors, in +violation of the laws thereof, is hereby prohibited. + +3. The article shall be inoperative unless it shall have been ratified as an +amendment to the Constitution by conventions in the several States, as provided +in the Constitution, within seven years from the date of the submission hereof +to the States by the Congress. + +Amendment 22 +1. No person shall be elected to the office of the President more than twice, +and no person who has held the office of President, or acted as President, for +more than two years of a term to which some other person was elected President +shall be elected to the office of the President more than once. But this +Article shall not apply to any person holding the office of President, when this +Article was proposed by the Congress, and shall not prevent any person who may +be holding the office of President, or acting as President, during the term +within which this Article becomes operative from holding the office of +President or acting as President during the remainder of such term. + +2. This article shall be inoperative unless it shall have been ratified as an +amendment to the Constitution by the legislatures of three-fourths of the +several States within seven years from the date of its submission to the States +by the Congress. + +Amendment 23 +1. The District constituting the seat of Government of the United States shall +appoint in such manner as the Congress may direct: A number of electors of +President and Vice President equal to the whole number of Senators and +Representatives in Congress to which the District would be entitled if it were +a State, but in no event more than the least populous State; they shall be in +addition to those appointed by the States, but they shall be considered, for +the purposes of the election of President and Vice President, to be electors +appointed by a State; and they shall meet in the District and perform such +duties as provided by the twelfth article of amendment. + +2. The Congress shall have power to enforce this article by appropriate +legislation. + +Amendment 24 +1. The right of citizens of the United States to vote in any primary or other +election for President or Vice President, for electors for President or +Vice President, or for Senator or Representative in Congress, shall not be +denied or abridged by the United States or any State by reason of failure to +pay any poll tax or other tax. + +2. The Congress shall have power to enforce this article by appropriate +legislation. + +Amendment 25 +1. In case of the removal of the President from office or of his death or +resignation, the Vice President shall become President. + +2. Whenever there is a vacancy in the office of the Vice President, the +President shall nominate a Vice President who shall take office upon +confirmation by a majority vote of both Houses of Congress. + +3. Whenever the President transmits to the President pro tempore of the Senate +and the Speaker of the House of Representatives his written declaration that he +is unable to discharge the powers and duties of his office, and until he +transmits to them a written declaration to the contrary, such powers and duties +shall be discharged by the Vice President as Acting President. + +4. Whenever the Vice President and a majority of either the principal officers +of the executive departments or of such other body as Congress may by law +provide, transmit to the President pro tempore of the Senate and the Speaker of +the House of Representatives their written declaration that the President is +unable to discharge the powers and duties of his office, the Vice President +shall immediately assume the powers and duties of the office as Acting +President. + +Thereafter, when the President transmits to the President pro tempore of the +Senate and the Speaker of the House of Representatives his written declaration +that no inability exists, he shall resume the powers and duties of his office +unless the Vice President and a majority of either the principal officers of +the executive department or of such other body as Congress may by law provide, +transmit within four days to the President pro tempore of the Senate and the +Speaker of the House of Representatives their written declaration that the +President is unable to discharge the powers and duties of his office. Thereupon +Congress shall decide the issue, assembling within forty eight hours for that +purpose if not in session. If the Congress, within twenty one days after +receipt of the latter written declaration, or, if Congress is not in session, +within twenty one days after Congress is required to assemble, determines by +two thirds vote of both Houses that the President is unable to discharge the +powers and duties of his office, the Vice President shall continue to discharge +the same as Acting President; otherwise, the President shall resume the powers +and duties of his office. + +Amendment 26 +1. The right of citizens of the United States, who are eighteen years of age or +older, to vote shall not be denied or abridged by the United States or by any +State on account of age. + +2. The Congress shall have power to enforce this article by appropriate +legislation. + +Amendment 27 +No law, varying the compensation for the services of the Senators and +Representatives, shall take effect, until an election of Representatives shall +have intervened. diff --git a/external_library/gem/ruby_wordcram/first_names.rb b/external_library/gem/ruby_wordcram/first_names.rb new file mode 100644 index 0000000..5fb51f1 --- /dev/null +++ b/external_library/gem/ruby_wordcram/first_names.rb @@ -0,0 +1,33 @@ +# firstnames is a WordCram of the most popular first names from +# the 1990 US Census. Predictably, males are blue, and females +# are pink. It also shows one way you can use a custom WordColorer. +# See firstnamesUsingSubclasses, in examples/OtherExamples, for another. +# +# When you're parsing the names data, you know whether each word +# is a male or female name. To take advantage of this, the sketch +# creates a Word object, and pre-sets its color to blue or pink, +# via the set_color method (which fortunately returns the object). +# +# Names collected from http://www.census.gov/genealogy/names +# Minya Nouvelle font from http://www.1001fonts.com/font_details.html?font_id=59 + +require 'ruby_wordcram' + +def settings + size(800, 600) +end + +def setup + sketch_title 'US Male and Female First Names' + background 255 + names = File.readlines(data_path('names.txt')).map do |line| + name, frequency, sex = line.split + col = ('f' == sex)? color('#f36d91') : color('#476dd5') + Word.new(name, frequency.to_f).set_color(col) + end + WordCram.new(self) + .from_words(names.to_java(Word)) # NB: cast to a java array of Word + .with_font(create_font(data_path('MINYN___.TTF'), 1)) + .sized_by_weight(12, 60) + .draw_all +end diff --git a/external_library/gem/ruby_wordcram/first_names_reset.rb b/external_library/gem/ruby_wordcram/first_names_reset.rb new file mode 100644 index 0000000..370baf6 --- /dev/null +++ b/external_library/gem/ruby_wordcram/first_names_reset.rb @@ -0,0 +1,56 @@ +# firstnames is a WordCram of the most popular first names from +# the 1990 US Census. Predictably, males are blue, and females +# are pink. It also shows one way you can use a custom WordColorer. +# See firstnamesUsingSubclasses, in examples/OtherExamples, for another. +# +# When you're parsing the names data, you know whether each word +# is a male or female name. To take advantage of this, the sketch +# creates a Word object, and pre-sets its color to blue or pink, +# via the set_color method (which fortunately returns the object). +# +# Names collected from http://www.census.gov/genealogy/names +# Minya Nouvelle font from http://www.1001fonts.com/font_details.html?font_id=59 + +require 'ruby_wordcram' + +attr_reader :names, :wc, :reset + +def settings + size(800, 600) +end + +def setup + sketch_title 'US Male and Female First Names' + @names = File.readlines(data_path('names.txt')).map do |line| + name, frequency, sex = line.split + col = 'f' == sex ? color('#f36d91') : color('#476dd5') + Word.new(name, frequency.to_f).set_color(col) + end + @reset = true + make_word_cram +end + +def make_word_cram + # NB: see cast to java array + @wc = WordCram.new(self) + .from_words(names.to_java(Word)) + .with_font(create_font(data_path('MINYN___.TTF'), 1)) + .sized_by_weight(12, 60) +end + +def draw + background 255 if reset + @reset = false + if wc.has_more + wc.draw_next + else + puts 'done' + no_loop + end +end + +def mouse_clicked + make_word_cram + @reset = true + loop +end diff --git a/external_library/gem/ruby_wordcram/get_words_while_running.rb b/external_library/gem/ruby_wordcram/get_words_while_running.rb new file mode 100644 index 0000000..d0580d1 --- /dev/null +++ b/external_library/gem/ruby_wordcram/get_words_while_running.rb @@ -0,0 +1,52 @@ +require 'ruby_wordcram' + +attr_reader :wc + +def settings + size 600, 400 +end + +def setup + sketch_title 'Get Words While Running' + background(20, 20, 30) + @wc = WordCram.new(self) + .from_text_file(data_path('usconst.txt')) + .with_color(color('#ededed')) + .sized_by_weight(8, 70) +end + +def draw + return no_loop unless wc.has_more + wc.draw_next + report +end + +def report + words = wc.get_words + too_many = 0 + too_small = 0 + could_not_place = 0 + placed = 0 + left = 0 + words.each do |word| + if word.was_skipped + case(word.was_skipped_because) + when WordSkipReason::WAS_OVER_MAX_NUMBER_OF_WORDS + too_many += 1 + when WordSkipReason::SHAPE_WAS_TOO_SMALL + too_small += 1 + when WordSkipReason::NO_SPACE + could_not_place += 1 + end + elsif word.was_placed + placed += 1 + else + left += 1 + end + end + puts "TooMany #{too_many}" + puts "TooSmall #{too_small}" + puts "CouldNotPlace #{could_not_place}" + puts "Placed #{placed}" + puts "Left #{left}" +end diff --git a/external_library/gem/ruby_wordcram/hello_world.rb b/external_library/gem/ruby_wordcram/hello_world.rb new file mode 100644 index 0000000..37aebf3 --- /dev/null +++ b/external_library/gem/ruby_wordcram/hello_world.rb @@ -0,0 +1,21 @@ +# This apparently basic sketch demonstrates how we need to be careful in passing +# ruby arrays to java methods (to be safe they should be cast `to_java(klass)`) +# Also thanks to some forethought from the WordCram author we can often chain +# methods [:new, :from_words, :draw_all] like the 'hype' library. +require 'ruby_wordcram' + +def settings + size 700, 400 +end + +def setup + sketch_title 'Hola Mundo!' + background 255 + # Each Word object has its word, and its weight. You can use whatever + # numbers you like for their weights, and they can be in any order. + word_array = [Word.new('Hello', 100), Word.new('WordCram', 60)].to_java(Word) + # Pass in the sketch (the variable 'self'), so WordCram can draw to it. + wordcram = WordCram.new(self) + .from_words(word_array) # Pass in the words to draw. + .draw_all # Now we've created our WordCram, we can draw it +end diff --git a/external_library/gem/ruby_wordcram/render_to_buffer.rb b/external_library/gem/ruby_wordcram/render_to_buffer.rb new file mode 100644 index 0000000..6d8a428 --- /dev/null +++ b/external_library/gem/ruby_wordcram/render_to_buffer.rb @@ -0,0 +1,53 @@ +# US Constitution text from http://www.usconstitution.net/const.txt +require 'ruby_wordcram' +attr_reader :wc, :buffer, :progress + +def settings + size 640, 480 +end + +def setup + sketch_title 'Render To Buffer' + background(255) + @buffer = create_graphics(width, height, JAVA2D) + buffer.begin_draw + buffer.background(255) + # red, black, and blue colors + @wc = WordCram.new(self) + .from_text_file(data_path('usconst.txt')) + .to_canvas(buffer) + .with_colors(color(255, 0, 0), color(0), color(0, 0, 255)) + .sized_by_weight(9, 70) +end + +def draw + background 255 + if wc.has_more + # draw the progress bar + @progress = wc.getProgress + draw_progress_bar(progress) + draw_progress_text(progress) + wc.draw_next + else + buffer.end_draw + image(buffer, 0, 0) + puts 'done' + no_loop + end +end + +def draw_progress_bar(progress) + gray = color(progress * 255) + # Draw the empty box: + no_fill + stroke(gray) + stroke_weight(2) + rect(100, (height / 2) - 30, (width - 200), 60) + # Fill in the portion that's done: + fill(gray) + rect(100, (height/2)-30, (width-200) * progress, 60) +end + +def draw_progress_text(progress) + text(format('%d%', (progress * 100).round), width / 2, (height / 2) + 50) +end diff --git a/external_library/gem/ruby_wordcram/render_to_pdf.rb b/external_library/gem/ruby_wordcram/render_to_pdf.rb new file mode 100644 index 0000000..b79fb82 --- /dev/null +++ b/external_library/gem/ruby_wordcram/render_to_pdf.rb @@ -0,0 +1,29 @@ +# US Constitution text from http://www.usconstitution.net/const.txt +# Liberation Serif font from RedHat: https://www.redhat.com/promo/fonts/ +require 'ruby_wordcram' +load_library :pdf +include_package 'processing.pdf' +# After you run this, +# open the sketch's folder. +# See the PDF. +WEB = %w(#000000 #0000dd #ff0000).freeze + +def settings + size(700, 700, PDF, 'usconst.pdf') +end + +def setup + sketch_title 'Render PDF' + background(255) + colors = WEB.map{ |web| color(web) } # map color strings to color int + @wc = WordCram.new(self) + .from_text_file(data_path('usconst.txt')) + .withColors(*colors) + .with_fonts('LiberationSans') + .sized_by_weight(4, 140) + .min_shape_size(1) + .with_word_padding(1) + .draw_all + puts 'Done! Open usconst.pdf to see the results.' + exit +end diff --git a/external_library/gem/ruby_wordcram/render_to_svg.rb b/external_library/gem/ruby_wordcram/render_to_svg.rb new file mode 100644 index 0000000..63f5d67 --- /dev/null +++ b/external_library/gem/ruby_wordcram/render_to_svg.rb @@ -0,0 +1,33 @@ +# US Constitution text from http://www.usconstitution.net/const.txt +# Liberation Serif font from RedHat: https://www.redhat.com/promo/fonts/ +require 'ruby_wordcram' + +WEB = %w(#0033ff #0055ff #0088ff #00bbff #00ffdd).freeze +LETTERS = ('A'..'Z').to_a + +def settings + size 800, 500 +end + +def setup + sketch_title 'Render SVG' + background(255) + count = 0 + words = LETTERS.reverse.map do |letter| + weight = map1d(count, (0..LETTERS.length), (0..1)) + count += 1 + Word.new(letter, weight) + end + colors = WEB.map{ |web| color(web) } # map color strings to color int + @wc = WordCram.new(self) + .from_words(words.to_java(Word)) + .to_svg(data_path('letters.svg'), width, height) + .with_colors(*colors) + .sized_by_weight(150, 10) + .draw_all + puts 'Done rendering the SVG.' + puts 'loading the svg...' + sh = load_shape(data_path('letters.svg')) + background 255 + shape(sh, 0, 0) +end diff --git a/external_library/gem/ruby_wordcram/us_constitution.rb b/external_library/gem/ruby_wordcram/us_constitution.rb new file mode 100644 index 0000000..65c720a --- /dev/null +++ b/external_library/gem/ruby_wordcram/us_constitution.rb @@ -0,0 +1,41 @@ +# US Constitution text from http://www.usconstitution.net/const.txt +# Liberation Serif font from RedHat: https://www.redhat.com/promo/fonts/ +require 'ruby_wordcram' + +attr_reader :wc, :reset + +def settings + size 800, 600 +end + +def setup + sketch_title 'US Constitution' + color_mode HSB + init_wordcram + @reset = true +end + +def init_wordcram + @wc = WordCram.new(self) + .from_text_file(data_path('usconst.txt')) + .with_font(create_font(data_path('LiberationSerif-Regular.ttf'), 1)) + .with_colors(color(0, 250, 200), color(30), color(170, 230, 200)) + .sized_by_weight(10, 90) +end + +def draw + background 255 if reset + @reset = false + if wc.has_more + wc.draw_next + else + puts 'done' + no_loop + end +end + +def mouse_clicked + init_wordcram + @reset = true + loop +end