text:
Q: Error updating existing ruby on rails App on heroku This app, "ecozap" was developed by another developer five years ago, it is relased, I have to make design changes and css styles ...
Finally, when I push to heroku I´m getting the following error:
C:\Sites\ecozap_v1>heroku logs --app ecozap
2014-01-29T08:05:45.331582+00:00 app[web.1]: While it's not a problem now, it could cause errors if you
change the version of just one of them later.
2014-01-29T08:05:45.331582+00:00 app[web.1]: You should probably keep only one of them.
2014-01-29T08:05:49.108557+00:00 app[web.1]: => Rails 3.1.11 application starting in production on http:
//0.0.0.0:27698
2014-01-29T08:05:49.108557+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `block in build'
2014-01-29T08:05:49.109799+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.11/lib/ac
tion_dispatch/middleware/stack.rb:43:in `build': undefined method `new' for ExceptionNotifier:Module (No
MethodError)
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `inject'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:55:in `block in run_initializers'
2014-01-29T08:05:49.108557+00:00 app[web.1]: => Booting WEBrick
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:54:in `each'
2014-01-29T08:05:49.108557+00:00 app[web.1]: => Call with -d to detach
2014-01-29T08:05:49.108557+00:00 app[web.1]: Exiting
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:54:in `run_initializers'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `build'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:30:in `instance_exec'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/application.rb:96:in `initialize!'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/config.ru:8:in `require'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `each'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:51:in `instance_eval'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/engine.rb:447:in `app'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/config.ru:in `new'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/config.ru:8:in `block in <main>'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:51:in `initialize'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2014-01-29T08:05:49.109799+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:30:in `run'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:40:in `eval'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/server.rb:200:in `app'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:40:in `parse_file'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands/server.rb:46:in `app'
2014-01-29T08:05:49.109957+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands/server.rb:70:in `start'
2014-01-29T08:05:49.110546+00:00 app[web.1]:    from script/rails:6:in `<main>'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/server.rb:254:in `start'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/server.rb:304:in `wrapped_app'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands.rb:49:in `tap'
2014-01-29T08:05:49.110546+00:00 app[web.1]:    from script/rails:6:in `require'
2014-01-29T08:05:49.110546+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands.rb:49:in `<top (required)>'
2014-01-29T08:05:49.110117+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands.rb:54:in `block in <top (required)>'
2014-01-29T08:05:50.377278+00:00 heroku[web.1]: Process exited with status 1
2014-01-29T08:05:50.389210+00:00 heroku[web.1]: State changed from starting to crashed
2014-01-29T08:05:50.390041+00:00 heroku[web.1]: State changed from crashed to starting
2014-01-29T08:05:54.517754+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed
to exit within 10 seconds of SIGTERM
2014-01-29T08:05:54.517978+00:00 heroku[web.1]: Stopping remaining processes with SIGKILL
2014-01-29T08:05:56.651835+00:00 heroku[web.1]: Starting process with command `bundle exec rails server
-p 24949`
2014-01-29T08:05:56.999573+00:00 heroku[web.1]: Process exited with status 137
2014-01-29T08:05:58.434930+00:00 app[web.1]: Your Gemfile lists the gem sqlite3-ruby (>= 0) more than on
ce.
2014-01-29T08:05:58.434930+00:00 app[web.1]: You should probably keep only one of them.
2014-01-29T08:05:58.434930+00:00 app[web.1]: While it's not a problem now, it could cause errors if you
change the version of just one of them later.
2014-01-29T08:05:58.435307+00:00 app[web.1]: Your Gemfile lists the gem rspec-rails (= 2.7.0) more than
once.
2014-01-29T08:05:58.435307+00:00 app[web.1]: You should probably keep only one of them.
2014-01-29T08:05:58.435307+00:00 app[web.1]: While it's not a problem now, it could cause errors if you
change the version of just one of them later.
2014-01-29T08:05:58.438249+00:00 app[web.1]: Your Gemfile lists the gem rspec-core (= 2.7.1) more than o
nce.
2014-01-29T08:05:58.438249+00:00 app[web.1]: While it's not a problem now, it could cause errors if you
change the version of just one of them later.
2014-01-29T08:05:58.438519+00:00 app[web.1]: Your Gemfile lists the gem rspec (>= 0) more than once.
2014-01-29T08:05:58.438249+00:00 app[web.1]: You should probably keep only one of them.
2014-01-29T08:05:58.438519+00:00 app[web.1]: While it's not a problem now, it could cause errors if you
change the version of just one of them later.
2014-01-29T08:05:58.438519+00:00 app[web.1]: You should probably keep only one of them.
2014-01-29T08:06:04.215394+00:00 app[web.1]: => Booting WEBrick
2014-01-29T08:06:04.215394+00:00 app[web.1]: => Rails 3.1.11 application starting in production on http:
//0.0.0.0:24949
2014-01-29T08:06:04.215394+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-01-29T08:06:04.215394+00:00 app[web.1]: => Call with -d to detach
2014-01-29T08:06:04.215394+00:00 app[web.1]: Exiting
2014-01-29T08:06:04.216479+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.11/lib/ac
tion_dispatch/middleware/stack.rb:43:in `build': undefined method `new' for ExceptionNotifier:Module (No
MethodError)
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `block in build'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `each'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `build'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/engine.rb:447:in `app'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:30:in `run'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:55:in `block in run_initializers'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.1.1
1/lib/action_dispatch/middleware/stack.rb:112:in `inject'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/application.rb:96:in `initialize!'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/config/environment.rb:5:in `<top (required)>'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/config.ru:8:in `block in <main>'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:54:in `each'
2014-01-29T08:06:04.216479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:30:in `instance_exec'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/initializable.rb:54:in `run_initializers'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/config.ru:8:in `require'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/config.ru:in `new'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/config.ru:in `<main>'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:40:in `eval'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:40:in `parse_file'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands/server.rb:46:in `app'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/server.rb:254:in `start'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:51:in `instance_eval'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands.rb:49:in `<top (required)>'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from script/rails:6:in `<main>'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands.rb:54:in `block in <top (required)>'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands.rb:49:in `tap'
2014-01-29T08:06:04.216952+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/builder.rb:51:in `initialize'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.11/
lib/rails/commands/server.rb:70:in `start'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/server.rb:304:in `wrapped_app'
2014-01-29T08:06:04.217116+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.3.10/lib/
rack/server.rb:200:in `app'
2014-01-29T08:06:04.217463+00:00 app[web.1]:    from script/rails:6:in `require'
2014-01-29T08:06:05.790709+00:00 heroku[web.1]: Process exited with status 1
2014-01-29T08:06:05.809126+00:00 heroku[web.1]: State changed from starting to crashed
2014-01-29T08:06:06.537495+00:00 heroku[nginx]: 87.218.164.248 - - [29/Jan/2014:08:06:06 +0000] "GET / H
TTP/1.1" 503 409 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.17
00.76 Safari/537.36" ecozap.es
2014-01-29T08:06:06.533400+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/
host=ecozap.es request_id=591e9355-2b57-423d-817c-6a633b0ebe62 fwd="87.218.164.248" dyno= connect= servi
ce= status=503 bytes=

C:\Sites\ecozap_v1>

This is my Gemfile:
source 'http://rubygems.org'

#ruby '1.9.3'

gem 'rails', "= 3.1.11"
#gem "rake", "= 0.8.7"
gem 'racc'
# gem 'sqlite3'
#gem 'acts_as_list', '>= 0.1.0'
#gem 'acts_as_tree'
gem 'paperclip'
gem 'aws-s3', :require => 'aws/s3'
gem 'aws-sdk'
gem 'gravatar_image_tag'
gem 'kaminari'
gem 'jquery-rails', '~> 2.1'
gem 'RedCloth', '>= 3.301'
gem 'carmen', :git => 'git://github.com/alvatarc/carmen.git', :branch => '0.2.x'
#gem 'carmen'
gem 'sass-rails'
gem 'http_accept_language'
gem 'right_aws'
gem 'exception_notification'

group :development do
  gem 'sqlite3-ruby', :require => 'sqlite3'
  gem 'rspec-rails', '= 2.7.0'
  gem 'rspec-core', '= 2.7.1'
  gem 'rspec'
  #gem 'annotate-models'
  gem 'faker'
  gem 'therubyracer'
end

group :test do
  gem 'sqlite3-ruby', :require => 'sqlite3'
  gem 'rspec-rails', '= 2.7.0'
  gem 'rspec-core', '= 2.7.1'
  gem 'rspec'
  gem 'webrat'
  gem 'spork', '= 0.9.0.rc9'
  gem 'factory_girl_rails'
end

group :production do
  gem 'pg'
  gem 'uglifier'
end

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

This is my Gemfile.lock:
GIT
  remote: git://github.com/alvatarc/carmen.git
  revision: af7bcd574e2f0ed6d59b46662a8be939a1e083c0
  branch: 0.2.x
  specs:
    carmen (0.2.13)

