Skip to main content

Home/ interesting_sites/ Group items tagged test

Rss Feed Group items tagged

pagetribe .

RE: [Swftools-common] PDF2SWF and getTextSnapShot() - 0 views

  • For everyone else make sure you follow these steps: 1. Use Flash 8 or previous version (I used 6) with the -T command : pdf2swf -T 6 2. Use the -f command for full fonts : pdf2swf -f 3. Test your outputted swf with: swfdump -t filename.swf , you should see a list of DEFINETEXT statements and the corresponding text. Due to a font conflict I was seeing DEFINETEXT followed by jumbled up text on my first pdf. 4. Test your outputted swf with: swfstrings filename.swf, you should see your text and a LOT of ???????s. Again, I had garbage text when trying to convert my original PDF. If the swfdump and swfstrings tests are working, load your pdf2swf.swf into Flash. Publish it for 8. I loaded it into a movieclip on my root timeline called 'loader' : loader.loadMovie("pdf2swf_files/6new.swf"); I have a movieclip called 'searchText_mc' and have the following code for it: searchText_mc.onRelease = function() { hltext ("wonderful"); } And then the hltext is as Fabio provided. This will yellow-highlight all the occurrences of the search string: function hltext ( txt ) { trace("hltext"); var mc = _root.loader; var my_snap:TextSnapshot = mc.getTextSnapshot(); var start_pos:Number = 0; start_pos = my_snap.findText ( start_pos, txt, false ); trace("start_pos : " + start_pos); while ( start_pos > 0 ) { trace ( start_pos ); my_snap.setSelected( start_pos, start_pos + txt.length, true ); start_pos += txt.length; start_pos = my_snap.findText ( start_pos, txt, false ); } } If anyone would like some sample files give me a shout,
pagetribe .

Django | Sending e-mail | Django Documentation - 0 views

  • Testing e-mail sending¶ The are times when you do not want Django to send e-mails at all. For example, while developing a website, you probably don't want to send out thousands of e-mails -- but you may want to validate that e-mails will be sent to the right people under the right conditions, and that those e-mails will contain the correct content.
  •  
    python -m smtpd -n -c DebuggingServer localhost:1025
Justin Pierce

Tested And Trusted Bookkeeping Service - 1 views

When I opened my mini grocery last year, I immediately asked Bookkeepers On Call to do the bookkeeping services for me because I know it from my sister that they provide the most trusted bookkeeper...

started by Justin Pierce on 29 Oct 12 no follow-up yet
pagetribe .

userfly - 0 views

pagetribe .

http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html - 0 views

  • We can count how often a word occurs in a tex
  • Adding two lists creates a new list
  • count the occurrences of a particular word using text1.count('heaven')
  • ...18 more annotations...
  • By convention, m:n means elements m…n-1
  • A consequence of this last change is that the list only has four elements, and accessing a later value generates an error
  • We can join the words of a list to make a single string, or split a string into a list, as follows:
  • 'Monty Python'.split()
  • frequency distribution
  • frequency of each vocabulary item
  • find the 50 most frequent words
  • hese very long words are often hapaxes (i.e. unique) and perhaps it would be better to find frequently occurring long words.
  • Here are all words from the chat corpus that are longer than 7 characters, that occur more than 7 times:   >>> fdist5 = FreqDist(text5) >>> sorted([w for w in set(text5) if len(w) > 7 and fdist5[w] > 7]) ['#14-19teens', '#talkcity_adults', '((((((((((', '........', 'Question', 'actually', 'anything', 'computer', 'cute.-ass', 'everyone', 'football', 'innocent', 'listening', 'remember', 'seriously', 'something', 'together', 'tomorrow', 'watching'] >>>
  • The collocations() function does this for us
  • find bigrams that occur more often than we would expect based on the frequency of individual words.
  • fdist = FreqDist(samples) create a frequency distribution containing the given samples fdist.inc(sample) increment the count for this sample fdist['monstrous'] count of the number of times a given sample occurred fdist.freq('monstrous') frequency of a given sample fdist.N() total number of samples fdist.keys() the samples sorted in order of decreasing frequency for sample in fdist: iterate over the samples, in order of decreasing frequency fdist.max() sample with the greatest count fdist.tabulate() tabulate the frequency distribution fdist.plot() graphical plot of the frequency distribution fdist.plot(cumulative=True) cumulative plot of the frequency distribution fdist1 < fdist2 test if samples in fdist1 occur less frequently than in fdist2
  • it goes through each word in text1, assigning each one in turn to the variable w and performing the specified operation on the variable.
  • The above notation is called a "list comprehension"
  • [f(w) for ...] or [w.f() for ...],
  • Now that we are not double-counting words like This and this
  • by filtering out any non-alphabetic items:   >>> len(set([word.lower() for word in text1 if word.isalpha()]))
  • A collocation is a sequence of words which occur together unusually often. Thus red wine is a collocation, while the wine is not. A characteristic of collocations is that they are resistant to substitution with words that have similar senses — maroon wine sounds definitely odd.
pagetribe .

Bloom's Taxonomy - 0 views

  • Verbs: arrange, define, duplicate, label, list, memorize, name, order, recognize, relate, recall, repeat, reproduce state.
  • Verbs: classify, describe, discuss, explain, express, identify, indicate, locate, recognize, report, restate, review, select, translate.
  • Verbs: apply, choose, demonstrate, dramatize, employ, illustrate, interpret, operate, practice, schedule, sketch, solve, use, write.
  • ...3 more annotations...
  • Verbs: analyze, appraise, calculate, categorize, compare, contrast, criticize, differentiate, discriminate, distinguish, examine, experiment, question, test.
  • Verbs: arrange, assemble, collect, compose, construct, create, design, develop, formulate, manage, organize, plan, prepare, propose, set up, write.
  • Verbs: appraise, argue, assess, attach, choose compare, defend estimate, judge, predict, rate, core, select, support, value, evaluate.
1 - 8 of 8
Showing 20 items per page