Comments
-
Greg Hurrell
FWIW, other examples (not involving Steak, Culerity, Celerity etc) pass the same regardless of whether I do:
rspec spec/mailers
or:
bundle exec rspec spec/mailers
-
Greg Hurrell
Even stranger:
bundle exec rspec spec/acceptance/sessions_spec.rb
passes, but
bundle exec rspec spec/acceptance
is now hanging on the specs in
sessions_spec
until I CTRL-C it, then I get the broken pipe errors seen above, and also this one:1) Logging in to the site: logging in and seeing a flash Failure/Error: visit '/login' You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.first # /Library/Ruby/Gems/1.8/gems/culerity-0.2.10/lib/culerity/remote_object_proxy.rb:51:in `process_result' # /Library/Ruby/Gems/1.8/gems/culerity-0.2.10/lib/culerity/remote_object_proxy.rb:40:in `send_remote' # /Library/Ruby/Gems/1.8/gems/culerity-0.2.10/lib/culerity/remote_object_proxy.rb:25:in `method_missing' # /Library/Ruby/Gems/1.8/gems/culerity-0.2.10/lib/culerity/remote_browser_proxy.rb:8:in `initialize' # /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib/capybara/driver/culerity_driver.rb:17:in `new' # /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib/capybara/driver/culerity_driver.rb:17:in `browser' # /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib/capybara/driver/celerity_driver.rb:99:in `visit' # /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib/capybara/dsl.rb:55:in `visit' # ./spec/acceptance/sessions_spec.rb:9:in `log_in' # ./spec/acceptance/sessions_spec.rb:16 # /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta4/lib/active_support/dependencies.rb:212:in `inject'
-
Greg Hurrell
Hmph.
bundle exec rspec spec/acceptance
Is not longer hanging consistently. I just ran it a few times without hanging. Then, in new terminal window, started hanging again.
-
Greg Hurrell
Ok, updated a few gems and what not. Current status:
rspec spec/acceptance
: always works
And seems we've now got consistent behavior across both methods of using Bundler:
-
rake spec:acceptance
: sometimes works, sometimes hangs indefinitely, always at same point (CTRL-C shows "broken pipe")-
running specific spec files (eg.
bundle exec rspec spec/acceptance/sessions_spec.rb
) exhibits the same behavior (sometimes works, sometimes hangs)
-
running specific spec files (eg.
-
bundle exec rspec spec/acceptance
: sometimes works, sometimes hangs indefinitely as above (when hanging, CTRL-C shows "broken pipe")
-
Greg Hurrell
One difference I note in the output between the non-hanging
rspec ...
invocation:*..*.[2010-06-28 10:34:47] INFO WEBrick 1.3.1 [2010-06-28 10:34:47] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0] [2010-06-28 10:34:47] INFO WEBrick::HTTPServer#start: pid=14031 port=9887 .......
And the sometimes-hanging
bundle exec rspec ...
andrake spec:acceptance
invocations:*..*.[2010-06-28 10:35:11] INFO WEBrick 1.3.1 [2010-06-28 10:35:11] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0] [2010-06-28 10:35:11] INFO WEBrick::HTTPServer#start: pid=14052 port=9887 JRuby limited openssl loaded. http://jruby.org/openssl gem install jruby-openssl for full support.
Obviously, at the system level I have done the
sudo jruby -S gem install jruby-openssl
thing, and perhaps that is why the specs always finish when running outside the context of Bundler.I wonder if adding
jruby-openssl
to the Gemfile with:require => nil
will at least get it into theLOAD_PATH
. -
Greg Hurrell
Adding it to the Gemfile does silence the warning, so evidently it is somehow getting made available via the LOAD_PATH, but we still see the unpredictable hanging.
-
Greg Hurrell
Seeing as I'd fixes some failing specs in Celerity itself by installing Mongrel, I tried the same by adding it to the Gemfile.
This immediately silenced WEBrick's chatty output in the spec output, but alas, the specs don't succeed:
*..*.FFFFFF.
The error we're seeing is:
1) Logging in to the site: logging in and seeing a flash Failure/Error: visit '/login' (eval):1:in `process_result': compile error (eval):1: Invalid char `\033' in expression (eval):1: syntax error, unexpected tIDENTIFIER, expecting ']' Could not find mongrel-1.1.5-java in any of the sources
So I try installing it within the JRuby environment:
sudo jruby -S gem install mongrel
But we still fail the same way.
I thought I'd try running
jruby -S bundle install
but that eventually bails on hitting a native (C) gem:Installing nokogiri (1.4.2) with native extensions /usr/local/jruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:482:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /usr/local/jruby/bin/jruby extconf.rb WARNING: JRuby does not support native extensions or the `mkmf' library. Check http://kenai.com/projects/jruby/pages/Home for alternatives. extconf.rb:10: uninitialized constant Config (NameError) Gem files will remain installed in /Users/wincent/.bundle/gems/nokogiri-1.4.2 for inspection. Results logged to /Users/wincent/.bundle/gems/nokogiri-1.4.2/ext/nokogiri/gem_make.out
-
Greg Hurrell
Comparing the LOAD_PATHs at the time of
spec_helper
evaluation:Initial LOAD_PATH without Bundler
/Users/wincent/trabajo/unversioned/wincent.com/src/spec /Users/wincent/trabajo/unversioned/wincent.com/src/lib /Library/Ruby/Gems/1.8/gems/json_pure-1.4.3/bin /Library/Ruby/Gems/1.8/gems/json_pure-1.4.3/lib /Library/Ruby/Gems/1.8/gems/gemcutter-0.5.0/bin /Library/Ruby/Gems/1.8/gems/gemcutter-0.5.0/lib /Library/Ruby/Gems/1.8/gems/rspec-core-2.0.0.beta.13/bin /Library/Ruby/Gems/1.8/gems/rspec-core-2.0.0.beta.13/lib /Library/Ruby/Gems/1.8/gems/diff-lcs-1.1.2/bin /Library/Ruby/Gems/1.8/gems/diff-lcs-1.1.2/lib /Library/Ruby/Gems/1.8/gems/rspec-expectations-2.0.0.beta.13/bin /Library/Ruby/Gems/1.8/gems/rspec-expectations-2.0.0.beta.13/lib /Library/Ruby/Site/1.8 /Library/Ruby/Site/1.8/powerpc-darwin10.0 /Library/Ruby/Site/1.8/universal-darwin10.0 /Library/Ruby/Site /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8/universal-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 .
Note: this is the LOAD_PATH at the start of the
spec_helper
, just after the Rails environment has been required. See further down for the much longer list which corresponds to the end of thespec_helper
(ie. after "rspec/rails" and so on have been required.Initial LOAD_PATH with Bundler
/Users/wincent/.bundle/gems/wikitext-2.0/lib /Users/wincent/.bundle/gems/wikitext-2.0/ext /Users/wincent/.bundle/bundler/gems/steak-77d6391/lib /Users/wincent/.bundle/gems/rspec-rails-2.0.0.beta.14.1/lib /Library/Ruby/Gems/1.8/gems/webrat-0.7.1/lib /Users/wincent/.bundle/gems/rspec-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-mocks-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-expectations-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-core-2.0.0.beta.14/lib /Library/Ruby/Gems/1.8/gems/rr-0.10.11/lib /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib /Library/Ruby/Gems/1.8/gems/mkdtemp-1.1.1/lib /Library/Ruby/Gems/1.8/gems/mkdtemp-1.1.1/ext /Users/wincent/.bundle/gems/launchy-0.3.5/lib /Users/wincent/.bundle/gems/jruby-openssl-0.7/lib /Users/wincent/.bundle/gems/hpricot-0.8.2/lib /Users/wincent/.bundle/gems/haml-3.0.12/lib /Users/wincent/.bundle/gems/factory_girl_rails-1.0/lib /Library/Ruby/Gems/1.8/gems/rails-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta4/lib /Users/wincent/.bundle/gems/thor-0.13.7/lib /Users/wincent/.bundle/gems/factory_girl-1.3.1/lib /Library/Ruby/Gems/1.8/gems/diff-lcs-1.1.2/lib /Users/wincent/.bundle/gems/database_cleaner-0.5.2/lib /Users/wincent/.bundle/gems/configuration-1.1.0/lib /Users/wincent/.bundle/gems/celerity-0.7.9/lib /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/remote/client/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/jobbie/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/chrome/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/firefox/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/common/src/rb/lib /Library/Ruby/Gems/1.8/gems/json_pure-1.4.3/lib /Library/Ruby/Gems/1.8/gems/ffi-0.6.3/ext /Library/Ruby/Gems/1.8/gems/ffi-0.6.3/lib /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.2/lib /Users/wincent/.bundle/gems/culerity-0.2.10/lib /Users/wincent/.bundle/gems/activeresource-3.0.0.beta4/lib /Users/wincent/.bundle/gems/activerecord-3.0.0.beta4/lib /Users/wincent/.bundle/gems/arel-0.4.0/lib /Users/wincent/.bundle/gems/actionmailer-3.0.0.beta4/lib /Users/wincent/.bundle/gems/mail-2.2.5/lib /Users/wincent/.bundle/gems/treetop-1.4.8/lib /Users/wincent/.bundle/gems/polyglot-0.3.1/lib /Users/wincent/.bundle/gems/mime-types-1.16/lib /Users/wincent/.bundle/gems/actionpack-3.0.0.beta4/lib /Users/wincent/.bundle/gems/tzinfo-0.3.22/lib /Users/wincent/.bundle/gems/rack-test-0.5.4/lib /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib /Users/wincent/.bundle/gems/rack-1.1.0/lib /Users/wincent/.bundle/gems/erubis-2.6.6/lib /Users/wincent/.bundle/gems/activemodel-3.0.0.beta4/lib /Users/wincent/.bundle/gems/i18n-0.4.1/lib /Users/wincent/.bundle/gems/builder-2.1.2/lib /Users/wincent/.bundle/gems/activesupport-3.0.0.beta4/lib /Users/wincent/.bundle/gems/abstract-1.0.0/lib /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib lib spec /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.beta.1/lib /Library/Ruby/Site/1.8 /Library/Ruby/Site/1.8/powerpc-darwin10.0 /Library/Ruby/Site/1.8/universal-darwin10.0 /Library/Ruby/Site /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8/universal-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 .
Final LOAD_PATH without Bundler
/Users/wincent/.bundle/gems/haml-3.0.12/vendor/fssm/lib /Users/wincent/trabajo/unversioned/wincent.com/src/app/controllers /Users/wincent/trabajo/unversioned/wincent.com/src/app/helpers /Users/wincent/trabajo/unversioned/wincent.com/src/app/mailers /Users/wincent/trabajo/unversioned/wincent.com/src/app/models /Users/wincent/trabajo/unversioned/wincent.com/src/app/sweepers /Users/wincent/trabajo/unversioned/wincent.com/src/lib /Users/wincent/trabajo/unversioned/wincent.com/src/vendor /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rails_upgrade/lib /Users/wincent/.bundle/gems/wikitext-2.0/lib /Users/wincent/.bundle/gems/wikitext-2.0/ext /Users/wincent/.bundle/bundler/gems/steak-77d6391/lib /Users/wincent/.bundle/gems/rspec-rails-2.0.0.beta.14.1/lib /Library/Ruby/Gems/1.8/gems/webrat-0.7.1/lib /Users/wincent/.bundle/gems/rspec-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-mocks-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-expectations-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-core-2.0.0.beta.14/lib /Library/Ruby/Gems/1.8/gems/rr-0.10.11/lib /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib /Library/Ruby/Gems/1.8/gems/mkdtemp-1.1.1/lib /Library/Ruby/Gems/1.8/gems/mkdtemp-1.1.1/ext /Users/wincent/.bundle/gems/launchy-0.3.5/lib /Users/wincent/.bundle/gems/jruby-openssl-0.7/lib /Users/wincent/.bundle/gems/hpricot-0.8.2/lib /Users/wincent/.bundle/gems/haml-3.0.12/lib /Users/wincent/.bundle/gems/factory_girl_rails-1.0/lib /Library/Ruby/Gems/1.8/gems/rails-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta4/lib /Users/wincent/.bundle/gems/thor-0.13.7/lib /Users/wincent/.bundle/gems/factory_girl-1.3.1/lib /Library/Ruby/Gems/1.8/gems/diff-lcs-1.1.2/lib /Users/wincent/.bundle/gems/database_cleaner-0.5.2/lib /Users/wincent/.bundle/gems/configuration-1.1.0/lib /Users/wincent/.bundle/gems/celerity-0.7.9/lib /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/remote/client/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/jobbie/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/chrome/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/firefox/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/common/src/rb/lib /Library/Ruby/Gems/1.8/gems/json_pure-1.4.3/lib /Library/Ruby/Gems/1.8/gems/ffi-0.6.3/ext /Library/Ruby/Gems/1.8/gems/ffi-0.6.3/lib /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.2/lib /Library/Ruby/Gems/1.8/gems/culerity-0.2.10/lib /Library/Ruby/Gems/1.8/gems/activeresource-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/activerecord-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/arel-0.4.0/lib /Library/Ruby/Gems/1.8/gems/actionmailer-3.0.0.beta4/lib /Users/wincent/.bundle/gems/mail-2.2.5/lib /Users/wincent/.bundle/gems/treetop-1.4.8/lib /Library/Ruby/Gems/1.8/gems/polyglot-0.3.1/lib /Library/Ruby/Gems/1.8/gems/mime-types-1.16/lib /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta4/lib /Users/wincent/.bundle/gems/tzinfo-0.3.22/lib /Library/Ruby/Gems/1.8/gems/rack-test-0.5.4/lib /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib /Library/Ruby/Gems/1.8/gems/rack-1.1.0/lib /Users/wincent/.bundle/gems/erubis-2.6.6/lib /Library/Ruby/Gems/1.8/gems/activemodel-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/i18n-0.4.1/lib /Library/Ruby/Gems/1.8/gems/builder-2.1.2/lib /Library/Ruby/Gems/1.8/gems/activesupport-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/abstract-1.0.0/lib /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib /Users/wincent/trabajo/unversioned/wincent.com/src/spec /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.beta.1/lib /Library/Ruby/Site/1.8 /Library/Ruby/Site/1.8/powerpc-darwin10.0 /Library/Ruby/Site/1.8/universal-darwin10.0 /Library/Ruby/Site /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8/universal-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 . /Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_controller/vendor/html-scanner /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib/rack/mount/vendor/multimap /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib/rack/mount/vendor/regin
Final LOAD_PATH with Bundler
/Users/wincent/.bundle/gems/haml-3.0.12/vendor/fssm/lib /Users/wincent/trabajo/unversioned/wincent.com/src/app/controllers /Users/wincent/trabajo/unversioned/wincent.com/src/app/helpers /Users/wincent/trabajo/unversioned/wincent.com/src/app/mailers /Users/wincent/trabajo/unversioned/wincent.com/src/app/models /Users/wincent/trabajo/unversioned/wincent.com/src/app/sweepers /Users/wincent/trabajo/unversioned/wincent.com/src/lib /Users/wincent/trabajo/unversioned/wincent.com/src/vendor /Users/wincent/trabajo/unversioned/wincent.com/src/vendor/plugins/rails_upgrade/lib /Users/wincent/trabajo/unversioned/wincent.com/src/spec /Users/wincent/.bundle/gems/wikitext-2.0/lib /Users/wincent/.bundle/gems/wikitext-2.0/ext /Users/wincent/.bundle/bundler/gems/steak-77d6391/lib /Users/wincent/.bundle/gems/rspec-rails-2.0.0.beta.14.1/lib /Library/Ruby/Gems/1.8/gems/webrat-0.7.1/lib /Users/wincent/.bundle/gems/rspec-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-mocks-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-expectations-2.0.0.beta.14/lib /Users/wincent/.bundle/gems/rspec-core-2.0.0.beta.14/lib /Library/Ruby/Gems/1.8/gems/rr-0.10.11/lib /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib /Library/Ruby/Gems/1.8/gems/mkdtemp-1.1.1/lib /Library/Ruby/Gems/1.8/gems/mkdtemp-1.1.1/ext /Users/wincent/.bundle/gems/launchy-0.3.5/lib /Users/wincent/.bundle/gems/jruby-openssl-0.7/lib /Users/wincent/.bundle/gems/hpricot-0.8.2/lib /Users/wincent/.bundle/gems/haml-3.0.12/lib /Users/wincent/.bundle/gems/factory_girl_rails-1.0/lib /Library/Ruby/Gems/1.8/gems/rails-3.0.0.beta4/lib /Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta4/lib /Users/wincent/.bundle/gems/thor-0.13.7/lib /Users/wincent/.bundle/gems/factory_girl-1.3.1/lib /Library/Ruby/Gems/1.8/gems/diff-lcs-1.1.2/lib /Users/wincent/.bundle/gems/database_cleaner-0.5.2/lib /Users/wincent/.bundle/gems/configuration-1.1.0/lib /Users/wincent/.bundle/gems/celerity-0.7.9/lib /Library/Ruby/Gems/1.8/gems/capybara-0.3.8/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/remote/client/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/jobbie/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/chrome/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/firefox/src/rb/lib /Library/Ruby/Gems/1.8/gems/selenium-webdriver-0.0.24/common/src/rb/lib /Library/Ruby/Gems/1.8/gems/json_pure-1.4.3/lib /Library/Ruby/Gems/1.8/gems/ffi-0.6.3/ext /Library/Ruby/Gems/1.8/gems/ffi-0.6.3/lib /Library/Ruby/Gems/1.8/gems/nokogiri-1.4.2/lib /Users/wincent/.bundle/gems/culerity-0.2.10/lib /Users/wincent/.bundle/gems/activeresource-3.0.0.beta4/lib /Users/wincent/.bundle/gems/activerecord-3.0.0.beta4/lib /Users/wincent/.bundle/gems/arel-0.4.0/lib /Users/wincent/.bundle/gems/actionmailer-3.0.0.beta4/lib /Users/wincent/.bundle/gems/mail-2.2.5/lib /Users/wincent/.bundle/gems/treetop-1.4.8/lib /Users/wincent/.bundle/gems/polyglot-0.3.1/lib /Users/wincent/.bundle/gems/mime-types-1.16/lib /Users/wincent/.bundle/gems/actionpack-3.0.0.beta4/lib /Users/wincent/.bundle/gems/tzinfo-0.3.22/lib /Users/wincent/.bundle/gems/rack-test-0.5.4/lib /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib /Users/wincent/.bundle/gems/rack-1.1.0/lib /Users/wincent/.bundle/gems/erubis-2.6.6/lib /Users/wincent/.bundle/gems/activemodel-3.0.0.beta4/lib /Users/wincent/.bundle/gems/i18n-0.4.1/lib /Users/wincent/.bundle/gems/builder-2.1.2/lib /Users/wincent/.bundle/gems/activesupport-3.0.0.beta4/lib /Users/wincent/.bundle/gems/abstract-1.0.0/lib /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib lib spec /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.beta.1/lib /Library/Ruby/Site/1.8 /Library/Ruby/Site/1.8/powerpc-darwin10.0 /Library/Ruby/Site/1.8/universal-darwin10.0 /Library/Ruby/Site /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8/universal-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin10.0 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 . /Users/wincent/.bundle/gems/actionpack-3.0.0.beta4/lib/action_controller/vendor/html-scanner /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib/rack/mount/vendor/multimap /Users/wincent/.bundle/gems/rack-mount-0.6.6/lib/rack/mount/vendor/regin
-
Greg Hurrell
As far as I can see, the only differences between the two are:
-
the Bundler one adds
spec
(relative path) to the LOAD_PATH (both also add the absolute path to the directory, although at different points) -
the Bundler one adds paths inside
~/.bundle
, but the version numbers are all identical
-
the Bundler one adds
-
Greg Hurrell
Given the scant difference between what's actually in the load path, I wonder if the difference lies in what is in the load path at the time that some of the earlier parts of the
spec_helper
file are evaluated.I also wonder about the Mongrel thing. It works without Bundler, but with Bundler it's not found. I've tried various tricks trying to get it to be visible from the Bundle environment, but really at a loss to know how/why things are different. One thing I do see in the Culerity source is that JRuby becomes involved only here, in the file
bin/run_celerity_server.rb
:#!/usr/bin/env jruby require File.dirname(__FILE__) << '/../lib/culerity/celerity_server' Culerity::CelerityServer.new(STDIN, STDOUT)
So I guess at that point, we're running under JRuby, and in the "no Bundler" version Mongrel is available because the first thing that
lib/culerity/celerity_server
does isrequire 'rubygems'
, and the environment at that point somehow has an appropriate load path. -
Greg Hurrell
Just checked out what the load path is inside
celerity_server
and see the same differences as listed above. In both cases we have something this:/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ext /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib
Even if I change the Gemfile to:
gem 'mongrel', :require => nil, :path => '/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/mongrel-1.1.5-java'
I still see the paths to the native C Mongrel in the load path.
gem 'mongrel-java'
obviously won't work, as no such gem exists.More tweaking, and now
rake spec:acceptance
is mysteriously working again...Looks like the
gem 'jruby-openssl'
line might have had something to do with it... add it in and things start hanging again... remove it and still broken... Maybe it was just a coincidence.Here is the output of
bundle show
when it was working:Gems included by the bundle: * abstract (1.0.0) * actionmailer (3.0.0.beta4) * actionpack (3.0.0.beta4) * activemodel (3.0.0.beta4) * activerecord (3.0.0.beta4) * activeresource (3.0.0.beta4) * activesupport (3.0.0.beta4) * arel (0.4.0) * builder (2.1.2) * bundler (1.0.0.beta.1) * capybara (0.3.8) * celerity (0.7.9) * cgi_multipart_eof_fix (2.5.0) * configuration (1.1.0) * culerity (0.2.10) * daemons (1.1.0) * database_cleaner (0.5.2) * diff-lcs (1.1.2) * erubis (2.6.6) * factory_girl (1.3.1) * factory_girl_rails (1.0) * fastthread (1.0.7) * ffi (0.6.3) * gem_plugin (0.2.3) * haml (3.0.12) * hpricot (0.8.2) * i18n (0.4.1) * json_pure (1.4.3) * launchy (0.3.5) * mail (2.2.5) * mime-types (1.16) * mkdtemp (1.1.1) * mongrel (1.1.5) * mysql (2.8.1) * nokogiri (1.4.2) * polyglot (0.3.1) * rack (1.1.0) * rack-mount (0.6.6) * rack-test (0.5.4) * rails (3.0.0.beta4) * railties (3.0.0.beta4) * rake (0.8.7) * rr (0.10.11) * rspec (2.0.0.beta.14) * rspec-core (2.0.0.beta.14) * rspec-expectations (2.0.0.beta.14) * rspec-mocks (2.0.0.beta.14) * rspec-rails (2.0.0.beta.14.1) * selenium-webdriver (0.0.24) * steak (0.4.0.beta.1 77d6391) * thor (0.13.7) * treetop (1.4.8) * tzinfo (0.3.22) * webrat (0.7.1) * wikitext (2.0)
Output of
bundle show mongrel
when working:/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5
And here is output of
bundle install
, which broke things:Updating git://github.com/cavalle/steak.git Using rake (0.8.7) Using abstract (1.0.0) Using activesupport (3.0.0.beta4) Using builder (2.1.2) Using i18n (0.4.1) Using activemodel (3.0.0.beta4) Using erubis (2.6.6) Using rack (1.1.0) Using rack-mount (0.6.6) Using rack-test (0.5.4) Using tzinfo (0.3.22) Using actionpack (3.0.0.beta4) Using mime-types (1.16) Using polyglot (0.3.1) Using treetop (1.4.8) Using mail (2.2.5) Using actionmailer (3.0.0.beta4) Using arel (0.4.0) Using activerecord (3.0.0.beta4) Using activeresource (3.0.0.beta4) Using bundler (1.0.0.beta.1) Using culerity (0.2.10) Using nokogiri (1.4.2) Using ffi (0.6.3) Using json_pure (1.4.3) Using selenium-webdriver (0.0.24) Using capybara (0.3.8) Using celerity (0.7.9) Using cgi_multipart_eof_fix (2.5.0) Using configuration (1.1.0) Using daemons (1.1.0) Using database_cleaner (0.5.2) Using diff-lcs (1.1.2) Using factory_girl (1.3.1) Using thor (0.13.7) Using railties (3.0.0.beta4) Using rails (3.0.0.beta4) Using factory_girl_rails (1.0) Using fastthread (1.0.7) Using gem_plugin (0.2.3) Using haml (3.0.12) Using hpricot (0.8.2) Using launchy (0.3.5) Using mkdtemp (1.1.1) Using mongrel (1.1.5) Using mysql (2.8.1) Using rr (0.10.11) Using rspec-core (2.0.0.beta.14) Using rspec-expectations (2.0.0.beta.14) Using rspec-mocks (2.0.0.beta.14) Using rspec (2.0.0.beta.14) Using webrat (0.7.1) Using rspec-rails (2.0.0.beta.14.1) Using steak (0.4.0.beta.1) from git://github.com/cavalle/steak.git (at master) Using wikitext (2.0) Updating .gem files in vendor/cache Removing outdated .gem files from vendor/cache * jruby-openssl-0.7.gem Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
And now output of
bundle show
:Gems included by the bundle: * abstract (1.0.0) * actionmailer (3.0.0.beta4) * actionpack (3.0.0.beta4) * activemodel (3.0.0.beta4) * activerecord (3.0.0.beta4) * activeresource (3.0.0.beta4) * activesupport (3.0.0.beta4) * arel (0.4.0) * builder (2.1.2) * bundler (1.0.0.beta.1) * capybara (0.3.8) * celerity (0.7.9) * cgi_multipart_eof_fix (2.5.0) * configuration (1.1.0) * culerity (0.2.10) * daemons (1.1.0) * database_cleaner (0.5.2) * diff-lcs (1.1.2) * erubis (2.6.6) * factory_girl (1.3.1) * factory_girl_rails (1.0) * fastthread (1.0.7) * ffi (0.6.3) * gem_plugin (0.2.3) * haml (3.0.12) * hpricot (0.8.2) * i18n (0.4.1) * json_pure (1.4.3) * launchy (0.3.5) * mail (2.2.5) * mime-types (1.16) * mkdtemp (1.1.1) * mongrel (1.1.5) * mysql (2.8.1) * nokogiri (1.4.2) * polyglot (0.3.1) * rack (1.1.0) * rack-mount (0.6.6) * rack-test (0.5.4) * rails (3.0.0.beta4) * railties (3.0.0.beta4) * rake (0.8.7) * rr (0.10.11) * rspec (2.0.0.beta.14) * rspec-core (2.0.0.beta.14) * rspec-expectations (2.0.0.beta.14) * rspec-mocks (2.0.0.beta.14) * rspec-rails (2.0.0.beta.14.1) * selenium-webdriver (0.0.24) * steak (0.4.0.beta.1 77d6391) * thor (0.13.7) * treetop (1.4.8) * tzinfo (0.3.22) * webrat (0.7.1) * wikitext (2.0)
-
Greg Hurrell
Something I hadn't noticed before among all the hanging specs, broken pipes, and failures, is this:
1) Logging in to the site: logging in and seeing a flash Failure/Error: visit '/login' (eval):1:in `process_result': compile error (eval):1: Invalid char `\033' in expression (eval):1: syntax error, unexpected tIDENTIFIER, expecting ']' Could not find gem 'weakling (>= 0....
Note that last line, Could not find gem 'weakling ....
So, under
rspec ...
, it must be finding it from somewhere, or an alternative. It is not installed anywhere on my system.No mention of weakling in either the Culerity or Celerity repos.
Adding seems to fix the hanging. More digging, looks to be a dependency of Nokogiri (Java flavor).
-
Greg Hurrell
Sigh, but it's still all over the place. Hangs once, succeeds once.
-
Greg Hurrell
Ok, think I'm getting to the bottom of it at last.
Both
bundle exec ...
andrake ...
end up exportingRUBYOPT
; specifically:-I/Library/Ruby/Gems/1.8/gems/bundler-1.0.0.beta.1/lib -rbundler/setup
What does
bundler/setup
do? Basically, consult theGemfile
and doBundler.setup
.We can throw the baby out with the bathwater by ensuring that
RUBYOPT
is unset before we actually run our Culerity-using specs, and they work every time. But this is evidently a horrible kludge. We should be able to make it so that the specs work even withRUBYOPT
set that way.As a test, I tried to run this simple command line:
$ jruby -I/Library/Ruby/Gems/1.8/gems/bundler-1.0.0.beta.1/lib -rbundler/setup -e "puts 1 + 1" Could not find rake-0.8.7 in any of the sources
It is evidently looking for one of the dependencies of Rails. Perhaps, then, this is what is happening when our specs fail (or perhaps not; it is still unclear why they only fail intermittently).
If we skip the evaluation of
bundler/setup
we succeed:$ jruby -I/Library/Ruby/Gems/1.8/gems/bundler-1.0.0.beta.1/lib -e "puts 1 + 1" 2
But this test isn't really fair because in reality there are other things in the load path when we actually try to run the specs.
So let's do a somewhat lengthier test.  \ -I/Library/Ruby/Gems/1.8/gems/actionpack-3.0.0.beta4/lib/action_controller/vendor/html-scanner \ -I/Users/wincent/.bundle/gems/rack-mount-0.6.6/lib/rack/mount/vendor/multimap \ -I/Users/wincent/.bundle/gems/rack-mount-0.6.6/lib/rack/mount/vendor/regin \ -rbundler/setup -e "puts 1 + 1" Could not find rake-0.8.7 in any of the sources
Evidently merely being in the load path is not enough (because rake is in the load path).
-
Greg Hurrell
The one thing I am still not sure of is where
RUBYOPT
is getting set in the case of runningrake spec:acceptance
(it's obvious in the case ofbundle exec
).It's not set in any of the
lib/tasks/*.rake
files. It's not set by the bottom of theRakefile
. It's not set inconfig/application.rb
. It is set by the time we hit the top ofspec_helper.rb
.Ok, looks like I found it:
rspec-core/lib/rspec/core/rake_task.rb
Need to analyse that file a bit to find out what it's doing, but if I turn on verbose output I can see it's doing:
bundle exec /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby \ -Ilib \ -Ispec \ "spec/acceptance/issues/search_spec.rb" \ "spec/acceptance/products/index_spec.rb" \ "spec/acceptance/regressions/76968b7_spec.rb" \ "spec/acceptance/sessions_spec.rb"
-
Greg Hurrell
Have a workaround now. Filed a ticket upstream explaining my findings and trying to see if this is going to be the right/best solution going forward:
-
Greg Hurrell
Fully resolved now. Marking as closed.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.


| HOME | DOWNLOAD | DOCUMENTATION | FORUM | FAQ |
> Home > Documentation > Spherical Harmonic Rotations
SHROTATEREALCOEF(1) SHTOOLS 2.6 SHROTATEREALCOEF(1)
SHRotateRealCoef
SHRotateRealCoef - Determine the spherical harmonic coefficients of a real function rotated by three Euler angles.
SYNOPSIS
SUBROUTINE SHRotateRealCoef ( CILMROT, CILM, LMAX, X, DJ ) REAL*8 CILMROT(2, LMAX+1, LMAX+1), CILM(2, LMAX+1, LMAX+1), X(3 ), DJ(LMAX+1, LMAX+1, LMAX+1) INTEGER LMAX
DESCRIPTION
SHRotateRealCoef will take the real spherical harmonic coefficients of a function, rotate it according to the three Euler anlges in X, and output the spherical harmonic coefficients of the rotated function. The input and output coefficients must correspond to geodesy 4-pi normalized spherical harmonics that do not possess the Condon-Shortley phase convention. The input rotation matrix DJ is computed by a call to DJPi2. The rotation of a coordinate system or body can be viewed in two complementary ways involving three successive rotations. Both methods have the same initial and final configurations, and the angles listed in both schemes are the same. Scheme A: (I) Rotation about the z axis by alpha. (II) Rotation about the new y axis by beta. (III) Rotation about the new z axis by gamma. Scheme B: (I) Rotation about the z axis by gamma. (II) Rotation about the initial y axis by beta. (III) Rotation about the initial z axis by alpha. The rotations can further be viewed either as a rotation of the coordinate system or the physical body. For a rotation of the coordinate system without rotation of the physical body, use X(alpha, beta, gamma). For a rotation of the physical body without rotation of the coordinate system, use X(-gamma, -beta, -alpha). To perform the inverse transform of X(alpha, beta, gamma), use X(-gamma, -beta, -alpha). Note that this routine uses the "y convention", where the second rotation is with respect to the new y axis. If alpha, beta, and gamma were orginally defined in terms of the "x convention", where the second rotation was with respect to the newx axis, the Euler angles according to the y convention would be alpha_y = alpha_x - pi/2, beta_x = beta_y, and gamma_y = gamma_x + pi/2.
ARGUMENTS
CILMROT (output) REAL*8, DIMENSION (2, LMAX+1, LMAX+1) The spherical harmonic coefficients of the rotated function, normalized for use with the geodesy 4-pi spherical harmonics. CILM (input) REAL*8, DIMENSION (2, LMAX+1, LMAX+1) The input real spherical harmonic coefficients. The coefficients must correspond to geodesy 4-pi normalized spherical harmonics that do not possess the Condon- Shortley phase convention. X (input) REAL*8, DIMENSION(3 ) The three Euler angles, alpha, beta, and gamma. DJ (input) REAL*8, DIMENSION (LMAX+1, LMAX+1, LMAX+1) The rotation matrix DJ(pi/2), obtained from a call to DJPi2. LMAX (input) INTEGER, OPTIONAL The maximum spherical harmonic degree of the input and output coefficients.
NOTES
This routine first converts the real coefficients to complex form using SHrtoc. If the compilation-time parameter CSPHASE_DEFAULT is set to 1 (default), then the Condon-Shortley phase of the coefficients is modified. Then the coefficients are converted to indexed form using SHCilmToCindex, these are sent to SHRotateCoef, the result if converted back to CILM complex form using SHCindexToCilm, and these are finally converted back to real form using SHctor.
SEE ALSO
djpi2(1), shrotatecoef(1), shctor(1), shrtoc(1), shcilmtocindex(1), shcindextocilm(1) <http://www.ipgp.jussieu.fr/~wieczor/SHTOOLS/SHTOOLS.html>
COPYRIGHT AND LICENSE
Copyright 2005, 2006 by Mark Wieczorek<EMAIL_ADDRESS>This is free software; you can distribute and modify it under the terms of the revised BSD license. SHTOOLS 2.6 2009-08-18 SHROTATEREALCOEF(1)
> Home > Documentation > Spherical Harmonic Rotations
| Centre National de la Recherche Scientifique | Institut de Physique du Globe de Paris | © 2011 Mark Wieczorek |


Urfin Jus and his wooden soldiers
The treacherous and evil Urfin Joes decided to become the ruler of the Magic Country, to capture the Emerald City with the help of his blockhead soldiers and rename it to Urfinhrad. He is already preparing to celebrate the victory, but the most ordinary girl Ellie intervenes in the matter, and she finds herself in the Magic Country at the most appropriate time. She really needs to go back home, but first she needs to help her friends Strashila, the Woodcutter and Lev defeat Urfin and his army.


Back to all photos
Places
Click on one of the images to see a full-sized version. Use arrows or swipe to view the others.


Asac
home
about
contact
Author name
Artical title
subject
Coding
3D
printing
Cyber
security
Ai
Content:
day
month
year


Delete
Delete Document(s)
Delete Collection
Submit
Update User Balance
Eenergy Balance
Currency Balance
Submit


BTDiscovery Class Reference
| Inherits from | NSObject |
| Declared in | BTDiscovery.h |
Tasks
-
+ sharedInstance
-
discoveryDelegate
property -
v1ComDelegate
property -
– startScanningForUUIDString:
-
– stopScanning
-
– connectPeripheral:
-
– disconnectPeripheral:
-
– removeConnectedServices
-
foundPeripherals
property -
rememberedPeripherals
property -
connectedServices
property -
– getConnectedService
-
– getConnectedV1Device
-
– setNotFoundDelegate:
Instance Methods
connectPeripheral:
This method will make an attempt to connect to the provided peripheral.
- (void)connectPeripheral:(CBPeripheral *)peripheral
Discussion
This method will make an attempt to connect to the provided peripheral.
Declared In
BTDiscovery.h
disconnectPeripheral:
This method will make an attempt to disconnect to the provided peripheral.
- (void)disconnectPeripheral:(CBPeripheral *)peripheral
Discussion
This method will make an attempt to disconnect to the provided peripheral.
Declared In
BTDiscovery.h
getConnectedService
This method will return a connected service.
- (ValentineCommunicationService *)getConnectedService
Return Value
An instance of ValentineCommunicationService if connected. Nil if not connected.
Discussion
This method will return a connected service.
Declared In
BTDiscovery.h
getConnectedV1Device
This method will return a list of connected services.
- (CBPeripheral *)getConnectedV1Device
Return Value
An instance of CBPeriperal if connected. Nil if not connected.
Discussion
This method will return a list of connected services.
Declared In
BTDiscovery.h
setNotFoundDelegate:
This method will assign the delegate for a not found delegate call.
- (void)setNotFoundDelegate:(id<BTDeviceNotFoundProtocol>)delegate
Discussion
This method will assign the delegate for a not found delegate call.
Declared In
BTDiscovery.h
startScanningForUUIDString:
This method will start scanning for a bluetooth device whose UUID matches the provided string.
- (void)startScanningForUUIDString:(NSString *)uuidString
Discussion
This method will start scanning for a bluetooth device whose UUID matches the provided string.
Declared In
BTDiscovery.h


Here I've listed some usefull books I have in my book collection. They are arranged by subject matter.


# (c) 2012-2014, Toshio Kuratomi<EMAIL_ADDRESS>#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.compat.six import string_types, text_type, binary_type, PY3
# to_bytes and to_unicode were written by Toshio Kuratomi for the
# python-kitchen library https://pypi.python.org/pypi/kitchen
# They are licensed in kitchen under the terms of the GPLv2+
# They were copied and modified for use in ansible by Toshio in Jan 2015
# (simply removing the deprecated features)
#: Aliases for the utf-8 codec
_UTF8_ALIASES = frozenset(('utf-8', 'UTF-8', 'utf8', 'UTF8', 'utf_8', 'UTF_8', 'utf', 'UTF', 'u8', 'U8'))
#: Aliases for the latin-1 codec
_LATIN1_ALIASES = frozenset(('latin-1', 'LATIN-1', 'latin1', 'LATIN1',
'latin', 'LATIN', 'l1', 'L1', 'cp819', 'CP819', '8859', 'iso8859-1',
'ISO8859-1', 'iso-8859-1', 'ISO-8859-1'))
# EXCEPTION_CONVERTERS is defined below due to using to_unicode
if PY3:
basestring = (str, bytes)
[docs]def to_unicode(obj, encoding='utf-8', errors='replace', nonstring=None):
'''Convert an object (:obj:) into a :unicode: string.
:arg obj: Object to convert to a :class:`unicode` string. This should
normally be a byte :class:`str`
:kwarg encoding: What encoding to try converting the byte :class:`str` as.
Defaults to :term:`utf-8`
:kwarg errors: If errors are found while decoding, perform this action.
Defaults to ``replace`` which replaces the invalid bytes with
a character that means the bytes were unable to be decoded. Other
values are the same as the error handling schemes in the `codec base
classes
<http://docs.python.org/library/codecs.html#codec-base-classes>`_.
For instance ``strict`` which raises an exception and ``ignore`` which
simply omits the non-decodable characters.
:kwarg nonstring: How to treat nonstring values. Possible values are:
:simplerepr: Attempt to call the object's "simple representation"
method and return that value. Python-2.3+ has two methods that
try to return a simple representation: :meth:`object.__unicode__`
and :meth:`object.__str__`. We first try to get a usable value
from :meth:`object.__unicode__`. If that fails we try the same
with :meth:`object.__str__`.
:empty: Return an empty :class:`unicode` string
:strict: Raise a :exc:`TypeError`
:passthru: Return the object unchanged
:repr: Attempt to return a :class:`unicode` string of the repr of the
object
Default is ``simplerepr``
:raises TypeError: if :attr:`nonstring` is ``strict`` and
a non-:class:`basestring` object is passed in or if :attr:`nonstring`
is set to an unknown value
:raises UnicodeDecodeError: if :attr:`errors` is ``strict`` and
:attr:`obj` is not decodable using the given encoding
:returns: :class:`unicode` string or the original object depending on the
value of :attr:`nonstring`.
Usually this should be used on a byte :class:`str` but it can take both
byte :class:`str` and :class:`unicode` strings intelligently. Nonstring
objects are handled in different ways depending on the setting of the
:attr:`nonstring` parameter.
The default values of this function are set so as to always return
a :class:`unicode` string and never raise an error when converting from
a byte :class:`str` to a :class:`unicode` string. However, when you do
not pass validly encoded text (or a nonstring object), you may end up with
output that you don't expect. Be sure you understand the requirements of
your data, not just ignore errors by passing it through this function.
'''
# Could use isbasestring/isunicode here but we want this code to be as
# fast as possible
if isinstance(obj, basestring):
if isinstance(obj, text_type):
return obj
if encoding in _UTF8_ALIASES:
return text_type(obj, 'utf-8', errors)
if encoding in _LATIN1_ALIASES:
return text_type(obj, 'latin-1', errors)
return obj.decode(encoding, errors)
if not nonstring:
nonstring = 'simplerepr'
if nonstring == 'empty':
return u''
elif nonstring == 'passthru':
return obj
elif nonstring == 'simplerepr':
try:
simple = obj.__unicode__()
except (AttributeError, UnicodeError):
simple = None
if not simple:
try:
simple = text_type(obj)
except UnicodeError:
try:
simple = obj.__str__()
except (UnicodeError, AttributeError):
simple = u''
if isinstance(simple, binary_type):
return text_type(simple, encoding, errors)
return simple
elif nonstring in ('repr', 'strict'):
obj_repr = repr(obj)
if isinstance(obj_repr, binary_type):
obj_repr = text_type(obj_repr, encoding, errors)
if nonstring == 'repr':
return obj_repr
raise TypeError('to_unicode was given "%(obj)s" which is neither'
' a byte string (str) or a unicode string' %
{'obj': obj_repr.encode(encoding, 'replace')})
raise TypeError('nonstring value, %(param)s, is not set to a valid'
' action' % {'param': nonstring})
[docs]def to_bytes(obj, encoding='utf-8', errors='replace', nonstring=None):
'''Convert an object into a byte :class:`str`
:arg obj: Object to convert to a byte :class:`str`. This should normally
be a :class:`unicode` string.
:kwarg encoding: Encoding to use to convert the :class:`unicode` string
into a byte :class:`str`. Defaults to :term:`utf-8`.
:kwarg errors: If errors are found while encoding, perform this action.
Defaults to ``replace`` which replaces the invalid bytes with
a character that means the bytes were unable to be encoded. Other
values are the same as the error handling schemes in the `codec base
classes
<http://docs.python.org/library/codecs.html#codec-base-classes>`_.
For instance ``strict`` which raises an exception and ``ignore`` which
simply omits the non-encodable characters.
:kwarg nonstring: How to treat nonstring values. Possible values are:
:simplerepr: Attempt to call the object's "simple representation"
method and return that value. Python-2.3+ has two methods that
try to return a simple representation: :meth:`object.__unicode__`
and :meth:`object.__str__`. We first try to get a usable value
from :meth:`object.__str__`. If that fails we try the same
with :meth:`object.__unicode__`.
:empty: Return an empty byte :class:`str`
:strict: Raise a :exc:`TypeError`
:passthru: Return the object unchanged
:repr: Attempt to return a byte :class:`str` of the :func:`repr` of the
object
Default is ``simplerepr``.
:raises TypeError: if :attr:`nonstring` is ``strict`` and
a non-:class:`basestring` object is passed in or if :attr:`nonstring`
is set to an unknown value.
:raises UnicodeEncodeError: if :attr:`errors` is ``strict`` and all of the
bytes of :attr:`obj` are unable to be encoded using :attr:`encoding`.
:returns: byte :class:`str` or the original object depending on the value
of :attr:`nonstring`.
.. warning::
If you pass a byte :class:`str` into this function the byte
:class:`str` is returned unmodified. It is **not** re-encoded with
the specified :attr:`encoding`. The easiest way to achieve that is::
to_bytes(to_unicode(text), encoding='utf-8')
The initial :func:`to_unicode` call will ensure text is
a :class:`unicode` string. Then, :func:`to_bytes` will turn that into
a byte :class:`str` with the specified encoding.
Usually, this should be used on a :class:`unicode` string but it can take
either a byte :class:`str` or a :class:`unicode` string intelligently.
Nonstring objects are handled in different ways depending on the setting
of the :attr:`nonstring` parameter.
The default values of this function are set so as to always return a byte
:class:`str` and never raise an error when converting from unicode to
bytes. However, when you do not pass an encoding that can validly encode
the object (or a non-string object), you may end up with output that you
don't expect. Be sure you understand the requirements of your data, not
just ignore errors by passing it through this function.
'''
# Could use isbasestring, isbytestring here but we want this to be as fast
# as possible
if isinstance(obj, basestring):
if isinstance(obj, binary_type):
return obj
return obj.encode(encoding, errors)
if not nonstring:
nonstring = 'simplerepr'
if nonstring == 'empty':
return b''
elif nonstring == 'passthru':
return obj
elif nonstring == 'simplerepr':
try:
simple = str(obj)
except UnicodeError:
try:
simple = obj.__str__()
except (AttributeError, UnicodeError):
simple = None
if not simple:
try:
simple = obj.__unicode__()
except (AttributeError, UnicodeError):
simple = b''
if isinstance(simple, text_type):
simple = simple.encode(encoding, 'replace')
return simple
elif nonstring in ('repr', 'strict'):
try:
obj_repr = obj.__repr__()
except (AttributeError, UnicodeError):
obj_repr = b''
if isinstance(obj_repr, text_type):
obj_repr = obj_repr.encode(encoding, errors)
else:
obj_repr = binary_type(obj_repr)
if nonstring == 'repr':
return obj_repr
raise TypeError('to_bytes was given "%(obj)s" which is neither'
' a unicode string or a byte string (str)' % {'obj': obj_repr})
raise TypeError('nonstring value, %(param)s, is not set to a valid'
' action' % {'param': nonstring})
# force the return value of a function to be unicode. Use with partial to
# ensure that a filter will return unicode values.
[docs]def unicode_wrap(func, *args, **kwargs):
return to_unicode(func(*args, **kwargs), nonstring='passthru')
# Alias for converting to native strings.
# Native strings are the default string type for the particular version of
# python. The objects are called "str" in both py2 and py3 but they mean
# different things. In py2, it's a byte string like in C. In py3 it's an
# abstract text type (like py2's unicode type).
#
# Use this when raising exceptions and wanting to get the string
# representation of an object for the exception message. For example:
#
# try:
# do_something()
# except Exception as e:
# raise AnsibleError(to_str(e))
#
# Note that this is because python's exception handling expects native strings
# and doe the wrong thing if given the other sort of string (in py2, if given
# unicode strings, it could traceback or omit the message. in py3, if given
# byte strings it prints their repr (so the message ends up as b'message').
#
# If you use ansible's API instead of re-raising an exception, use to_unicode
# instead:
#
# try:
# do_something()
# except Exception as e:
# display.warn(to_unicode(e))
if PY3:
to_str = to_unicode
else:
to_str = to_bytes


Instantiating huer is simple, you cannot however instantiate more than one intance at the time, and if you do the current instance will be replaced by a new instance.
var instance = huer('Your html');
You can choose to instansiate huer by passing HTML or an object as the first (and only) argument.
var instance = huer({
html: 'Your html',
showOnInit: false,
clickOutsideToDismiss: true
});
instance.show();
Combiding huer with a template engine of sorts is recommended, but of course a simple inline string will do the job.
Creating a simpel wrapper around the script making your own confirmation box is easy. Use vanilla JS, jQuery or whatever you want.
Using your own html gives you the power to use as many buttons as you want. There's one thing you can think about when constructing your html and that's tabindex on buttons. Not using the tabindex will make the tab-button on your keyboard useless.
You can also use huer as a form.
Modal view? No problem! Create your own modal html to get your looks and feel.
var instance = huer({
html: 'Your html',
modal: true
});
| Method | Description |
|---|---|
| void show(function) | Shows the view unless already shown. The callback function is optional. |
| void hide(function) | Hides the view unless already hidden. The callback function is optional. |
| void destroy(function) | Destroys the view and sets the instance to null. The callback is optional. |
| Element getHtml() | Returns the content node of the view. |
| void click(str/el/arr) | Add click events on any element in within the container. It also works on touch. |
| Array query(string) | Query elements within the container. |
| void attr(str/el/arr, attribute, value) | Set attributes to elements within the container. |
All default options can be changed via huer.globals
huer.globals.forceCenter = true;
| Property | Description |
|---|---|
| html string/element
(default: 'Your view is empty') |
Set the content of your view, which can be anything you desire. You can also choose if it should be an element or a string. |
| showOnInit bool
(default: true) |
Turns on/off the automatic display of the view after initialization. |
| showOnInit bool
(default: true) |
Turns on/off the automatic display of the view after initialization. |
| useEffects bool
(default: true) |
Turns on/off the animations |
| preventScroll bool
(default: true) |
Turns on/off scrolling of the document body when the view is active. |
| destroyOnEsc bool
(default: false) |
Turns on/off the dismissal of the view when pressing the ESC-button. |
| onFeatureFail function(features)
(default: null) |
If the browser lacks the necessary features an alert will be shown. But as an option you could use a callback function to mend the situation. The function takes one argument which will be the feature control object. |
| onDismiss function()
(default: null) |
Callback for when the view has been dismissed by clicking on the overlay or hitting the ESC-button. |
| overlayClass string
(default: null) |
Classname appended to the overlay in case you want to change color or add a background image. |
| bodyClass string
(default: null) |
Classname appended to the body in case you want to change sizes or whatever, the original class name won't be removed though |
| contentClass string
(default: null) |
Classname appended to the content wrapper in case you want to change sizes or whatever, the original class name won't be removed though |
| modal bool
(default: false) |
Turns the huer into a modal |
| forceCenter bool
(default: false) |
Force huer to remain in the center of the screen |


STEPMOM (M). (Columbia Tristar) Director: Chris Columbus Stars: Julia Roberts, Susan Sarandon, Ed Harris, Jena Malone, Liam Aiken, Lynn Whitfield Running time: 125 minutes.
Those who believe that Hollywood doesn't create strong roles for female actors anymore should look closely at the new film Stepmom. This emotionally charged drama gives two popular actresses an opportunity to sink their teeth into a pair of strongly drawn, juicy, challenging and interesting female roles that move beyond the normal stereotypes.
Jackie Harrison (Susan Sarandon) is a divorced mother who is still protective and possessive of her two children. When her former husband Luke (the always solid Ed Harris), a workaholic lawyer, settles into a relationship with fashion photographer Isabel (Julia Roberts), she feels resentment and hurt. Isabel is unprepared for the instant demands of temporary motherhood thrust upon her. The unforgiving Jackie is quick to point out her shortcomings, and constantly belittles her efforts in front of the two children. When Jackie is diagnosed with terminal cancer, though, the two women are forced to bury their enmity towards each other and establish a united front for the sake of the children. Out of bitterness slowly grows an unexpected friendship.
It would be too easy to dismiss this manipulative tear jerker as a melodramatic "women's film", but that is both patronising and condescending. Stepmom is a well acted, deftly written, entertaining, and broadly appealing drama that explores some important themes, with a mixture of compassion, insight and humour.
Five writers laboured over this poignant drama about families, divorce, the love and pain of relationships, but it is Oscar winner Ron Bass (Rain Man, Waiting To Exhale, etc) who gives the multi- layered material its warmth and honesty.
Sarandon and Roberts also co-produced the film, and their empathy for the characters and its themes is evident in their sterling performances. Sarandon has the meatier role, one that allows her to run the gamut of emotions, which she does with style. She also says more with inflections and her facial expressions than most actresses say with pages of dialogue. She is excellent, bringing an innate intelligence and compassion to this wonderful role, and her beautifully nuanced performance should ensure she starts front-runner to win a well-deserved second Oscar. Roberts' solid and emotionally rich performance is something of a stretch, and should also come as a revelation to those who have previously dismissed her as a light weight actress of little depth.
As the self-absorbed and resentful Anna, Jena Malone (who played the young Jodie Foster in Contact) captures all the pain, confusion and anger of children caught in the bitter cross fire of a divorce, and delivers a quite mature performance. Liam Aiken (from The Object Of My Affection, etc) is heartbreakingly cute and unaffectedly natural as younger son Ben. In one eloquent scene in which Jackie is sharing some time with her two children, he turns to her and says: "If you really want me to, mum, I'll hate her." Harris is fine and restrained, and brings dignity to his smaller role. Director Christopher Columbus is better known for his slapstick comedies of the juvenile Home Alone variety. But he also brought a sympathetic touch and compassion to films like Nine Months and the hugely successful Mrs Doubtfire. Those qualities are very much in evidence in Stepmom, which is also touchingly dedicated to the memory of his late mother. **** greg king http://www.netau.com.au/gregking
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


State
Location
Location
AVAILABLE
UNAVAILABLE
Location setting
ENABLED
DISABLED
GPS Location
AVAILABLE
UNAVAILABLE
GPS Location setting
ENABLED
DISABLED
Network Location
AVAILABLE
UNAVAILABLE
Network Location setting
ENABLED
DISABLED
Location Mode
NOT_DETERMINED
Location authorized
AUTHORIZED
UNAUTHORIZED
Location authorization status
NOT_DETERMINED
Location authorization statuses
NOT_DETERMINED
Location accuracy authorization
NOT_DETERMINED
Camera
Camera
AVAILABLE
UNAVAILABLE
Camera present?
PRESENT
NOT PRESENT
Camera authorized?
AUTHORIZED
UNAUTHORIZED
Camera authorization status
NOT_DETERMINED
Camera Roll authorized?
AUTHORIZED
UNAUTHORIZED
Camera Roll authorization status
NOT_DETERMINED
Network
WiFi
AVAILABLE
UNAVAILABLE
WiFi setting
ENABLED
DISABLED
Data roaming
ENABLED
DISABLED
Bluetooth
Bluetooth
SUPPORTED
UNSUPPORTED
Bluetooth
AVAILABLE
UNAVAILABLE
Bluetooth setting
ENABLED
DISABLED
Bluetooth state
UNKNOWN
Bluetooth Low Energy (LE)
SUPPORTED
UNSUPPORTED
Bluetooth LE Peripheral Mode
SUPPORTED
UNSUPPORTED
Bluetooth authorization status
NOT_DETERMINED
Bluetooth authorization statuses
NOT_DETERMINED
Microphone
Microphone authorized?
AUTHORIZED
UNAUTHORIZED
Microphone authorization status
NOT_DETERMINED
Contacts (Address Book)
Contacts authorized?
AUTHORIZED
UNAUTHORIZED
Contacts authorization status
NOT_DETERMINED
Calendar
Calendar authorized?
AUTHORIZED
UNAUTHORIZED
Calendar authorization status
NOT_DETERMINED
Reminders
Reminders authorized?
AUTHORIZED
UNAUTHORIZED
Reminders authorization status
NOT_DETERMINED
Background refresh
Background refresh authorized?
AUTHORIZED
UNAUTHORIZED
Background refresh authorization status
NOT_DETERMINED
Remote notifications
Remote notifications enabled?
ENABLED
DISABLED
Remote notifications authorization status
NOT_DETERMINED
Registered for remote notifications?
REGISTERED
NOT REGISTERED
Remote notifications types
NOT_DETERMINED
Motion
Motion tracking?
AVAILABLE
UNAVAILABLE
Motion tracking request outcome?
AVAILABLE
UNAVAILABLE
Motion authorization status
UNKNOWN
NFC
NFC
AVAILABLE
UNAVAILABLE
NFC hardware
PRESENT
NOT PRESENT
NFC setting
ENABLED
DISABLED
External SD card
External SD card authorized?
AUTHORIZED
UNAUTHORIZED
External SD card authorization status
NOT_DETERMINED
Misc
ADB enabled?
ENABLED
DISABLED
Device rooted?
ROOTED
UNROOTED
CPU Architecture
NOT_DETERMINED
Current battery level
NOT_DETERMINED
Airplane mode enabled?
ENABLED
DISABLED
Mobile data enabled?
ENABLED
DISABLED
Device OS version
UNKNOWN
Device OS API level
UNKNOWN
Device OS API name
UNKNOWN
Target API level
UNKNOWN
Target API name
UNKNOWN
Minimum API level
UNKNOWN
Minimum API name
UNKNOWN
Re-check state
Warm Restart
Cold Restart
Open settings
Open App Settings
Open Location settings
Open Bluetooth settings
Open WiFi settings
Open Mobile data settings
Open Wireless settings
Open NFC settings
Request permissions
Location
Type:
When in use
Always
Accuracy:
Approximate
Precise
Request Location Authorization
Bluetooth
Permission types:
ADVERTISE
CONNECT
SCAN
Request Bluetooth Authorization
Camera
Camera roll access:
Add only
Read/write
Request Camera Authorization
Request Camera Roll Authorization
Present Limited Library Picker UI
Request Microphone Authorization
Request Contacts Authorization
Request Calendar Authorization
Request Reminders Authorization
Request Motion Authorization
Request external SD permission
Alerts
Sounds
Badges
Request remote notifications
Use permissions
Get Current Location
Use Camera
Enable Wifi
Disable Wifi
Monitor Bluetooth State
Enable Bluetooth
Disable Bluetooth
Show external SD details
Write external SD file


Places We've Visited
Enter a place you've visited:
Enter the location the place is in:
Enter the year you made the visit:
Enter the season when you made the visit:
Enter some of the famous landmark you saw during your visit:
Add Place
Location:
Year Visited:
Season Visited:
Landmarks seen:
Place Visited


The authorization repository readme
file contains documentation on the key concepts around authorization in the Owin Framework. It is strongly
recommended that you read it before using this assembly.
This package provides an implementation of the following interfaces:
-
IIdentityStore provides a persistence mechanism for agents that
can identify themselves to the system. This includes username/password combinations, shared
secrets, certificates and OAuth tokens.
-
IIdentityDirectory provides a way for administrators to search for an
identity so that they can assign permissions. For example you might want to search your Active
Directory for users. In the case of this implementation it searches the SQL database that was
populated by calls to the IIdentityStore interface.
-
IPasswordHasher provides a versioned password hashing algorithm. When
users update their password it will be hashed with the latest version. When users login the
version of the hashing algorithm that was used to store their password will be used to validate
their password.
To make these implementations available to other packages that need these interfaces you just need to add
the NuGet package to the project - that's it, there is nothing else to do.
You can override these interface implementations individually within your application by adding
your application assembly to Ioc Modules explicitly after probing the bin folder. For example you
might want to just override the password hasher but use the other implementations from this assembly.
This package persists identity data using the Prius ORM. You will need to create a database
and configure Prius within your application for this to work. The source code for this project
includes an SqlScripts folder containing the SQL scrips you need to create the database.
Default Configuration
The configuration below is the configuration you will get by default if you do not provide
a configuration for this package.
{
"owinFramework": {
"facility": {
"identityStore.Prius": {
"priusRepositoryName": "IdentityStore",
"identityUrnNamespace": "identity",
"mixedCaseTokens": false,
"mixedCaseIdentity": false,
"mixedCaseSharedSecret": true,
"minimumUserNameLength": 3,
"maximumUserNameLength": 80,
"userNameRegex "<EMAIL_ADDRESS>"minimumPasswordLength": 8,
"maximumPasswordLength": 160,
"passwordRegex": ".*",
"failedLoginsToLock": 5,
"lockDuration": "04:00:00",
"rememberMeFor": "90"
}
}
}
}
Configuration notes
-
Mixed case identifiers are slightly shorter but you must ensure that the casing is preserved
throughout the rest of your code. All lower case identifiers are only slightly longer.
-
The identityUrnNamespace will be used to construct URNs that uniquely
identifiy identities. The default value of "identity" means that URNs will be similar to
"urn:identity:abc123".


👾 😷 🚀
COVID-19 continues disrupting lives. Some are going through severe health situations. Others have
lost their jobs. And by now, many of us are quarantined in our homes.
Life may feel tough now, but don't despair. This can be a time to learn new things, get better at your craft
or enjoy (virtual) time with friends and family.
This page is a list of high-quality resources available for free or cheaper than usual due to the
COVID-19.
If you like them, use them or share them with others. If you know of something that is not here, please
let me know.
Last Updated: {{ last_update }}


When the Andrej Karpathy's "The Unreasonable Effectiveness of Recurrent Neural Networks" post hit the world, the aftermath is quite machine learnable.


Upload Successful!
Generated Image Will Appear In Few Seconds
{% for image_name in image_names %}
Original
Generated
{% endfor %}
Go Back
©2021: Made by Abdur Rahman


There are a lot of ways to get sophisticated here, and we’re only covering a few possibilites here. See RStudio’s R Markdown lessons for other R Markdown capabilities. Plus, R Markdown can render styling from Cascading Style Sheets (CSS) and Hyper Text Markup Language (HTML), which is what non-R Markdown websites use.
So, Googling what you want to do and trying it in your R Markdown files is a good way to learn. Disclaimer: that’s how I’ve learned the following, so there are most definitely better and more elegant ways to do this. But here are some ideas of what you may want to do with your website.
These are options that you can do from the Front Matter.
Note that on this page:
This is all done in the front matter:
output:
html_document:
toc: true
toc_float: true
We can change the website’s theme in _site.yml
. Explore options here: http://rmarkdown.rstudio.com/html_document_format.html#appearance_and_style:
Valid themes include “default”, “cerulean”, “journal”, “flatly”, “readable”, “spacelab”, “united”, “cosmo”, “lumen”, “paper”, “sandstone”, “simplex”, and “yeti”.
By default, images are displayed left-aligned.
Resize an image using HTML tags (side note: check out RStudio’s R Markdown Cheatsheet):
Here’s a big image:

And a small image:

Align an image using HTML tags:
Small image centered:

Small image right-aligned:

Column 1

and

Column 2

there**Here the text is centered. Here are good resources:**
Here the text is centered. Here are good resources:
Text here!
This is red text size 3!
This is blue text size 2!
This is green text in verdana!
R
codeYou can execute R code each time you build your website. Even if you don’t yet know R, this is a little taste of the types of things you can do. There are two ways you’ll see R code; in-line and in a code chunk. This is from the R Markdown chapter in R for Data Science.
Here is an example inline. The date when I last built the website is 2018-02-22. My favorite number is 13.1415927. There are 19 files and folders in our repo. This is not just text; his is executable R code that is 100% awesome!
And here is an example of a code chunk. Let’s plot the first bit of an iris
variable (which is a dataset that comes with base R).
x <- iris$Sepal.Length[1:15]
plot(x)
R
scriptYou can source an R script. This is a super powerful way to avoid copy-pasting your analyses. For example:
## source an external script
source("advanced/my_script.R")
## use the calc_gdp() function `my_script.R`
my_data <- calc_gdp(my_country <- 'Slovenia')
ggplot(data = my_data, aes(x = year, y = pop)) +
geom_point() +
labs(title = my_data$country)
_site.R
This is something that R Markdown websites will look for; when it exists it will give you ‘global variables’ that will be available for all pages across your site.
source("_site.R")
You can insert separate R Markdown files too; text and code will be incorporated seamlessly into this page. This R Markdown file is considered the ‘parent’ file, and the one that is incorporated is the ‘child’ file. In the code chunk below, we’ll say {r, child='advanced/important_example.Rmd'}
.
This text comes from a separate R Markdown file – how would you ever know that this is a separate file!
Here is an example of inline R code: if you round 3.1415927 you get 3.
This is the end of this separate and important R Markdown child file.
You’ll get errors as you work; this is how you learn. These are a few things you may encounter:
If when running rmarkdown::render_site()
you get this error:
Error in object[seq_len(ile)] :
object of type 'symbol' is not subsettable
Go to Session > Restart R and try again.
When knitting, if you get this error:
Error in parse_block(g[-1], g[1], params.src) : duplicate label 'setup'
Calls: <Anonymous> ... process_file -> split_file -> lapply -> FUN -> parse_block
Execution halted
Here you have 2 R
code chunks named the same thing (in this case ‘setup’), you must change one of them because there cannot be two code chunks with the same name.
When you get an error message you don’t understand: Copy-paste it into Google.