GEM
  remote: http://rubygems.org/
  specs:
    RedCloth (4.2.9)
    RedCloth (4.2.9-x86-mingw32)
    actionmailer (3.1.11)
      actionpack (= 3.1.11)
      mail (~> 2.3.3)
    actionpack (3.1.11)
      activemodel (= 3.1.11)
      activesupport (= 3.1.11)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      i18n (~> 0.6)
      rack (~> 1.3.6)
      rack-cache (~> 1.2)
      rack-mount (~> 0.8.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.0.4)
    activemodel (3.1.11)
      activesupport (= 3.1.11)
      builder (~> 3.0.0)
      i18n (~> 0.6)
    activerecord (3.1.11)
      activemodel (= 3.1.11)
      activesupport (= 3.1.11)
      arel (~> 2.2.3)
      tzinfo (~> 0.3.29)
    activeresource (3.1.11)
      activemodel (= 3.1.11)
      activesupport (= 3.1.11)
    activesupport (3.1.11)
      multi_json (~> 1.0)
    arel (2.2.3)
    aws-s3 (0.6.3)
      builder
      mime-types
      xml-simple
    aws-sdk (1.9.2)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
      uuidtools (~> 2.1)
    builder (3.0.4)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cocaine (0.5.1)
      climate_control (>= 0.0.3, < 1.0)
    diff-lcs (1.1.3)
    erubis (2.7.0)
    exception_notification (3.0.1)
      actionmailer (>= 3.0.4)
    execjs (1.4.0)
      multi_json (~> 1.0)
    factory_girl (4.2.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.2.1)
      factory_girl (~> 4.2.0)
      railties (>= 3.0.0)
    faker (1.1.2)
      i18n (~> 0.5)
    ffi (1.9.3-x86-mingw32)
    gravatar_image_tag (1.1.3)
    hike (1.2.2)
    http_accept_language (1.0.2)
    i18n (0.6.4)
    jquery-rails (2.2.1)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    json (1.7.7)
    kaminari (0.14.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    libv8 (3.11.8.17)
    mail (2.3.3)
      i18n (>= 0.4.0)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    mime-types (1.23)
    multi_json (1.7.2)
    nokogiri (1.5.9)
    nokogiri (1.5.9-x86-mingw32)
    paperclip (3.4.1)
      activemodel (>= 3.0.0)
      activerecord (>= 3.0.0)
      activesupport (>= 3.0.0)
      cocaine (~> 0.5.0)
      mime-types
    pg (0.15.1)
    pg (0.15.1-x86-mingw32)
    polyglot (0.3.3)
    racc (1.4.9)
    rack (1.3.10)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-mount (0.8.3)
      rack (>= 1.0.0)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.1.11)
      actionmailer (= 3.1.11)
      actionpack (= 3.1.11)
      activerecord (= 3.1.11)
      activeresource (= 3.1.11)
      activesupport (= 3.1.11)
      bundler (~> 1.0)
      railties (= 3.1.11)
    railties (3.1.11)
      actionpack (= 3.1.11)
      activesupport (= 3.1.11)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (~> 0.14.6)
    rake (10.0.4)
    rdoc (3.12.2)
      json (~> 1.4)
    ref (1.0.4)
    right_aws (3.0.5)
      right_http_connection (>= 1.2.5)
    right_http_connection (1.3.0)
    rspec (2.7.0)
      rspec-core (~> 2.7.0)
      rspec-expectations (~> 2.7.0)
      rspec-mocks (~> 2.7.0)
    rspec-core (2.7.1)
    rspec-expectations (2.7.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.7.0)
    rspec-rails (2.7.0)
      actionpack (~> 3.0)
      activesupport (~> 3.0)
      railties (~> 3.0)
      rspec (~> 2.7.0)
    sass (3.2.8)
    sass-rails (3.1.7)
      actionpack (~> 3.1.0)
      railties (~> 3.1.0)
      sass (>= 3.1.10)
      tilt (~> 1.3.2)
    spork (0.9.0.rc9)
    spork (0.9.0.rc9-x86-mingw32)
      win32-process
    sprockets (2.0.4)
      hike (~> 1.2)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    sqlite3 (1.3.7)
    sqlite3 (1.3.7-x86-mingw32)
    sqlite3-ruby (1.3.3)
      sqlite3 (>= 1.3.3)
    therubyracer (0.11.4)
      libv8 (~> 3.11.8.12)
      ref
    thor (0.14.6)
    tilt (1.3.7)
    treetop (1.4.12)
      polyglot
      polyglot (>= 0.3.1)
    tzinfo (0.3.37)
    uglifier (2.0.1)
      execjs (>= 0.3.0)
      multi_json (~> 1.0, >= 1.0.2)
    uuidtools (2.1.3)
    webrat (0.7.3)
      nokogiri (>= 1.2.0)
      rack (>= 1.0)
      rack-test (>= 0.5.3)
    win32-process (0.7.4)
      ffi (>= 1.0.0)
    xml-simple (1.1.2)

PLATFORMS
  ruby
  x86-mingw32

DEPENDENCIES
  RedCloth (>= 3.301)
  aws-s3
  aws-sdk
  carmen!
  exception_notification
  factory_girl_rails
  faker
  gravatar_image_tag
  http_accept_language
  jquery-rails (~> 2.1)
  kaminari
  paperclip
  pg
  racc
  rails (= 3.1.11)
  right_aws
  rspec
  rspec-core (= 2.7.1)
  rspec-rails (= 2.7.0)
  sass-rails
  spork (= 0.9.0.rc9)
  sqlite3-ruby
  therubyracer
  uglifier
  webrat

Those are my installed gems:
C:\Sites\ecozap_v1>gem list

*** LOCAL GEMS ***

actionmailer (3.2.13, 3.1.11)
actionpack (3.2.13, 3.1.11)
activemodel (3.2.13, 3.1.11)
activerecord (3.2.13, 3.1.11)
activerecord-sqlserver-adapter (3.2.10)
activeresource (3.2.13, 3.1.11)
activesupport (3.2.13, 3.1.11)
addressable (2.3.5)
arel (3.0.3, 3.0.2, 2.2.3)
aws-s3 (0.6.3)
aws-sdk (1.9.2)
bigdecimal (1.1.0)
builder (3.0.4)
bundler (1.3.4)
climate_control (0.0.3)
cocaine (0.5.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.3, 1.6.1)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (1.0.3 x86-mingw32)
exception_notification (3.0.1)
excon (0.25.3)
execjs (2.0.2, 1.4.0)
factory_girl (4.2.0)
factory_girl_rails (4.2.1)
faker (1.1.2)
ffi (1.9.3 x86-mingw32)
gravatar_image_tag (1.1.3)
heroku (3.1.0)
heroku-api (0.3.15)
hike (1.2.3, 1.2.2, 1.2.1)
http_accept_language (1.0.2)
i18n (0.6.4, 0.6.1)
io-console (0.3)
journey (1.0.4)
jquery-rails (3.0.4, 2.2.1)
json (1.8.1, 1.7.7, 1.5.5)
kaminari (0.14.1)
launchy (2.4.2)
libv8 (3.11.8.17)
mail (2.5.4, 2.5.3, 2.3.3)
mime-types (1.25.1, 1.23, 1.21)
minitest (2.5.1)
multi_json (1.8.4, 1.8.2, 1.7.2, 1.7.1)
mysql (2.9.1 x86-mingw32)
netrc (0.7.7)
node (0.0.2)
nokogiri (1.5.9 x86-mingw32)
paperclip (3.4.1)
pg (0.15.1 x86-mingw32, 0.14.1 x86-mingw32)
polyglot (0.3.3)
racc (1.4.9)
rack (1.4.5, 1.3.10)
rack-cache (1.2)
rack-mount (0.8.3)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (3.2.13, 3.1.11)
railties (3.2.13, 3.1.11)
rake (10.1.1, 10.1.0, 10.0.4, 10.0.3, 0.9.2.2)
rb-readline (0.4.2)
rdoc (3.12.2, 3.9.5)
RedCloth (4.2.9 x86-mingw32)
ref (1.0.4)
rest-client (1.6.7)
right_aws (3.0.5)
right_http_connection (1.3.0)
rspec (2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)
ruby (0.1.0)
rubyzip (0.9.9)
sass (3.2.13, 3.2.12, 3.2.8, 3.2.7)
sass-rails (3.2.6, 3.1.7)
spork (0.9.0.rc9 x86-mingw32)
sprockets (2.2.2, 2.0.4)
sqlite3 (1.3.8 x86-mingw32, 1.3.7 x86-mingw32)
sqlite3-ruby (1.3.3)
therubyracer (0.11.0beta1 x86-mingw32)
thor (0.18.1, 0.17.0, 0.14.6)
tilt (1.4.1, 1.3.7, 1.3.6)
tiny_tds (0.5.1 x86-mingw32)
treetop (1.4.15, 1.4.12)
tzinfo (0.3.38, 0.3.37)
uglifier (2.4.0, 2.3.2, 2.0.1)
uuidtools (2.1.3)
webrat (0.7.3)
win32-process (0.7.4)
xml-simple (1.1.2)

A: As you discovered, you needed to do a migration. But also, make sure your Gemfile and Gemfile.lock have been pushed to Heroku. That usually helps gem problems like the one you seem to be having with the exception_notification plugin.

A: To take from dylanjhunt's awesome answer on Github

Just to add to this, I was having a very similar issue that was
  resolved by updating dev tools.
xcode-select --install
Hoping someone sees this that had not tried doing this yet and it
  helps.


text:
Q: Is CGContextAddArc really that slow (compared to a circle drawn with a few lines Folks,
While coding up a few dials and sliders (e.g. like a big volume button one can rotate around) - I found that the standard CGContextAddArc() used like:
- (void)drawRect:(CGRect)rect {
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGColorSpaceRef rgbColorspace = CGColorSpaceCreateDeviceRGB();
    CGContextSetLineWidth(ctx, radius * (KE-KR)+8);
    CGContextSetStrokeColorWithColor(ctx,self.foregroundColor.CGColor);
    .... more some colour/width/etc settings
    ...

    CGContextAddArc(ctx, dx,dy,radius, 0, 2*M_PI, 0);

to be unbelievable slow.
On an iPad - with a handful of filled/stroked circles, less than some 10 clean [self setNeedsDisplay] updates/second during drag. A very quick hack with a hand-drawn circle (shown below) was several orders of magnitude faster. Same applies to the emulator.
Why is this. Seems to be the case for both a normal fill and various gradient fills. What am I doing wrong ?
Dw.
// Stupid replacement for CGContectAddArc() which seems to be very slow.
//
void CGContextAddCirlce(CGContextRef ctx, float ox, float oy, float radius)
{
    double len = 2 * M_PI * radius;
    double step = 1.8 / len; // over the top :)

    // translating/scaling would more efficient, etc..
    //
    float x = ox + radius;
    float y = oy;

    // stupid hack - should just do a quadrant and mirror twice.
    //
    CGContextMoveToPoint(ctx,x,y);
    for(double a = step; a < 2.0 * M_PI -step; a += step) {
        x = ox + radius * cos(a);
        y = oy + radius * sin(a);
        CGContextAddLineToPoint(ctx, x, y);
    };

    CGContextClosePath(ctx);
};

A: The vector drawing operations of Quartz 2D can be slow, which is why it is a good idea to redraw only when needed.
In your case, I would suggest drawing your volume button once, then transforming the UIView or CALayer into which you've drawn the button using a rotational transform.  By simply moving, rotating, or scaling a view, you do not trigger an expensive redraw.  The content is already cached as a texture, and the GPU can quickly manipulate and composite this rasterized content on top of your other views.
You'll find that avoiding redrawing in this manner will yield much improved performance.

A: Issue partly (mostly resolved).

*

*Extensive benchmarking does show that AddArc is indeed slow compared to drawing a complete circle with a vector/straight-line path for circles in the 100-200 pixel radius range. For partial circles the effect is much less pronounced; am wondering if this is tied to the number of beziers.

BUT:

*

*The code below did not compile as one would read it; M_PI was not the 3.14etc as actually expected by set to (3.14... * ((EVP_ARM7_ADJUST[(PLTF)])) by an included fixed-point DSP library (set to x100).

Hence it specified the end-arc double by a factor of 256 too large.
And it was the latter which did make the issue so noticeable (evidently the underlaying implementation just keeps going round and round and round..).
So issue now understood (and will keep an optimized/benchmarked version).
Thanks for the help!

redpajama_set_name: RedPajamaStackExchange


text:
Q: How many sequences can be made with 5 digits so that the difference between any two consecutive digits is $1$? Using the digits $0$, $1$, $2$, $3$, and $4$, how many ten-digit sequences can be written so that the difference between any two consecutive digits is $1$?
I was wondering if my solution is right.
Let  $a(n)$ be the number of $n$ digit sequences that end with $0$ or $4$ so that the difference between any two consecutive digits is $1$.
$b(n)$ be the number of n digit sequences that end with $1$ or $3$ so that the difference between any two consecutive digits is $1$.
$c(n)$ be the number of n digit sequences that end with $2$ so
that the difference between any two consecutive digits is $1$.
$x(n)$ be the number of n digit sequences so that the difference between any two consecutive digits is $1$.
$x(n) = a(n) + b(n) + c(n)$
$a(n) = b(n-1)$
$b(n) = a(n-1) + 2c(n-1)$
$c(n) = b(n-1)$
By substituting $a(n-1)$ and $c(n-1)$ in the formula for $b(n)$ we get $b(n) = 3b(n-2)$
We know that $b(1) = 2, b(2) = 4$.
The characteristic equation for this recursion is $x^2-3 = 0$ with have the roots $3^{1/2}$ and $-3^{1/2}$, so $b(n) = A{(3^{1/2})}^{n} + B{(-3^{1/2})}^{n}$ where $A = {(3^{1/2}+2)}/{3}$ and $B = {(2-3^{1/2})}/{3}$. I think this is an integer.
We get $x(n) = 2b(n-1) + 3b(n-2)$ and by substituting we get something.

A: Your approach looks good to me but you have to check the final result somehow. You can do that with 15 lines of code:
#include <iostream>
using namespace std;

int count(int startDigit, int length) {
    if(startDigit < 0 || startDigit > 4) {
        return 0;
    }
    if(length == 1)
        return 1;
    return count(startDigit - 1, length - 1) + count(startDigit + 1, length - 1);
}

int main() {
    cout << count(1, 10) + count(2, 10) + count(3, 10) + count(4, 10);
}

...and the result is 567.

A:
here is your answer. Your approach was absolutely correct.

A: Your approach is correct, with the above 2 relations mentioned by you:
$$a(n) = b(n-1) = c(n)$$
$$b(n) = a(n-1) + 2c(n-1)$$
we can easily get the relation $$x(n)=3x(n-2)$$
Hence $x(10) = 3x(8) = 3^2 x(6) =...= 3^4 x(2)$, where $x(2) = 8$.
So, the answer to your question would be $2^3 3^4 = \boldsymbol{648}$


text:
Q: How to pass object by reference in java? I've done a lot of research but only found that java cannot pass object by reference. But, then how does System.arraycopy() change the value of an array provided.

A: System.arraycopy() changes an array's contents, not the object/reference itself. The array you include as input parameter must be declared outside the method.

A: I do not know exactly what your "pass object" means.
If you means call a function and pass object as parameter. Then in Java, any Object is passed in reference. This means that if you modify that object in the function called, the modification will take effect even function returns.

A: System.arraycopy() changes contents of an array, not the exact array. However it's possible to write a Pointer class.
public class Pointer<T>{
    private T value;

    public Pointer(T value){
        this.value = value;
    }

    public T get(){
        return value;
    }

    public void set(T value){
        this.value = value;
    }
}

Pointer<SomeClass> pointer = new Pointer<>(theObject);

pointer.set(otherObject);
theObject = pointer.get();

Or to use "the System.arraycopy() trick":
SomeClass[] pointer = new SomeClass[]{ theObject };

pointer[0] = otherObject;
theObject = pointer[0];


text:
Q: Cordova development with JBoss Palette issue I try to learn to develop hybrid applications using JBoss in eclipse.
I have created a hybrid project and I make changes to the index.html file.
JBoss provides the developer with the tab Pallete which have availiable JQuery, Ionic and HTML5 easy to use solutions like forms tables etc.
I have the pallete tab but now I can't see the easy to use solutions. What can I do in order to see the content of pallete tab?
I should see something like that but I only see the pallete tab which nothing

Any help? What I see actually now is this:

A: You have to
1- open the index.html
2- choose the Web Development
Hope that can help!
Sorry I can't attach the screen copy.

A: The step 2 is :
1- generate a cordova project
/ 2- generate a Thym project (eclipse)
 / 3- Inside the Thym project, link it to the cordova project (let take a look here at : 3- Use existing mobile web site code on https://www.eclipse.org/community/eclipse_newsletter/2014/november/article3.php)


text:
Q: How to create an image generator for combining multiple images? I am working on an image generator using HTML5 canvas and jQuery/JS.  What I want to accomplish is the following.
The user can upload 2 or max 3 images (type should be png or jpg) to the canvas. The generated images should always be 1080x1920. If the hart uploads only 2 images, the images are 1080x960. If 3 images are uploaded, the size of each image should be 1080x640.
After they upload 2 or 3 images, the user can click on the download button to get the merged image, with a format of 1080x1920px.
It should make use of html canvas to get this done.
I came up with this:
HTML:
 <canvas id="canvas">
        Sorry, canvas not supported
    </canvas>
    <input id="fileInput" type="file" />
Generate

jQuery:
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');

canvas.height = 400;
canvas.width = 800;

var img1 = loadImage('http://www.shsu.edu/dotAsset/0e829093-971c-4037-9c1b-864a7be1dbe8.png', main);
var img2 = loadImage('https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Ikea_logo.svg/266px-Ikea_logo.svg.png', main);

var minImages = 2;
var imagesLoaded = 0;

function main() {
    imagesLoaded += 1;

    if(imagesLoaded >= minImages) {
        ctx.clearRect(0,0,canvas.width,canvas.height);
        ctx.save();

        ctx.drawImage(img1, 0, 0);

        // ctx.translate(canvas.height/2,canvas.width/2); // move to the center of the canvas
        // ctx.rotate(270*Math.PI/180); // rotate the canvas to the specified degrees
        // ctx.drawImage(img2,0,canvas.height/2);

        ctx.translate(-canvas.height/2,canvas.width/2); // move to the center of the canvas
        ctx.rotate(90*Math.PI/180); // rotate the canvas to the specified degrees
        ctx.drawImage(img2,-img2.width/2,-img2.width/2);

        ctx.restore(); // restore the unrotated context
    }
}

function loadImage(src, onload) {
    var img = new Image();

    img.onload = onload;
    img.src = src;

    console.log(img);
    return img;
}

Above code will create the canvas and place both images (that are now hard-coded in JS) to the created canvas. It will rotate 90 degrees, but it will not position to the right corner. Also the second image should be position beside the first one.
How can I do the rotation and positioning of each image side by side?
Working Fiddle: https://jsfiddle.net/8ww1x4eq/2/

A: Have a look at the updated jsFiddle, is that what you wanted?
Have a look here regarding image rotation
Updated jsFiddle, drawing multiple images.
Notice:

*

*The save script was just a lazy way to make sure I've got the
external scripts loaded before I save the merged_image...

*There is no synchornisation in the sample script, notice that addToCanvas
was called on image loaded event, there could be a race condition
here (but I doubt it, since the image is loaded to memory on
client-side)

function addToCanvas(img) {
    // resize canvas to fit the image
    // height should be the max width of the images added, since we rotate -90 degree
    // width is just a sum of all images' height
    canvas.height = max(lastHeight, img.width);
    canvas.width = lastWidth + img.height;

    ctx.clearRect(0, 0, canvas.width, canvas.height);
    if (lastImage) {
        ctx.drawImage(lastImage, 0, canvas.height - lastImage.height);
    }

    ctx.rotate(270 * Math.PI / 180); // rotate the canvas to the specified degrees
    ctx.drawImage(img, -canvas.height, lastWidth);

    lastImage = new Image();
    lastImage.src = canvas.toDataURL();
    lastWidth += img.height;
    lastHeight = canvas.height;
    imagesLoaded += 1;
}

PS: I've added some script to download the merged image, but it would fail. The error message was: "Uncaught SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported."
I've done a quick Google search and it seemed to be related to Cross-origin resources. I assumed that it wouldn't be an issue with FileReader. I haven't had time to test that so please test it (and please let me know :) It works with FileReader!

A: You can use toDataURL. But in this way user must do something like Save image as...
var img = canvas.toDataURL("image/png");

And then set for example img result src:
$("#result").attr("src",img);

A: Canvas is already an Image.
The canvas and img are interchangeable so there is no need to add the risky step of canvas.toDataURL which can fail depending on the image source domain. Just treat the canvas as if it were and img and put it in the DOM. Converting to a jpg does not save space (actually a resource hungry operation) as the an img needs to be decoded before it can be displayed.
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
canvas.height = 400;
canvas.width = 800;
document.body.appendChild(canvas);  // add to the end of the document

// or add it to a containing element
var container = document.getElementById("containerID"); // or use JQuery
if(container !== null){
    container.appendChild(canvas);
}


text:
Q: Where am I going wrong in trying to import a class? Here's the code for the source file:
package moa4;
public class Book {
    ....
}

And for the destination file:
import moa4.Book;

public class Library {
    ...
}

The source and the destination are both saved in the same directory with the address:
C:\Users\\java\M\moa4
I'm getting the following error: package moa4 does not exist

A: You asked Library to import a package moa4.Book but you defined no such package. Instead, you defined a type Book inside package moa4, and that is not consistent with your import directive.
You could either import the package, or make that an import static of the class, but since Book and Library are both in the same package you don't need the import directive at all.
As mentioned, C:/Users/java/M needs to be in your classpath ("-cp" option).


text:
Q: G.Maps Geolocation Directions Value. How Do? Then I took this code from google maps for directions and I work , but I want to put as "start " my position . The code of geolocation is already inside .
The code is this :

A: Something like this

  Start:
  <select id="start" onchange="updateRoute();">
    <option value="My position (??)">My Position</option>
  </select>
  End:
  <select id="end" onchange="updateRoute();">
    <option value="Padova PD, It">Padova</option>
    <option value="Milano">Parco</option>
  </select>


text:
Q: What is a good survey of solutions/workarounds for 'LaTeX Error: Too many symbol fonts declared.'? We all know the dreaded error message LaTeX Error: Too many symbol fonts declared.
Is there an up to date survey of why it's there, and what can be done about it?
For example, I know that macros such as \DeclareSymbolFont gobble up some limited capacity of internally allocated counter, dating back to some magic numbers Knuth chose at the time for TeX.
I also know that newer systems (LuaTeX, XeTeX) have a higher capacity, but not for, e.g., \DeclareSymbolFont.
There are also all kinds of tricks one can do to limit the number of font families a standard package (like bbm) loads, and so on.
Is there a source that summarises the problem and solutions/workarounds comprehensively?
If there is more than one, what is the most recent/up-to-date?
Context
I often need to extract only one (or a small number) of symbols from a font. The general advice seems to be to look up that package's sourcecode and extract the bare minimum. For example, to get the \boxright symbols from the boisik font, we could use these four lines:
\DeclareFontFamily{U}{bskma}{\skewchar\font130 }
\DeclareFontShape{U}{bskma}{m}{n}{<->bskma10}{}
\DeclareSymbolFont{bskadd} {U} {bskma}{m}{n}
\DeclareMathSymbol{\boxright} {\mathbin}{bskadd} {"A0}

The problem is that if I need to this more than a handful of times, I will start getting a Latex Error: Too many symbol fonts declared..
Partial solution
@David-carlisle 's solution below is attractive in this context, but I'm still not quite getting it to work. The basic definition is something like this:
\makeatletter
\newcommand\NewFontImport[6]{
\newcommand#1{\begingroup\mathchoice%
  {\hbox{\fontsize{\tf@size}{\tf@size}  \usefont{#2}{#3}{#4}{#5}\char#6}}%
  {\hbox{\fontsize{\tf@size}{\tf@size}  \usefont{#2}{#3}{#4}{#5}\char#6}}%
  {\hbox{\fontsize{\sf@size}{\sf@size}  \usefont{#2}{#3}{#4}{#5}\char#6}}%
  {\hbox{\fontsize{\ssf@size}{\ssf@size}\usefont{#2}{#3}{#4}{#5}\char#6}}%
  \endgroup
}}
\makeatother

This works well for, e.g., boisik \boxright:
\DeclareFontFamily{U}{bskma}{\skewchar\font130 }
\DeclareFontShape{U}{bskma}{m}{n}{<->bskma10}{}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\NewFontImport\boxright{U}{bskma}{m}{n}{"A0}

(Well, it doesn't because boisik currently has a bug with its sans serif Greek Sigma that only appears at scale mag:=0+420/600. I sent a bug report to the author. Commenting out sans serif Greek Sigma in the metafont sources works around it.)
Outstanding problems
But it doesn't seem to work across the board.

*

*It doesn't work for mathabx big-operators:

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
      <5> <6> <7> <8> <9> <10>
      <10.95> <12> <14.4> <17.28> <20.74> <24.88>
      mathx10
      }{}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\NewFontImport\bigboxright{U}{mathx}{m}{n}{"D9}

as the \bigboxright ends up being typeset below the baseline. I think I'm passing the wrong argument to \setfont, but not sure what I should pass.

*It doesn't work for delimiters:

\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareFontFamily{OMX}{MnSymbolA}{}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
  <-6>  MnSymbolE5
  <6-7>  MnSymbolE6
  <7-8>  MnSymbolE7
  <8-9>  MnSymbolE8
  <9-10> MnSymbolE9
  <10-12> MnSymbolE10
  <12->   MnSymbolE12}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
  <-6>  MnSymbolE-Bold5
  <6-7>  MnSymbolE-Bold6
   <7-8>  MnSymbolE-Bold7
   <8-9>  MnSymbolE-Bold8
   <9-10> MnSymbolE-Bold9
  <10-12> MnSymbolE-Bold10
  <12->   MnSymbolE-Bold12}{}
\NewFontImport{\lsemsym}{OMX}{MnSymbolE}{m}{n}{'102}
\NewFontImport{\rsemsym}{OMX}{MnSymbolE}{m}{n}{'107}

I can use \lsemsym and \rsemsym on their own, but I cannot use \open\lsemsym \sum_{i=1}^n a_n \close\rsemsym as they are typeset inside a textbox, and not as variable sized delimiters.
(Lots of kudos for @David Carlisle for all his patience in getting me this far!)

A: The restriction is only to 16 fonts within a single math expression, it is rather rare to need more than that.  In luatex or xetex you can use \Umathchardef rather than \mathchardef to access beyond 16 families if you really need that, or even in classic TeX you can avoid the issue in the same way as \boldsymbol avoids the issue, switch to an hbox then set up a different font regime just for the single character then return to the outer formula.
This is a single math expression set with pdflatex with 24 different Z

\documentclass{article}

\usepackage{amsmath,amsfonts}
\DeclareFontEncoding{LS1}{}{}
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS1}{stix2}{m}{n}
\DeclareFontSubstitution{LS2}{stix2}{m}{n}

\begin{document}

$
Z                                       %  0
\mathrm{Z}                              %  1
\mathit{Z}                              %  2
\mathsf{Z}                              %  3
\mathbf{Z}                              %  4
\mathfrak{Z}                            %  5
\mathcal{Z}                             %  6
\mathbb{Z}                              %  7
\mathtt{Z}                              %  8
\hbox{\usefont{OML}{txmi}{m}{it}Z}      %  9
\hbox{\usefont{OML}{txmi}{bx}{it} Z}    % 10
\hbox{\usefont{OT1}{txr}{m}{n} Z}       % 11
\hbox{\usefont{OT1}{txr}{bx}{n} Z}      % 12
\hbox{\usefont{LS1}{stix2}{m}{n} Z}     % 13
\hbox{\usefont{LS1}{stix2}{m}{it} Z}    % 14
\hbox{\usefont{LS1}{stix2}{b}{n} Z}     % 15
\hbox{\usefont{LS2}{stix2}{b}{it} Z}    % 16
\hbox{\usefont{LS2}{stix2}{m}{n} Z}     % 17
\hbox{\usefont{LS2}{stix2}{m}{it} Z}    % 18
\hbox{\usefont{LS2}{stix2}{b}{n} Z}     % 19
\hbox{\usefont{LS2}{stix2}{b}{it} Z}    % 20
\hbox{\usefont{LS1}{stix2frak}{m}{n} Z} % 21
\hbox{\usefont{LS1}{stix2frak}{b}{n} Z} % 22
\hbox{\usefont{LS2}{stix2cal}{m}{n} Z}  % 23
$
\end{document}

A: I can explain the "outstanding problem #1".
The \bigboxright symbol is declared in mathabx as
\DeclareMathSymbol{\bigboxright}     {1}{mathx}{"D9}

Note that it has category 1, and so it is operator. TeX has special function for displaying operators (see make_op in the Knuth's tex.web file). In particular, it can switch to a larger version of the symbol in display mode and shift the symbol vertically if necessary. To emulate this behaviour, I suggest the following modification of the code:
\newcommand\makeopNewFont[6]{
  \setbox0\hbox{\fontsize{#1}{#1}\usefont{#2}{#3}{#4}{#5}\char#6}%
  \lower\dimexpr .5\ht0-.5\dp0-\fontdimen22\textfont2\copy0
}
\newcommand\NewFontImportOp[7]{
  \newcommand#1{%
    \mathop{\mathchoice%
        {\makeopNewFont{\tf@size}{#2}{#3}{#4}{#5}{#7}}%
        {\makeopNewFont{\tf@size}{#2}{#3}{#4}{#5}{#6}}%
        {\makeopNewFont{\sf@size}{#2}{#3}{#4}{#5}{#6}}%
        {\makeopNewFont{\ssf@size}{#2}{#3}{#4}{#5}{#6}}%
    }%
  }%
}
%....
\NewFontImportOp\bigboxright{U}{mathx}{m}{n}{"D9}{"F9}

Unfortunately, I don't know an easy way to determine the code corresponding to the paired (a larger) symbol ("F9 in this case), because of this pairing is stored inside of the font (so-called charlist entries). To found "F9, I've analyzed \tracingoutput-generated log of a test page with original \bigboxright command. Alternative way is to look at all glyphs using the fonttable package and found a match there.
Most likely it is possible to emulate most of other math categories as well (by just prepending \hbox with \mathbin, \mathrel, etc. to get correct kerning):
\newcommand\NewFontImport[7]{%
  \newcommand#1{%
    #5{\mathchoice%
        {\hbox{\fontsize{\tf@size}{\tf@size}\usefont{#2}{#6}{#3}{#4}\char#7}}%
        {\hbox{\fontsize{\tf@size}{\tf@size}\usefont{#2}{#6}{#3}{#4}\char#7}}%
        {\hbox{\fontsize{\sf@size}{\sf@size}\usefont{#2}{#6}{#3}{#4}\char#7}}%
        {\hbox{\fontsize{\ssf@size}{\ssf@size}\usefont{#2}{#6}{#3}{#4}\char#7}}%
    }%
  }%
}

% Note: I've changed the order of arguments to match \DeclareMathSymbol
\NewFontImport\times{U}{m}{n}{\mathbin}{matha}{"02}

But emulation of delimiters is too much complicated (because of construction of left/right delimiters of arbitrary size). It's where I give up.


text:
Q: Create start XML manually I want to create XML file so i am using this way:
XmlWriterSettings settings = new XmlWriterSettings
                  {
                      Indent = true,
                      Encoding = Encoding.Unicode
                  };

string xmlPath = @"c:\file.xml";
XmlWriter xmlWriter = XmlWriter.Create(xmlPath, settings);
xmlWriter.WriteStartDocument(false);

Result:
<?xml version="1.0" encoding="utf-16" standalone="no"?>
<cp>
  <user>NA</user>
  <password>NA</password>
</cu>

But i want this start XML will be Upper case:
<?xml version="1.0" encoding="UTF-16" standalone="no"?>

So i try to create this start manually:
 XmlWriterSettings settings = new XmlWriterSettings
                   {
                        Indent = true,
                        Encoding = Encoding.Unicode
                   };

string xmlPath = @"c:\file.xml";
XmlWriter xmlWriter = XmlWriter.Create(xmlPath, settings);
xmlWriter.WriteRaw("<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\r\n");

But the result was that i received the start twice:
<?xml version="1.0" encoding="utf-16"?><?xml version="1.0" encoding="UTF-16" standalone="no"?>

A: You can add the following line before you start writing the xml.
That is,
settings.OmitXmlDeclaration = true;
string xmlPath = @"c:\file.xml";
XmlWriter xmlWriter = XmlWriter.Create(xmlPath, settings);
xmlWriter.WriteRaw("<?xml version=\"1.0\" encoding=\"UTF-16\" standalone=\"no\"?>\r\n");

This way your xml will be created not with the default declaration, but with the one that you are adding exclusively.


text:
Q: $\aleph$ function fixed points below a weakly inaccessible cardinal are a club set I am throwing yet another one of my solutions out here for the internets to debug and for future set-theory students.

Let $\aleph_\delta$ a weakly inaccessible cardinal. Prove that $A =\{\alpha < \aleph_\delta \mid \alpha = \aleph_\alpha\}$ is a club set.

Any comments on my solution are welcome.
Thanks!

A: First we will show that $A$ is closed.
Let $\langle\alpha_i \mid i < \lambda\rangle \subset A$, and let $\alpha_\lambda = \bigcup_{i < \lambda}\alpha_i$. We want to show $\alpha_\lambda = \aleph_{\alpha_\lambda}$. If $\alpha_\lambda < \aleph_{\alpha_\lambda}$, there is $\beta < \alpha_\lambda$ such that $|\alpha_\lambda| = \aleph_\beta$. Hence there is $\alpha_i$ such that $\alpha_\lambda \leq \aleph_{\alpha_i}$. But $\alpha_\lambda \leq \aleph_{\alpha_i} = \alpha_i < \alpha_\lambda$.
Now we will show that $A$ is not bounded. To show that, I will try to apply what I learned from this question.
Let $\gamma < \aleph_\delta$. $\aleph_\delta$ is weakly inaccessible, so it is a fixed point of the $\aleph$ function, hence: $\gamma \leq \aleph_\gamma < \aleph_\delta$. We define the following series:

*

*$\gamma_0 = \aleph_\gamma$

*$\gamma_{n+1} = \aleph_{\gamma_n}$

*$\gamma_\omega = \bigcup_{n < \omega}\gamma_n$

From the same reasons as before, for every $n$, $\gamma_n < \aleph_\delta$. Also, $\aleph_0 < \aleph_\delta$ and $\aleph_\delta$ is regular, therefor $\gamma_\omega < \aleph_\delta$, so if we show that $\gamma_\omega = \aleph_{\gamma_\omega}$, we win.
But this is true because if $\gamma_\omega < \aleph_{\gamma_\omega}$, we get that for some $n$, $\gamma_\omega \leq \aleph_{\gamma_n} < \aleph_{\gamma_{n+1}} = \gamma_{n+2} < \gamma_\omega$.
Victory.


text:
Q: ABBYY .lsa dictionaries not loaded in Goldendict I recently have found that only goldendict is modern QT application to integrate many dictionaries in a common platform, am using it under Fedora. After having installed it under Fedora I made it to scan a folder where I have many ABBYY dictionaries in .lsd format & audio modules in .lsa format. It scanned successfully & added all the audio files & do also gave me offline audio pronounciation however it failes to integrate any .lsd dictionaries.
In my android which also uses goldendict it auto scans & integrates .lsd files too but why not in Linux?

A: As far as I know, the LSD format is a closed proprietary format by Abbyy, and as such it is not supported in the PC version of GoldenDict, since GoldenDict is open source and the author decided not to put the code that deals with LSD dictionaries under open source license.
On Android, where the App is closed source, the handling of LSD dictionaries is enabled.


text:
Q: Cast A primitive type pointer to A structure pointer - Alignment and Padding? Just 20 minutes age when I answered a question, I come up with an interesting scenario that I'm not sure of the behavior:
Let me have an integer array of size n, pointed by intPtr;
int* intPtr;

and let me also have a struct like this:
typedef struct {
int val1;
int val2;
//and less or more integer declarations goes on like this(not any other type)
}intStruct;

My question is if I do a cast intStruct* structPtr = (intStruct*) intPtr;
Am I sure to get every element correctly if I traverse the elements of the struct? Is there any possibility of miss-alignment(possible because of padding) in any architecture/compiler?

A: The standard is fairly specific that even a POD-struct (which is, I believe the most restrictive class of structs) can have padding between members. ("There might therefore be unnamed padding within a POD-struct object, but not at its beginning, as necessary to achieve appropriate alignment." -- a non-normative note, but still makes the intent quite clear).
For example, contrast the requirements for a standard-layout struct (C++11, §1.8/4):

An object of trivially copyable or standard-layout type (3.9) shall occupy contiguous bytes of storage."

...with those for an array (§8.3.4/1):

An object of array type contains a contiguously allocated non-empty set of N subobjects of type T.

In the array, the elements themselves are required to be allocated contiguously, whereas in the struct, only the storage is required to be contiguous.
The third possibility that might make the "contiguous storage" requirement make more sense would be to consider a struct/class that is not trivially copyable or standard layout. In this case, it's possible that the storage might might not be contiguous at all. For example, an implementation might set aside one area of memory for holding all the private variables, and an entirely separate area of memory to hold all the public variables. To make that a little more concrete, consider two definitions like:
class A {
    int a;
public:
    int b;
} a;

class B {
    int x;
public:
    int y;
} b;

With these definitions, the memory might be laid out something like:
a.a;
b.x;

// ... somewhere else in memory entirely:

a.b;
b.y;

In this case, neither the elements nor the storage needs to be contiguous, so interleaving parts of entirely separate structs/classes is allowable.
That said, the first element must be at the same address as the struct as a whole (9.2/17): "A pointer to a POD-struct object, suitably converted using a reinterpret_cast, points to its initial member (or if that member is a bit-field, then to the unit in which it resides) and vice versa."
In your case, you have a POD-struct, so (§9.2/17): "A pointer to a POD-struct object, suitably converted using a reinterpret_cast, points to its initial member (or if that member is a bit-field, then to the unit in which it resides) and vice versa." Since the first member must be aligned, and the remaining members are all of the same type, it's impossible for any padding to be truly necessary between the other members (i.e., except for bit-fields, any type you can put in a struct you can also put in an array, where contiguous allocation of the elements is required). If you have elements smaller than a word, on a word-oriented machine (e.g., early DEC Alphas), it's possible that padding could make access somewhat simpler though. For example, early DEC Alphas (at the hardware level) were only capable of reading/writing an entirely (64-bit) word at a time. As such, let's consider something like a struct of four char elements:
struct foo {
   char a, b, c, d;
};

If it was required to lay these out in memory so they were contiguous, accessing a foo::b (for example) would require that the CPU load the word, then shift it 8-bits right, then mask to zero-extend that byte to fill the entire register.
Storing would be even worse -- the CPU would have to load the current value of the whole word, mask out the current contents of the appropriate char-sized piece of that, shift the new value to the correct place, OR it into the word, and finally store the result.
By contrast, with padding between the elements, each of those becomes a simple load/store, with no shifting, masking, etc.
At least if memory serves, with DEC's normal compiler for the Alpha, int was 32 bits, and long was 64 bits (it predated long long). As such, with your struct of four ints, you could have expected to see another 32 bits of padding between the elements (and another 32 bits after the last element as well).
Given that you do have a POD-struct, you still have some possibilities though. The one I'd probably prefer would be to use offsetof to get the offsets of the members of the struct, create an array of them, and access the members via those offsets. I showed how to do this in a couple of previous answers.

A: Strictly speaking, such pointer casts aren't allowed and lead to undefined behavior.
The main issue with the cast is however that the compiler is free to add any number of padding bytes anywhere inside a struct, except before the very first element. So whether it will work or not depends on the alignment requirements of the specific system, and also whether struct padding is enabled or not.
int is not necessarily of the same size as the optimal size for an addressable chunk of data, even though this is true for most 32-bit systems. Some 32-bitters don't care about misalignment, some will allow misalignment but produce less efficient code, and some must have the data aligned. In theory, 64-bitters may also want to add padding after an int (which will be 32 bit there) to get a 64-bit chunk, but in practice they support 32-bit instruction sets.
If you write code relying on this cast, you should add something like this:
static_assert (sizeof(intStruct) ==
               sizeof(int) + sizeof(int));

A: It is guaranteed to be legal, given that the element type is standard-layout.  Note: all references in the following are to the c++11 standard.

8.3.4 Arrays [dcl.array]
1 - [...] An object of array type contains a contiguously allocated non-empty set of N subobjects of type T. [...]

Regarding a struct with N members of type T,

9.2 Class members [class.mem]
14 - Nonstatic data members of a (non-union) class with the same access control are allocated so
  that later members have higher addresses within a class object. [...] Implementation alignment requirements might
  cause two adjacent members not to be allocated immediately after each other [...]
  20 - A pointer to a standard-layout struct object, suitably converted using a reinterpret_cast, points to its
  initial member [...] and vice versa. [ Note:
  There might therefore be unnamed padding within a standard-layout struct object, but not at its beginning,
  as necessary to achieve appropriate alignment. —end note ]

So the question is whether any alignment-required padding within a struct could cause its members not to be contiguously allocated with respect to each other.  The answer is:

1.8 The C++ object model [intro.object]
4 - [...] An object of trivially copyable or standard-layout type shall occupy contiguous bytes of storage.

In other words, a standard-layout struct a containing at least two members x, y of the same (standard-layout) type that does not respect the identity &a.y == &a.x + 1 is in violation of 1.8:4.
Note that alignment is defined as (3.11 Alignment [basic.align]) the number of bytes between successive addresses at which a given object can be allocated; it follows that alignment of a type T can be no greater than the distance between adjacent objects in an array of T, and (since 5.3.3 Sizeof [expr.sizeof] specifies that the size of an array of n elements is n times the size of an element) alignof(T) can be no greater than sizeof(T).  Thus any additional padding between adjacent elements of a struct of the same type would not be required by alignment and so would not be countenanced by 9.2:14.

With regard to AProgrammer's point, I would interpret the language in 26.4 Complex numbers [complex.numbers] as requiring that the instantiations of std::complex<T> should behave as standard-layout types with regard to the position of their members, without being required to conform to all the requirements of standard-layout types.

A: The behavior there is almost certainly compiler-, architecture-, and ABI-dependent.  However, if you're using gcc, you can make use of __attribute__((packed)) to force the compiler to pack struct members one after the other, without any padding.  With that, the memory layout should match that of a flat array.

A: I've found nothing which guarantee it is valid when I searched some time ago, and I've found explicit guarantee for the case of std::complex<> in C++ which could have been formulated more easily if it was more generally true, so I doubt I missed something in my search (but absence of proof is hardly a proof of absence and the standard is sometimes obscure in its formulation).

A: A typical alignment of C structs guarantees that the data structure members in the struct will be stored sequentially which is the same as a C array. So order cannot be a problem.
As it comes to alignment, since you have only one data type(int), though the compiler is eligible to do so, there is no scenario it would be necessary to add padding to align your data members. The compiler can add padding before the beginning of the struct, but it cannot add padding at the beginning of the data structure. So if the compiler were to add padding in your situation,
Instead of this:
[4Byte int][4Byte int][4Byte int]...[4Byte int]
Your data structure would have to be stored like this:
[4Byte Data][4Byte Padding][4Byte Data]... which is unreasonable.
Overall, I think this cast should work with no problems in your situation, though I think it is bad practice to use it.


text:
Q: AWS EC2 t3.micro instance sufficiently stable for spring boot services I am new to AWS and recently set up a free t3.micro instance. My goal is to achieve a stable hosting of an Angular application with 2 spring boot services. I got everything working, but after a while, the spring boot services are not reachable anymore. When i redeploy the service it will run again. The spring boot services are packed as jar and after the deployment the process is started as a java process.
I thought AWS guarantees permanent availability out of the box. Do i need some more setup such as autoscaling to achieve the desired uptime of the services or is the t3.micro instance not suffienciently performant, so that i need to upgrade to a stronger instance to avoid the problem?

A: It depends :)
I think you did the right thing by starting with a small instance type and avoid over provisioning in the first place. T3 instance types are generally beneficial for 'burst' usage scenarios i.e. your application sporadically needs a compute spike but not a persistent one. T3 instance types usually work with credits based system, where you instance 'earns' credits when it is idle, and that buffer is always available in times of need (but only until consumed entirely). Then you need to wait for some time window again and earn the credits back.
For your current problem, I think first approach can be to get an idea of the current usage by going through the 'Monitoring' tab on the EC2 instance details page. This will help you understand if the needs are more compute related or i/o related and then you can choose an appropriate instance type from :
https://aws.amazon.com/ec2/instance-types
Next step could also be to profile your application and understand the memory, compute utilisation better. AWS does guarantee availability/durability of resources, but how you consume those resources is more of an application thing, which AWS does not guarantee/control
For your ideas around, autoscaling and availability, it again depends on what your needs are in terms of cost, outages in AWS data centres etc. To have a reliable production setup, you could consider them, but not something really important in the first place.


text:
Q: Computing the homotopy type of the total space of a fiber bundle This is an example/exercise from section 13 in Differential Forms in Algebraic Topology by Bott & Tu. I've been posting a few questions to get through this part of the book. It was pretty tough getting through the previous 12 sections, but this section seems particularly difficult for me.

Let $X = S^1 \vee S^2$ and let $\tilde{X}$ be the universal covering
of X. (Note that $H^*(X)$ is finite whereas $H^*(\tilde{X})$ is not).
Define a fiber bundle over $S^1$ with fiber $\tilde{X}$ by setting
$$E=\tilde{X}\times I / (x,0)\sim(s(x),1)$$ where $s$ is the deck
transformation that shifts everything up one unit. The projection
$\pi: E \rightarrow S^1$ is given by $\pi(\tilde{x},t)=t $. Note that the
fundamental group of the base $\pi_1(S^1)$ acts on $H_2(\text{fiber})$
by shifting each sphere one up.

I am then asked to find the homotopy type of the space $E$.
This chapter deals how the fundamental group of a manifold with a good cover $\mathfrak{U}$ is isomorphic to that of $N(\mathfrak{U})$, the nerve of the cover. I'm guessing this should be relevant? (I assume that there is a direct way of computing the fundamental group via Van Kampen
etc. which I am less interested in...)
Also, the previous two examples finds the cohomology of the total space using Mayer - Vietoris principle and double complex. Here's a link : A simple example calculating Čech comohomology Would finding $H^*(E)$ be useful in finding $\pi_{1}(E)$? I can't seem to relate these two.
Thanks, always!

A: Since you have the fibration $\tilde{X}\hookrightarrow E \to S^1$, you can use the fibration long exact sequence. If you have not encountered it yet, you may try to prove it using the homotopy lifting property of fibrations.
For $k\ge 2$ one gets, $$\underbrace{\pi_{k+1}S^1}_{0} \to \pi_{k} \tilde X \to \pi_k E \to \underbrace{\pi_k S^1}_{0}$$ and hence, the inclusion map $\tilde{X}\to E$ induces isomorphism $\pi_k\tilde X \cong \pi_k E$.
And for $k=1$ we have, $$\underbrace{\pi_{2}S^1}_{0} \to \pi_{1} \tilde X \to \pi_1 E \to \underbrace{\pi_1 S^1}_{\mathbb{Z}}\to \pi_0\tilde X$$
Since $\tilde X$ is an universal cover, it is simply connected and so $\pi_1\tilde X = 0 = \pi_0 \tilde X$. Then we get, $\pi_1 E \cong \mathbb{Z}$.
Thus we have, $$\pi_k E= \cases{ \pi_k \tilde X, \text{if $k\ge 2$}\\ \mathbb{Z}, \text{if $k=1$}}$$
Note: The above argument works for any mapping torus. To compute the fundamental group directly, you can use the vanKampen's theorem, as explained here
Hope this helps. Cheers!


text:
Q: how to change "this" context while using selection.call() I'm making a plugin for creating legends following Mike Bostock's Towards Reusable Charts.
Here below is the simplified code:
function legend () {
    var width      = null,
        height     = null;

  // implement closures with getter-setter methods.
  draw.width = function (val) {
    if (!arguments.length) { return width; }
    width = val;
    return draw;
  };
  draw.height = function (val) { /* same as draw.with pattern */ };

  function draw (selection) {
    /* using selection to draw something */
  }

  return draw;
}

This pattern works well
var lgd = legend().width(400).height(300);
svg.append("g")
  .attr("class", "legend")
  .call(lgd);

However, I change the closure variants as properties for some reasons.
Then the code changed like this:
function Legend () {
  this._width = null;
  this._heigth = null;
  this.someProporty = null;
}
Legend.prototype.width = function (val) {
  if (!arguments.length) { return this._width; }
  this._width = val;
  return this;
};
Legend.prototype.height = function (val) { /* same as with */ };

Legend.prototype.draw = function (selection) {
  if (this.someProporty) { /* Oops, "this" is not the "Legend" instance */ }

  /* using selection to draw something */
};

Now the problem is the function Legend.prototype.draw need to access Legend instance(this)'s proporty, when I follow the same pattern the this is become the selection object:

var legend = (new Legend()).width(400).height(300);
svg.append("g")
  .attr("class", "legend")
  .call(legend.draw);     // Oops, "this" is not the "Legend" instance

I can achieve it by one of this:

*

*selection.call(legend.draw.bind(legend))

*legend.draw(selection)
However, is anyone can give me some elegant ways?


text:
Q: Eclipse not running java program I have recently upgraded OS to Windows 10 and now I am not able to run any java program in Eclipse IDE. I have set PATH variable in the Systems Environment Variables.
I have also tried installing Java in other drive and set path but still this error persists.
Below is the error message I am receiving while running a basic java program-
Exception occurred executing command line.
Cannot run program ""C:\Program Files (x86)\Java\jdk1.6.0_01\bin\javaw.exe"" (in directory "F:\Project\Java Practive"): CreateProcess error=1392, The file or directory is corrupted and unreadable
However when I am running same program using cmd it's running fine.

A: After a digging deep I am able to find the solution-
1. Downloaded Eclipse IDE for 64 bit Windows 10
2. Downloaded Java 1.8 64 bit
Now I am having a 64 bit trio (OS, IDE, Java)


text:
Q: Hiding Tabs in Google Sheets I am re-designing the purchase ordering system for my company. I want to make the process near fully automated and have it live in one place. I have not had much trouble apart from the bit where my suppliers need to edit their tab by entering quotes (prices).
The problem is that they can see other suppliers (competitors) tabs and I do not want this to happen.
So, I am an intermediate on apps script so can find my way around and have a small scale script that does work at the moment but as I increase the scale I worry that my code will have problems.
The script below checks the effective user and hides a tab depending on the email address of the user. This is all well and good but on a larger scale where each supplier (out of 5) must not be able to see the other 4 seller tabs, this will present a problem.
function validUsers() {
  var adminUsers = ['supplier1@email.com'];
  var Users = ['supplier2@email.com'];

  if (adminUsers.indexOf(Session.getEffectiveUser().getEmail()) >= 0) {
    SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Seller1").showSheet()
  }

  if (Users.indexOf(Session.getEffectiveUser().getEmail()) >= 0) {
    SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Seller1").hideSheet()
  }
}

Basically, is there a straight forward way or better way than I am doing?
All I want is to hide 4 our of 5 seller tabs depending on which seller is editing the sheet. So, Seller1 only sees the Seller1 tab where there are actually 5 Seller tabs.

A: Instead of including all the sellers in a single spreadsheet, have you considered creating a spreadsheet file for each seller which they have access to?  Then use the importrange() function to import each into your central spreadsheet.  This minimizes the need for code, but does mean that all changes to the Supplier's information needs to happen in the associated file.  You can still have additional columns with formulas for internal calculations inside the central spreadsheet.
Karl

A: Thank you got the suggestion. I have considered this as an alternative or a form for suppliers to fill in but I have solved the issue.
I now have all but a welcome tab hidden at first. once the document is opened a prompt box appears asking for a password. Depending on the password given, a certain tab(s) will show. This allows them to make their changes, my staff to access everything and keeps suppliers from seeing each others quotes.
Regards,
James


text:
Q: How to store data to database with Ajax on Model Class Codeigniter We want to put data from view () to database. We use Ajax to running some background process (insert data to database). But We can't save the data to database. I'm appreciate and thank's a lot for any suggest and good avice do you give. I'm sorry if this is just a newbie's question.
This is the View (form, fieldset, javascript, and ajax)

var popup, x, f31, f32, f33, f4, f5, f6, f7, f7a, f81, f82, f11, f14, f161, f17a1;

function _(x){
    return document.getElementById(x);
}

//fungsi tutup popup
function tutupPopup(){
    _("popup").style.display = "none";
}

function prosesc11(){
    f31 = _("f31").value;
    f32 = _("f32").value;
    f33 = _("f33").value;
    $.ajax({
        url    : "<?php echo base_url().'index.php/TracerStudy_model/simpan_data_ts';?>",
        type   : 'post',
        data   : {'f31' : f31, 'f32' : f32},
        success: function(data){
            console.log(data);
        }
    });

    if(f31.length>0||f32.length>0){
        _("formc1-1").style.display = "none";
        _("formc1-2").style.display = "block";
        _("progressBar").value = 50;
    }else{
        alert("Maaf data anda ada yang belum diisi.")
    }
}
<form class="multiphaseForm" id="multiphaseForm" onsubmit="return false"
    method="post" action="<?php base_url();?>TracerStudy/masuk_data_ts"
>
<fieldset class="formc1-1" id="formc1-1">

                1. Kapan anda mulai mencari pekerjaan ?

            <input class="col-lg-1" id="f31" name="f3" type="radio" value="1" class="form-control">
            Sebelum lulus

            <input class="col-lg-1" id="f32" name="f3" type="radio" value="2" class="form-control">
            Setelah lulus

            <input class="col-lg-1" id="f33" name="f3" type="radio" value="3" class="form-control">
            Tidak mencari kerja

    <button onclick="prosesc11()">Selanjutnya</button>
</fieldset>
</form>

This is Model Class

public function simpan_data_ts(){
      $idAlumni = $this->session->userdata('id_alumni');
      // $default = null;
      // $satu = $this->input->post('f3');
      // $datetime = date('Y-m-d');
      // $dataSimpan = array( 'f3' => $satu);

      //$f31 = $this->input->post('f31');
      $f32 = $this->input->post('f32');
      $data = array(
        'id_alumni_fk' => $idAlumni,
        'f3' => $this->input->post('f31')
      );
      $this->db->insert('tracer_study', $data);
}

We hope, anyone can tell us what's wrong with it. And I have to say thank you for all your response.

A: You can't call the model class directly from ajax, as a model class can't be accessed from an HTTP request.  You have to pass it first to a controller function, for example with a controller called Foo with a function called bar() the ajax you have would be:
$.ajax({
            url    : "<?php echo base_url().'index.php/foo/bar';?>",
            type   : 'post',
            data   : {'f31' : f31, 'f32' : f32},
            success: function(data){
                console.log(data);
            }
        });

Then in the Foo::Bar function, load model and call your function to save the data:
public function bar() {
$this->load->model('your_model_name');
$this->your_model_name->simpan_data_ts($this->input->post);

A: You cant go to codeigniter model directly.
just pass the data to the controller. there you can call the model by
$this->TracerStudy_model->simpan_data_ts();

and pass the data from controller to model by
$this->TracerStudy_model->simpan_data_ts($data);


text:
Q: postgis eliminate inner boundaries from polygons I constructed a postgis table in PostgreSQL that cointains a set of polygons that are the result of joining many smaller polygons. The result of the join is a polygon with an outer boundary and some of them have inner boundaries (polygons inside). I like to remove the inner boundaries.
The construction of the new table was with:
insert into dl_table
    select 1 as id_level, 18 as id_sublevel,
        ST_snaptogrid(ST_Union(geom),0.0001) as geom
    from small_polygons_table
    where id_sp in
          (select id_sp from cdl where id_level=1 and id_sublevel=18);

and the result for geom is:
<Polygon>
  <outerBoundaryIs>
    <LinearRing>
      <coordinates>
         ...points...
      </coordinates>
    </LinearRing>
  </outerBoundaryIs>
  <innerBoundaryIs>
    <LinearRing>
       <coordinates>
         ...points...
       </coordinates>
    </LinearRing>
  </innerBoundaryIs>
  <innerBoundaryIs>
    <LinearRing>
      <coordinates>
         ...points...
      </coordinates>
    </LinearRing>
  </innerBoundaryIs>
</Polygon>

Now I like to remove those inner boundaries.

A: ST_Union() will dissolve internal boundaries so are you sure that all coordinates are exactly the same?
Your query is more commonly written with a JOIN like this:
insert into dl_table
  select id_level, id_sublevel, ST_snaptogrid(ST_Union(geom),0.0001) as geom
  from small_polygons_table
  join cdl using (id_sp)
  where id_level = 1 and id_sublevel = 18;

A: Just for future reference for others finding this question: the problem here is that the source data doesn't include any topology. There is no "magic" way of cleaning up overlapping polygons that shouldn't overlap, or gaps between polygons that should share a common boundary. One option here is to do the St_snaptogrid before the ST_Union, which will clean it up a bit at least, at the cost of loosing accuracy. But in the end it really depends on the source data and a lot of trial and error will be involved, and possibly manual work too. See https://gis.stackexchange.com/questions/31895/joining-lots-of-small-polygons-to-form-larger-polygon-using-postgis for more info.


text:
Q: aws codepipeline I am new to AWS CodePipeline. When trying to deploy an application using docker images and ECS services, I am getting the following error using my buildspec.yml file:
[Container] 2018/08/14 06:20:36 Phase context status code: Message:
[Container] 2018/08/14 06:20:36 Entering phase INSTALL
[Container] 2018/08/14 06:20:36 Phase complete: INSTALL Success: true
[Container] 2018/08/14 06:20:36 Phase context status code: Message:
[Container] 2018/08/14 06:20:36 Entering phase PRE_BUILD
[Container] 2018/08/14 06:20:36 Running command echo Logging in to Amazon ECR... Logging in to Amazon ECR...
[Container] 2018/08/14 06:20:36 Running command aws --version aws-cli/1.15.41 Python/2.7.6 Linux/4.14.47-56.37.amzn1.x86_64 botocore/1.10.41
[Container] 2018/08/14 06:20:39 Running command $(aws ecr get-login --no-include-email --region us-east-xxx) WARNING! Using --password via the CLI is insecure. Use --password-stdin. Login Succeeded
[Container] 2018/08/14 06:20:40 Running command REPOSITORY_URI= xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python /codebuild/output/tmp/script.sh: 4: /codebuild/output/tmp/script.sh: xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python: not found
[Container] 2018/08/14 06:20:40 Command did not exit successfully REPOSITORY_URI= xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python exit status 127
[Container] 2018/08/14 06:20:40 Phase complete: PRE_BUILD Success: false
[Container] 2018/08/14 06:20:40 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: REPOSITORY_URI= xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python. Reason: exit status 127

Any assistance is appreciated. If it helps, I can attach my buildspec.yml and taskdefinition.json files. Is there a recommended way to do that?

A: It seems you have a space between = and xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python.
This means you're evaluating xxxx.xxxx.ecr.us-east-xxx.amazonaws.com/python as a command, and since this URI is not a valid command, it exits with status code 127.
Simply deleting the space should help.


text:
Q: What will MySQL do, if it is updated simultaneously After having a suggestion from the previous question.
I am now having my visitors count using the database. On writing the script, I had a doubt so took helped of SO.
Suppose my database has a table named as Total and the value is 5.
Two different visitors visit the site at the same time, my script
$sqltc = "UPDATE visits SET Total='$ttl' WHERE Sr=1";
mysqli_query($link, $sqltc);

will try to update the database.
Now my doubt is what will be the new value in the table?
5 OR 6 OR 7 OR anything else?
I know its a rare case, but the site in which the script will be used is quiz site and there will be bulk of visitors visiting simultaneously.
Full code of the script:
$sql = "SELECT  * FROM visits WHERE Sr = '1'";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_array($result);

$date =  $row['Date'];
$ttcounter =  $row['Total'];

$ttcounter++;
$ttl = $ttcounter;

$sqltc = "UPDATE visits SET Total='$ttl' WHERE Sr=1";
mysqli_query($link, $sqltc);

A: A simpler solution would be to do the addition like this
$sqltc = "UPDATE visits SET Total=Total+1 WHERE Sr=1";

This will just add one to the existing value of Total and you no longer need to fetch the old row value and add something to it and then update the row again.
This also removes the likelyhood of 2 visitors both attempting to fetch the current value of Total and both visitors overwriting the current value of 5 with 6 for example. MySQL will look after locking the row so that only one visitor at a time can apply their update, so you get the correct value of 7.


text:
Q: How to mock ActivatedRouteSnapshot when unit testing a Resolver I want to write a unit test for my resolver, which needs to take ActivatedRouteSnapshot in its constructor like so:
export class MyResolver {
  constructor () {
    // ...
  }

  resolve (private route: ActivatedRouteSnapshot) {
    callFoo(route.params.val);
  }
};

But in my unit test, what's the best way to provide an activated route snapshot with mock data? When I try to create an object with just the properties I need, I get an error that it cannot be cast to ActivatedRouteSnapshot:
it('should call foo', inject([MyResolver], async (myResolver: MyResolver) => {
  const mockRoute = {
    params: {
      val: '1234'
    };
  };

  sinon.spy(callFoo);
  myResolver.resolve(mockRoute); // This is the line that errors
  expect(callFoo.calledWith('1234')).to.be.true;
}));

Error:
Type '{ params: { val: string; }; }' cannot be converted to type 'ActivatedRouteSnapshot'.

How can I provide a mock ActivatedRouteSnapshot to pass to my resolver?

A: I'm not sure if this is the prettiest solution, but you can mock the route like this:
let route = createSpyObj('Route', ['']);
route.params = {
  val: '1234'
}

A: If the purpose is   just to pass the mock to the resolver, it's not necessary to use createSpyObj, as suggested in other answers. Also, it would be better to add type safety to the solution:
const mock = <T, P extends keyof T>(obj: Pick<T, P>): T => obj as T;

it('should call foo', () => {
    const route = mock<ActivatedRouteSnapshot, 'params'>({
        params: {
            val: '1234'
        }
    });

    const resolver = createTheResolver();
    const resolverParams = resolver.resolve(route);
    ...
});

A: Note you can also simply cast your object as an ActivatedRouteSnapshot if you like:
const mockRoute = {paramMap: convertToParamMap({'id': '123'})} as
    ActivatedRouteSnapshot;

resolver.resolve(mockRoute);

A: import createSpyObj = jasmine.createSpyObj;

let route = createSpyObj('Route', ['']);
route.params = {
  nameOfParam: 'test'
}

A: You have to provide the active route like this:
import {TestBed} from '@angular/core/testing';
import {SomeResolver} from './some.resolver';
import {ActivatedRoute, convertToParamMap} from '@angular/router';
import {of} from 'rxjs';

describe('SomeResolver', () => {
  let someResolver: SomeResolver;
  let route: ActivatedRoute;

  TestBed.configureTestingModule({
    providers: [
      {
        provide: ActivatedRoute,
        useValue: {snapshot: {paramMap: convertToParamMap({id: 'one-id'})}}
      },
      SomeResolver
    ]
  });

  beforeEach(() => {
    heroResolver = TestBed.get(HeroResolver);
    route = TestBed.get(ActivatedRoute);
  });

  it('should resolve', (() => {
    someResolver.resolve(route.snapshot);
  }));
});

Check a more complex example here.

A: for my purposes, this was the easiest thing to do (which also allowed me to write to the 'parent' property which is normally read-only:
const route = Object.assign({}, ActivatedRouteSnapshot.prototype, {
  params: {
    myParam: 'some_value'
  },
  parent: {
    params: {
      myParentParam: 'some_other_value'
    }
  }
});

then you just call your resolver with 'route' like so:
it('should do something with my activated route params', (done) => {
const route = Object.assign({}, ActivatedRouteSnapshot.prototype, {
  params: {
    myParam: 'some_value'
  },
  parent: {
    params: {
      myParentParam: 'some_other_value'
    }
  }
});
service.resolve(route).subscribe(res => {
  expect( ... )
  done();
});
});


text:
Q: using sheet index instead of name in VBA I would like to copy some contents from my first sheet, paste them into a new sheet, then delete the first sheet and rename the new (only) sheet to Sheet1.  But I never know what the second sheet will be named when I create it.  Most of the time, it will be Sheet2, but I can't count on it.  Here is the code taken just from creating a macro that does it, but it is using the sheet names as they were created in this instance.  I want to use the index of the sheets instead but don't know the syntax:
    Columns("A:D").Select
    Selection.Copy
    Sheets("Sheet2").Select
    ActiveSheet.Paste
    Sheets("Sheet1").Select
    Application.CutCopyMode = False
    ActiveWindow.SelectedSheets.Delete
    Sheets("Sheet2").Select
    Sheets("Sheet2").Name = "Sheet1"

So where is says "Sheet2"...how do I make that so it's using the second sheet, not necessarily the sheet named Sheet2?
Thanks.

A: Worksheets(2) is the way to refer to the second sheet.
Worksheets(Worksheets.Count) to the last one.
Try it like this:
Debug.Print Worksheets(Worksheets.Count).name

A: you can create a variable that will be the new sheet:
Sub sheetdelet()
Dim ws As Worksheet
With ThisWorkbook
    Set ws = .Worksheets.Add
    .Worksheets("Sheet1").Range("A:D").Copy ws.Range("A1")
    Application.DisplayAlerts = False
    .Worksheets("Sheet1").Delete
    Application.DisplayAlerts = True
    ws.Name = "Sheet1"
End With

End Sub


text:
Q: Unable to load data from PHP to listview I am following this tutorial. I have trouble with that. The problem is when I run the source code with the internet URL (which connects through internet), the application is working perfectly. But when I am using the local URL, it show loading but won't load the data. I used the following URL
private static String url = "http://10.0.2.2:1234/androidhive.php";

The actual URL was
private static String url = "http://api.androidhive.info/contacts/";

finally I get this from my logcat
12-12 15:40:48.311: D/Response:(1552): > null
12-12 15:40:48.311: E/ServiceHandler(1552): Couldn't get any data from the url

The PHP file used
<?php
echo '{
    "contacts": [
        {
                "id": "c200",
                "name": "Ravi Tamada",
                "email": "ravi@gmail.com",
                "address": "xx-xx-xxxx,x - street, x - country",
                "gender" : "male",
                "phone": {
                    "mobile": "+91 0000000000",
                    "home": "00 000000",
                    "office": "00 000000"
                }
        },
        {
                "id": "c201",
                "name": "Johnny Depp",
                "email": "johnny_depp@gmail.com",
                "address": "xx-xx-xxxx,x - street, x - country",
                "gender" : "male",
                "phone": {
                    "mobile": "+91 0000000000",
                    "home": "00 000000",
                    "office": "00 000000"
                }
        }
  ]
}';
?>

MainActivity.java
package info.androidhive.jsonparsing;

import info.androidhive.jsonparsing.R;
import java.util.ArrayList;
import java.util.HashMap;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;

public class MainActivity extends ListActivity {

    private ProgressDialog pDialog;

    // URL to get contacts JSON
    //private static String url = "http://10.0.2.2:1234/androidhive.php";

    private static String url = "http://api.androidhive.info/contacts/";

    // JSON Node names
    private static final String TAG_CONTACTS = "contacts";
    private static final String TAG_ID = "id";
    private static final String TAG_NAME = "name";
    private static final String TAG_EMAIL = "email";
    private static final String TAG_ADDRESS = "address";
    private static final String TAG_GENDER = "gender";
    private static final String TAG_PHONE = "phone";
    private static final String TAG_PHONE_MOBILE = "mobile";
    private static final String TAG_PHONE_HOME = "home";
    private static final String TAG_PHONE_OFFICE = "office";

    // contacts JSONArray
    JSONArray contacts = null;

    // Hashmap for ListView
    ArrayList<HashMap<String, String>> contactList;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        contactList = new ArrayList<HashMap<String, String>>();

        ListView lv = getListView();

        // Listview on item click listener
        lv.setOnItemClickListener(new OnItemClickListener() {

            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                    int position, long id) {
                // getting values from selected ListItem
                String name = ((TextView) view.findViewById(R.id.name))
                        .getText().toString();
                String cost = ((TextView) view.findViewById(R.id.email))
                        .getText().toString();
                String description = ((TextView) view.findViewById(R.id.mobile))
                        .getText().toString();

                // Starting single contact activity
                Intent in = new Intent(getApplicationContext(),
                        SingleContactActivity.class);
                in.putExtra(TAG_NAME, name);
                in.putExtra(TAG_EMAIL, cost);
                in.putExtra(TAG_PHONE_MOBILE, description);
                startActivity(in);

            }
        });

        // Calling async task to get json
        new GetContacts().execute();
    }

    /**
     * Async task class to get json by making HTTP call
     * */
    private class GetContacts extends AsyncTask<Void, Void, Void> {

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            // Showing progress dialog
            pDialog = new ProgressDialog(MainActivity.this);
            pDialog.setMessage("Please wait...");
            pDialog.setCancelable(false);
            pDialog.show();

        }

        @Override
        protected Void doInBackground(Void... arg0) {
            // Creating service handler class instance
            ServiceHandler sh = new ServiceHandler();

            // Making a request to url and getting response
            String jsonStr = sh.makeServiceCall(url, ServiceHandler.GET);

            Log.d("Response: ", "> " + jsonStr);

            if (jsonStr != null) {
                try {
                    JSONObject jsonObj = new JSONObject(jsonStr);

                    // Getting JSON Array node
                    contacts = jsonObj.getJSONArray(TAG_CONTACTS);

                    // looping through All Contacts
                    for (int i = 0; i < contacts.length(); i++) {
                        JSONObject c = contacts.getJSONObject(i);

                        String id = c.getString(TAG_ID);
                        String name = c.getString(TAG_NAME);
                        String email = c.getString(TAG_EMAIL);
                        String address = c.getString(TAG_ADDRESS);
                        String gender = c.getString(TAG_GENDER);

                        // Phone node is JSON Object
                        JSONObject phone = c.getJSONObject(TAG_PHONE);
                        String mobile = phone.getString(TAG_PHONE_MOBILE);
                        String home = phone.getString(TAG_PHONE_HOME);
                        String office = phone.getString(TAG_PHONE_OFFICE);

                        // tmp hashmap for single contact
                        HashMap<String, String> contact = new HashMap<String, String>();

                        // adding each child node to HashMap key => value
                        contact.put(TAG_ID, id);
                        contact.put(TAG_NAME, name);
                        contact.put(TAG_EMAIL, email);
                        contact.put(TAG_PHONE_MOBILE, mobile);

                        // adding contact to contact list
                        contactList.add(contact);
                    }
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            } else {
                Log.e("ServiceHandler", "Couldn't get any data from the url");
            }

            return null;
        }

        @Override
        protected void onPostExecute(Void result) {
            super.onPostExecute(result);
            // Dismiss the progress dialog
            if (pDialog.isShowing())
                pDialog.dismiss();
            /**
             * Updating parsed JSON data into ListView
             * */
            ListAdapter adapter = new SimpleAdapter(
                    MainActivity.this, contactList,
                    R.layout.list_item, new String[] { TAG_NAME, TAG_EMAIL,
                            TAG_PHONE_MOBILE }, new int[] { R.id.name,
                            R.id.email, R.id.mobile });

            setListAdapter(adapter);
        }

    }

}

ServiceHandler.java
package info.androidhive.jsonparsing;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;

public class ServiceHandler {

    static String response = null;
    public final static int GET = 1;
    public final static int POST = 2;

    public ServiceHandler() {

    }

    /*
     * Making service call
     * @url - url to make request
     * @method - http request method
     * */
    public String makeServiceCall(String url, int method) {
        return this.makeServiceCall(url, method, null);
    }

    /*
     * Making service call
     * @url - url to make request
     * @method - http request method
     * @params - http request params
     * */
    public String makeServiceCall(String url, int method,
            List<NameValuePair> params) {
        try {
            // http client
            DefaultHttpClient httpClient = new DefaultHttpClient();
            HttpEntity httpEntity = null;
            HttpResponse httpResponse = null;

            // Checking http request method type
            if (method == POST) {
                HttpPost httpPost = new HttpPost(url);
                // adding post params
                if (params != null) {
                    httpPost.setEntity(new UrlEncodedFormEntity(params));
                }

                httpResponse = httpClient.execute(httpPost);

            } else if (method == GET) {
                // appending params to url
                if (params != null) {
                    String paramString = URLEncodedUtils
                            .format(params, "utf-8");
                    url += "?" + paramString;
                }
                HttpGet httpGet = new HttpGet(url);

                httpResponse = httpClient.execute(httpGet);

            }
            httpEntity = httpResponse.getEntity();
            response = EntityUtils.toString(httpEntity);

        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (ClientProtocolException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return response;

    }
}

SingleContact.java
package info.androidhive.jsonparsing;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import info.androidhive.jsonparsing.R;

public class SingleContactActivity  extends Activity {

    // JSON node keys
    private static final String TAG_NAME = "name";
    private static final String TAG_EMAIL = "email";
    private static final String TAG_PHONE_MOBILE = "mobile";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_single_contact);

        // getting intent data
        Intent in = getIntent();

        // Get JSON values from previous intent
        String name = in.getStringExtra(TAG_NAME);
        String email = in.getStringExtra(TAG_EMAIL);
        String mobile = in.getStringExtra(TAG_PHONE_MOBILE);

        // Displaying all values on the screen
        TextView lblName = (TextView) findViewById(R.id.name_label);
        TextView lblEmail = (TextView) findViewById(R.id.email_label);
        TextView lblMobile = (TextView) findViewById(R.id.mobile_label);

        lblName.setText(name);
        lblEmail.setText(email);
        lblMobile.setText(mobile);
    }
}

Actvitymain.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">
    <!-- Main ListView
         Always give id value as list(@android:id/list)
    -->
    <ListView
        android:id="@android:id/list"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>

</LinearLayout>

activity_sigle_contact.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:padding="10dp">
  <!-- Name Label -->
  <TextView android:id="@+id/name_label"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textSize="25dip"
            android:textStyle="bold"
            android:paddingTop="10dip"
            android:paddingBottom="10dip"
            android:textColor="#43bd00"/>
  <!-- Email Label -->
  <TextView android:id="@+id/email_label"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textColor="#acacac"/>
  <!-- Mobile Label -->
  <TextView android:id="@+id/mobile_label"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textStyle="bold"/>
</LinearLayout>

ListItem.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:padding="10dp"
    android:paddingLeft="10dp"
    android:paddingRight="10dp" >

    <!-- Name Label -->

    <TextView
        android:id="@+id/name"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="2dip"
        android:paddingTop="6dip"
        android:textColor="#43bd00"
        android:textSize="16sp"
        android:textStyle="bold" />

    <!-- Email label -->
    <TextView
        android:id="@+id/email"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="2dip"
        android:textColor="#acacac" />

    <!-- Mobile number label -->
    <TextView
        android:id="@+id/mobile"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="left"
        android:text="Mobile: "
        android:textColor="#5d5d5d"
        android:textStyle="bold" />

</LinearLayout>

The project is avaiable with the link
Please help me with this, I don't why it not loading the data from the PHP file.
have anyone have idea about this?


text:
Q: VB.Net Crystal Reports Deployment I am trying to redistribute my visual studio 2010 program to client computers. When I publish the program and execute it from my developping computer, everything works fine (probably because crystal reports is installed). Although, when I try to execute the setup on the client computer, it runs into an error when trying to install:
"SAP Crystal Reports Runtime Engine for .Net 4.0"
My prerequisites are:
Microsoft .NET Framework 4 Client Profile (x86 and x64)
SAP Crystal Reports Runtime Engine for .NET Framework 4.0
Windows Installer 3.1
Install location is: "Download prerequisites from the component vendor's web site"
Here are the application files that are set to Included and Required.

Is there any reason for the "SAP Crystal Reports Runtime Engine For .Net 4.0" not installing? I tried putting one of the prerequisites to the full "Microsoft.NET Framework 4" instead of it's client profile - but  that one wouldn't install either.
Here is a screenshot of the warnings I get:

A: For those wondering what I did to solve this. I changed from Crystal Reports to the built in ReportViewer control included in Visual Studio (Professional). It's free, and basically the same.
From experience, crystal reports was much easier to build the reports but when it came to the deployment of a program using Crystal Reports, I would have various bugs that would take forever to solve. All in all, it wasn't as robust as ReportViewer is in the deployement department.