| Class | Rails::Initializer |
| In: |
vendor/rails/railties/lib/initializer.rb
|
| Parent: | Object |
The Initializer is responsible for processing the Rails configuration, such as setting the $LOAD_PATH, requiring the right frameworks, initializing logging, and more. It can be run either as a single command that‘ll just use the default configuration, like this:
Rails::Initializer.run
But normally it‘s more interesting to pass in a custom configuration through the block running:
Rails::Initializer.run do |config| config.frameworks -= [ :action_mailer ] end
This will use the default configuration options from Rails::Configuration, but allow for overwriting on select areas.
| configuration | [R] | The Configuration instance used by this Initializer instance. |
| loaded_plugins | [R] | The set of loaded plugins. |
Create a new Initializer instance that references the given Configuration instance.
# File vendor/rails/railties/lib/initializer.rb, line 99 99: def initialize(configuration) 100: @configuration = configuration 101: @loaded_plugins = [] 102: end
Runs the initializer. By default, this will invoke the process method, which simply executes all of the initialization routines. Alternately, you can specify explicitly which initialization routine you want:
Rails::Initializer.run(:set_load_path)
This is useful if you only want the load path initialized, without incuring the overhead of completely loading the entire environment.
# File vendor/rails/railties/lib/initializer.rb, line 90 90: def self.run(command = :process, configuration = Configuration.new) 91: yield configuration if block_given? 92: initializer = new configuration 93: initializer.send(command) 94: initializer 95: end
# File vendor/rails/railties/lib/initializer.rb, line 239 239: def add_gem_load_paths 240: unless @configuration.gems.empty? 241: require "rubygems" 242: @configuration.gems.each &:add_load_paths 243: end 244: end
Adds all load paths from plugins to the global set of load paths, so that code from plugins can be required (explicitly or automatically via Dependencies).
# File vendor/rails/railties/lib/initializer.rb, line 235 235: def add_plugin_load_paths 236: plugin_loader.add_plugin_load_paths 237: end
Add the load paths used by support functions such as the info controller
# File vendor/rails/railties/lib/initializer.rb, line 230 230: def add_support_load_paths 231: end
Fires the user-supplied after_initialize block (Configuration#after_initialize)
# File vendor/rails/railties/lib/initializer.rb, line 465 465: def after_initialize 466: if @gems_dependencies_loaded 467: configuration.after_initialize_blocks.each do |block| 468: block.call 469: end 470: end 471: end
# File vendor/rails/railties/lib/initializer.rb, line 250 250: def check_gem_dependencies 251: unloaded_gems = @configuration.gems.reject { |g| g.loaded? } 252: if unloaded_gems.size > 0 253: @gems_dependencies_loaded = false 254: # don't print if the gems rake tasks are being run 255: unless $rails_gem_installer 256: puts %{These gems that this application depends on are missing:} 257: unloaded_gems.each do |gem| 258: puts " - #{gem.name}" 259: end 260: puts %{Run "rake gems:install" to install them.} 261: end 262: else 263: @gems_dependencies_loaded = true 264: end 265: end
Check for valid Ruby version This is done in an external file, so we can use it from the `rails` program as well without duplication.
# File vendor/rails/railties/lib/initializer.rb, line 164 164: def check_ruby_version 165: require 'ruby_version_check' 166: end
# File vendor/rails/railties/lib/initializer.rb, line 337 337: def initialize_cache 338: unless defined?(RAILS_CACHE) 339: silence_warnings { Object.const_set "RAILS_CACHE", ActiveSupport::Cache.lookup_store(configuration.cache_store) } 340: end 341: end
This initialization routine does nothing unless :active_record is one of the frameworks to load (Configuration#frameworks). If it is, this sets the database configuration from Configuration#database_configuration and then establishes the connection.
# File vendor/rails/railties/lib/initializer.rb, line 330 330: def initialize_database 331: if configuration.frameworks.include?(:active_record) 332: ActiveRecord::Base.configurations = configuration.database_configuration 333: ActiveRecord::Base.establish_connection 334: end 335: end
Sets the dependency loading mechanism based on the value of Configuration#cache_classes.
# File vendor/rails/railties/lib/initializer.rb, line 415 415: def initialize_dependency_mechanism 416: Dependencies.mechanism = configuration.cache_classes ? :require : :load 417: end
For Ruby 1.8, this initialization sets $KCODE to ‘u’ to enable the multibyte safe operations. Plugin authors supporting other encodings should override this behaviour and set the relevant default_charset on ActionController::Base.
For Ruby 1.9, this does nothing. Specify the default encoding in the Ruby shebang line if you don‘t want UTF-8.
# File vendor/rails/railties/lib/initializer.rb, line 322 322: def initialize_encoding 323: $KCODE='u' if RUBY_VERSION < '1.9' 324: end
# File vendor/rails/railties/lib/initializer.rb, line 343 343: def initialize_framework_caches 344: if configuration.frameworks.include?(:action_controller) 345: ActionController::Base.cache_store ||= RAILS_CACHE 346: end 347: end
Sets the logger for Active Record, Action Controller, and Action Mailer (but only for those frameworks that are to be loaded). If the framework‘s logger is already set, it is not changed, otherwise it is set to use RAILS_DEFAULT_LOGGER.
# File vendor/rails/railties/lib/initializer.rb, line 386 386: def initialize_framework_logging 387: for framework in ([ :active_record, :action_controller, :action_mailer ] & configuration.frameworks) 388: framework.to_s.camelize.constantize.const_get("Base").logger ||= RAILS_DEFAULT_LOGGER 389: end 390: 391: RAILS_CACHE.logger ||= RAILS_DEFAULT_LOGGER 392: end
Initializes framework-specific settings for each of the loaded frameworks (Configuration#frameworks). The available settings map to the accessors on each of the corresponding Base classes.
# File vendor/rails/railties/lib/initializer.rb, line 451 451: def initialize_framework_settings 452: configuration.frameworks.each do |framework| 453: base_class = framework.to_s.camelize.constantize.const_get("Base") 454: 455: configuration.send(framework).each do |setting, value| 456: base_class.send("#{setting}=", value) 457: end 458: end 459: configuration.active_support.each do |setting, value| 460: ActiveSupport.send("#{setting}=", value) 461: end 462: end
Sets +ActionController::Base#view_paths+ and +ActionMailer::Base#template_root+ (but only for those frameworks that are to be loaded). If the framework‘s paths have already been set, it is not changed, otherwise it is set to use Configuration#view_path.
# File vendor/rails/railties/lib/initializer.rb, line 398 398: def initialize_framework_views 399: ActionMailer::Base.template_root ||= configuration.view_path if configuration.frameworks.include?(:action_mailer) 400: ActionController::Base.view_paths = [configuration.view_path] if configuration.frameworks.include?(:action_controller) && ActionController::Base.view_paths.empty? 401: end
If the RAILS_DEFAULT_LOGGER constant is already set, this initialization routine does nothing. If the constant is not set, and Configuration#logger is not nil, this also does nothing. Otherwise, a new logger instance is created at Configuration#log_path, with a default log level of Configuration#log_level.
If the log could not be created, the log will be set to output to STDERR, with a log level of WARN.
# File vendor/rails/railties/lib/initializer.rb, line 357 357: def initialize_logger 358: # if the environment has explicitly defined a logger, use it 359: return if defined?(RAILS_DEFAULT_LOGGER) 360: 361: unless logger = configuration.logger 362: begin 363: logger = ActiveSupport::BufferedLogger.new(configuration.log_path) 364: logger.level = ActiveSupport::BufferedLogger.const_get(configuration.log_level.to_s.upcase) 365: if configuration.environment == "production" 366: logger.auto_flushing = false 367: logger.set_non_blocking_io 368: end 369: rescue StandardError => e 370: logger = ActiveSupport::BufferedLogger.new(STDERR) 371: logger.level = ActiveSupport::BufferedLogger::WARN 372: logger.warn( 373: "Rails Error: Unable to access log file. Please ensure that #{configuration.log_path} exists and is chmod 0666. " + 374: "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." 375: ) 376: end 377: end 378: 379: silence_warnings { Object.const_set "RAILS_DEFAULT_LOGGER", logger } 380: end
If Action Controller is not one of the loaded frameworks (Configuration#frameworks) this does nothing. Otherwise, it loads the routing definitions and sets up loading module used to lazily load controllers (Configuration#controller_paths).
# File vendor/rails/railties/lib/initializer.rb, line 406 406: def initialize_routing 407: return unless configuration.frameworks.include?(:action_controller) 408: ActionController::Routing.controller_paths = configuration.controller_paths 409: ActionController::Routing::Routes.configuration_file = configuration.routes_configuration_file 410: ActionController::Routing::Routes.reload 411: end
# File vendor/rails/railties/lib/initializer.rb, line 425 425: def initialize_temporary_session_directory 426: if configuration.frameworks.include?(:action_controller) 427: session_path = "#{configuration.root_path}/tmp/sessions/" 428: ActionController::Base.session_options[:tmpdir] = File.exist?(session_path) ? session_path : Dir::tmpdir 429: end 430: end
Sets the default value for Time.zone, and turns on ActiveRecord::Base#time_zone_aware_attributes. If assigned value cannot be matched to a TimeZone, an exception will be raised.
# File vendor/rails/railties/lib/initializer.rb, line 434 434: def initialize_time_zone 435: if configuration.time_zone 436: zone_default = Time.send!(:get_zone, configuration.time_zone) 437: unless zone_default 438: raise %{Value assigned to config.time_zone not recognized. Run "rake -D time" for a list of tasks for finding appropriate time zone names.} 439: end 440: Time.zone_default = zone_default 441: if configuration.frameworks.include?(:active_record) 442: ActiveRecord::Base.time_zone_aware_attributes = true 443: ActiveRecord::Base.default_timezone = :utc 444: end 445: end 446: end
Loads support for "whiny nil" (noisy warnings when methods are invoked on nil values) if Configuration#whiny_nils is true.
# File vendor/rails/railties/lib/initializer.rb, line 421 421: def initialize_whiny_nils 422: require('active_support/whiny_nil') if configuration.whiny_nils 423: end
If Rails is vendored and RubyGems is available, install stub GemSpecs for Rails, Active Support, Active Record, Action Pack, Action Mailer, and Active Resource. This allows Gem plugins to depend on Rails even when the Gem version of Rails shouldn‘t be loaded.
# File vendor/rails/railties/lib/initializer.rb, line 172 172: def install_gem_spec_stubs 173: unless Rails.respond_to?(:vendor_rails?) 174: abort %{Your config/boot.rb is outdated: Run "rake rails:update".} 175: end 176: 177: if Rails.vendor_rails? 178: begin; require "rubygems"; rescue LoadError; return; end 179: 180: stubs = %w(rails activesupport activerecord actionpack actionmailer activeresource) 181: stubs.reject! { |s| Gem.loaded_specs.key?(s) } 182: 183: stubs.each do |stub| 184: Gem.loaded_specs[stub] = Gem::Specification.new do |s| 185: s.name = stub 186: s.version = Rails::VERSION::STRING 187: end 188: end 189: end 190: end
# File vendor/rails/railties/lib/initializer.rb, line 473 473: def load_application_initializers 474: if @gems_dependencies_loaded 475: Dir["#{configuration.root_path}/config/initializers/**/*.rb"].sort.each do |initializer| 476: load(initializer) 477: end 478: end 479: end
Loads the environment specified by Configuration#environment_path, which is typically one of development, test, or production.
# File vendor/rails/railties/lib/initializer.rb, line 293 293: def load_environment 294: silence_warnings do 295: return if @environment_loaded 296: @environment_loaded = true 297: 298: config = configuration 299: constants = self.class.constants 300: 301: eval(IO.read(configuration.environment_path), binding, configuration.environment_path) 302: 303: (self.class.constants - constants).each do |const| 304: Object.const_set(const, self.class.const_get(const)) 305: end 306: end 307: end
# File vendor/rails/railties/lib/initializer.rb, line 246 246: def load_gems 247: @configuration.gems.each(&:load) 248: end
# File vendor/rails/railties/lib/initializer.rb, line 309 309: def load_observers 310: if @gems_dependencies_loaded && configuration.frameworks.include?(:active_record) 311: ActiveRecord::Base.instantiate_observers 312: end 313: end
Loads all plugins in config.plugin_paths. plugin_paths defaults to vendor/plugins but may also be set to a list of paths, such as
config.plugin_paths = ["#{RAILS_ROOT}/lib/plugins", "#{RAILS_ROOT}/vendor/plugins"]
In the default implementation, as each plugin discovered in plugin_paths is initialized:
After all plugins are loaded, duplicates are removed from the load path. If an array of plugin names is specified in config.plugins, only those plugins will be loaded and they plugins will be loaded in that order. Otherwise, plugins are loaded in alphabetical order.
if config.plugins ends contains :all then the named plugins will be loaded in the given order and all other plugins will be loaded in alphabetical order
# File vendor/rails/railties/lib/initializer.rb, line 283 283: def load_plugins 284: plugin_loader.load_plugins 285: end
# File vendor/rails/railties/lib/initializer.rb, line 287 287: def plugin_loader 288: @plugin_loader ||= configuration.plugin_loader.new(self) 289: end
# File vendor/rails/railties/lib/initializer.rb, line 481 481: def prepare_dispatcher 482: require 'dispatcher' unless defined?(::Dispatcher) 483: Dispatcher.define_dispatcher_callbacks(configuration.cache_classes) 484: Dispatcher.new(RAILS_DEFAULT_LOGGER).send :run_callbacks, :prepare_dispatch 485: end
Sequentially step through all of the available initialization routines, in order (view execution order in source).
# File vendor/rails/railties/lib/initializer.rb, line 106 106: def process 107: Rails.configuration = configuration 108: 109: check_ruby_version 110: install_gem_spec_stubs 111: set_load_path 112: 113: require_frameworks 114: set_autoload_paths 115: add_gem_load_paths 116: add_plugin_load_paths 117: load_environment 118: 119: initialize_encoding 120: initialize_database 121: 122: initialize_cache 123: initialize_framework_caches 124: 125: initialize_logger 126: initialize_framework_logging 127: 128: initialize_framework_views 129: initialize_dependency_mechanism 130: initialize_whiny_nils 131: initialize_temporary_session_directory 132: initialize_time_zone 133: initialize_framework_settings 134: 135: add_support_load_paths 136: 137: load_gems 138: load_plugins 139: 140: # pick up any gems that plugins depend on 141: add_gem_load_paths 142: load_gems 143: check_gem_dependencies 144: 145: load_application_initializers 146: 147: # the framework is now fully initialized 148: after_initialize 149: 150: # Prepare dispatcher callbacks and run 'prepare' callbacks 151: prepare_dispatcher 152: 153: # Routing must be initialized after plugins to allow the former to extend the routes 154: initialize_routing 155: 156: # Observers are loaded after plugins in case Observers or observed models are modified by plugins. 157: 158: load_observers 159: end
Requires all frameworks specified by the Configuration#frameworks list. By default, all frameworks (Active Record, Active Support, Action Pack, Action Mailer, and Active Resource) are loaded.
# File vendor/rails/railties/lib/initializer.rb, line 222 222: def require_frameworks 223: configuration.frameworks.each { |framework| require(framework.to_s) } 224: rescue LoadError => e 225: # re-raise because Mongrel would swallow it 226: raise e.to_s 227: end
Set the paths from which Rails will automatically load source files, and the load_once paths.
# File vendor/rails/railties/lib/initializer.rb, line 202 202: def set_autoload_paths 203: Dependencies.load_paths = configuration.load_paths.uniq 204: Dependencies.load_once_paths = configuration.load_once_paths.uniq 205: 206: extra = Dependencies.load_once_paths - Dependencies.load_paths 207: unless extra.empty? 208: abort "load_once_paths must be a subset of the load_paths.\nExtra items in load_once_paths: \#{extra * ','}\n" 209: end 210: 211: # Freeze the arrays so future modifications will fail rather than do nothing mysteriously 212: configuration.load_once_paths.freeze 213: end
Set the $LOAD_PATH based on the value of Configuration#load_paths. Duplicates are removed.
# File vendor/rails/railties/lib/initializer.rb, line 194 194: def set_load_path 195: load_paths = configuration.load_paths + configuration.framework_paths 196: load_paths.reverse_each { |dir| $LOAD_PATH.unshift(dir) if File.directory?(dir) } 197: $LOAD_PATH.uniq! 198: end


FRANK AND JESSE A film review by John Panago Copyright 1996 John Panago
Vidmark Entertainment Malofilm Video
Starring Character
Rob Lowe Jesse James Bill Paxton Frank James Cole Younger Randy Travis William Atherton Allan Pickerton
My rating: four and half stars out of five
While looking for a video to rent, I found Frank and Jesse. I never heard of this movie before (just like many you find in the new releases section) and took a gamble on wether my $3.98 would be worth the trouble. As luck would have had it I picked a winner.
Whenever you hear about the Frank and Jesse James gang you tend to think of a bank robbing and cold blood murdering gang that should be put to jail and the key thrown away. History books may tell you this but as usual there are two sides to every story.
The movie stars Rob Lowe and Bill Paxton. These guys may not be in the same class as Al Pacino or Gene Hackman but they are perfect in this movie. They were believable and they seemed to suit their characters well.
The movie ends at the end of the American civil war and a Chicago railroad company is trying to buy up Missouri land. In this process the company kills many innocent people. Most of these people include the Confederate side of the war. One man killed was the father of the then young Frank and Jesse James. The brothers seek revenge and this starts their epic life of crime.
The brothers assemble a gang which inlcudes their former mates from a guerilla band from the civil war. Their gang is good with the steel and have the look of being tough guys. Also in the gang is Cole Younger who is played by country music star Randy Travis who surprised me with a fairly good performance.
The gang emerges as a powerhouse and became heroes by the media for stealing from the rich and giving to the poor (a la Robin Hood). As the boys become more and more famous the railroad company (who is being robbed by the gang) have had enough and hire Allan Pickerton to lead the charge to bring justice to the land by putting the gang behind bars. I will leave the plot here as to not give away too much.
The one thing that I paid attention to in the movie is the part of the rivalry and hatred that existed in the USA during the frontier years and what it made. Watching this movie took part of the James brothers evil side away and brought them the hero side as it shows that they were fighting a losing cause against people who wanted to walk all over them but they just would not give up.
Furthemore this movie showed that the James gang were real people with families and lived basically normal lives. The family theme really shines as it shows how the two brothers, Frank and Jesse, depended on each other and cared. They were alwasy there for each other. This is something that we rarely see in movies these days that the family is always there to support and that is one thing that society need to take a closer look at these days.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


div(great - grandparents)
hello
li(direct - parent)
span
div(prandparent)
p (direct parent)
span
Direct Parent
Ancestors
UL
Parents until UL


JESSICA NELSON
ASPIRING PUBLISHER
A student of history and design looking to make her way into the wonderful world of publishing
ABOUT
PORTFOLIO
RESUME
CONTACT
VIDEO EDITING


BF-STEM observation of an / / composite particle under electron beam with a 4× faster frame rate (300 keV, ~36 pA, 512 × 512 pixels, pixel size 0.306 angstrom, pixel dwell time 6 us, frame rate 1.89 sec/frame). (a) BF-STEM image of a particle edge region with similar thickness and crystal orientation relative to that of Figure 2a. (b) FFT pattern of the composite particle before electron beam damage, where the rock-salt, spinel and layered structures are observed in the pattern. Note that the phase is an intermediate during the transition in electrochemical cycles 5 21. (c) FFT pattern of the composite particle after electron beam damage, which corresponds to the 200 th frame (6 min 18 s) in the series. The corresponding BF-STEM movie is provided in the supplemental information (Movie S3). F, R and S represent the , and phases in the FFT indices, respectively.


Below are the steps involved in building a Java Application
that accesses an LDAP Directory Server.
- Install the Java Platform Software
- Get the Directory Server software as discussed
earlier
- Configure the Directory Server with the desired schema. For using
the examples in this tutorial a special
schema needs to be configured on the server.
- Populate the directory server with the desired content.
For using the examples in this tutorial a special
content needs to be populated on the server.
- Write a JNDI application to access the Directory, compile
and run it against the Directory Server to get your desired
results. The JNDI examples are covered in the next
lesson.
The
first two steps are covered in the previous section.
The rest of this lesson discusses steps
three and part
of step
four. The step
five that involves writing
a JNDI application is covered in the next lesson that shows how to
write JNDI applications to perform various operations on the directory.
Once you've set up the directory, or have
directed your program to communicate with an existing directory,
what sort of information can you expect to find there?
The directory can be viewed as consisting of name-to-object bindings.
That is, each object in the directory has a corresponding name.
You can retrieve an object in the directory by looking up its name.
Also stored in the directory are attributes.
An object in the directory, in addition to having a name,
also has an optional set of attributes.
You can ask the directory for an object's attributes,
as well as ask it to search for an object that
has certain attributes.
Step 3: Directory Schema
A schema specifies the types of objects that a directory may contain.
This tutorial populates the directory with entries, some of which
require special schema definitions.
To accommodate these entries,
you must first either turn off schema-checking in the
server or add the schema files that accompany this tutorial to the server.
Both of these tasks are typically performed by the directory
server's administrator.
This tutorial comes with two schema files that must be installed:
The format of these files is a formal description that
possibly cannot be directly copied and pasted
into server configuration files.
Specifically, the attribute syntaxes are described in terms of
RFC 2252.
Different directory servers have different ways of configuring
their schema. This tutorial includes some tools for installing
the Java and CORBA schemas on directory servers that permit
their schemas to be modified via the LDAP.
Following is a list of tasks the tools can perform.
- Create Java Schema
- Create CORBA Schema
Follow the instructions in the accompanying
README file
to run these programs.
Note: Windows Active Directory.
Active Directory manages its schema by using an internal format.
To update the schema, you can use either
the Active Directory Management Console snap-in,
ADSIEdit,
or the
CreateJavaSchema utility,
following the instructions for Active Directory.
Step 4: Providing Directory Content for This Tutorial
In the examples of this trail, the results shown reflect how
the LDAP directory has been set up using the configuration file
(tutorial.ldif)
that accompanies this tutorial.
If you are using an existing server, or a server with
a different setup, then you might see different results.
Before you can load the configuration file
(
tutorial.ldif) into the
directory server,
you must follow the instructions for updating the
server's schema or you can use
ldapadd or
ldapmodify command
if available on your UNIX system.
For example, using ldapmodify you could do (by plugging in appropriate values
for the hostname, administrator DN (-D option), and the password):
ldapmodify -a -c -v -h hostname -p 389\
-D "cn=Administrator, cn=users, dc=xxx, dc=xxx"\
-w passwd -f tutorial.ldif
Installation Note: Access Control.
Different directory servers handle access control differently.
Some examples in this tutorial perform updates to the directory.
Also, the part of the namespace where you have installed the tutorial
might have read access restrictions.
Therefore, you need to take server-specific actions to make the
directory readable and/or updatable in order for those examples to work.
For the
Sun Java Directory Server
add the
aci entry suggested in the
sunds.aci.ldif file
to the
dn: o=JNDITutorial entry to make the entire directory
readable and updatable.
Alternatively, you may change the examples so that they authenticate
to the directory. Details of how to do this are described in the
Adavanced Topics for LDAP users lesson.
Installation Note: Namespace Setup.
The entries in the
tutorial.ldif
file use the distinguished name (DN) "o=JNDITutorial" for the root naming
context. If you have not configured your directory server to have
"o=JNDITutorial" as a root naming context, then your attempt
to import tutorial.ldif will fail.
The easiest way to get around this problem is to add the DN of
an existing root naming context to each "dn:" line in the tutorial.ldif
file.
For example, if your server already has the root naming context
"dc=imc,dc=org", then you should change the line
to
dn: o=JNDITutorial, dc=imc, dc=org
Make this change for each line that begins with "dn:" in the file.
Then, in all of the examples in this tutorial, wherever it uses
"o=JNDITutorial", use "o=JNDITutorial,dc=imc,dc=org" instead.
Installation Note: File Format.
Depending on the operating system platform that you
are using, you might need to edit tutorial.ldif so that it contains
the correct newline characters for that platform.
For example, if you find that tutorial.ldif contains
Windows-style newline characters (CRLF) and you are importing this file
into a directory server that is running
on a Unix platform, then you need to edit the file and replace
CRLF with LF. A symptom of this problem is that the directory server
rejects all of the entries in tutorial.ldif.
Installation Note: Windows Active Directory.
-
The root naming context is not going to be "o=jnditutorial".
It will be of the form "dc=x,dc=y,dc=z". You need to follow the
previous Namespace Setup note.
-
Add the object classes and related attributes for the
"inetOrgPerson" and "groupOfUniqueNames" object classes to the
Active Directory schema by using
the Active Directory Management Console snap-in, ADSIEdit.
"groupOfUniqueNames" is defined in
RFC 2256,
"inetOrgPerson" in
RFC 2798
-
Some of hierarchical relationships used by the tutorial are not
allowed by default in Active Directory. To enable these relationships,
add them by using
the Active Directory Management Console snap-in, ADSIEdit.
objectclass: organizationalUnit
possible superiors: domainDNS
inetOrgPerson
organizaton
organizationalPerson
organizationalUnit
person
top
objectclass: groupOfUniqueNames
possible superiors: top
objectclass: inetOrgPerson
possible superiors: container
organizationalPerson
person
top
-
Delete one of the two "sn" attributes from the Mark Twain entry in
tutorial.ldif.
Active Directory defines "sn" to be a single-valued attribute,
contrary to RFC 2256.
-
Use the ldifde command-line utility to load the modified
tutorial.ldif file.
BEGINCODE
# ldifde -i -v -k -f tutorial.ldif


HealthTap
Feed
Search
Ask Docs
Dr. Robert Kwok
Pediatrics, Board Certified
Palo Alto, CA
★
★
★
★
★
Ask Now
About
Feed
Network
Checklists


browser-image-compression@
#.#.#
look at console to see logs
Options:
maxSizeMB:
maxWidthOrHeight:
Compress in web-worker
Compress in main thread
Abort


Auth package
The Auth package provides a standardized interface for authentication in Fuel. This allows our users to
write their own drivers and easily integrate a new driver to work with old code by keeping the basic methods
consistent.
Basic Usage of Login drivers
The Auth class works mainly with one or more login drivers and offers a set of 2 methods for all other
drivers. One getting a driver instance and a second answering whether a loaded driver of that type
validates. Below are first the methods for checking and getting the drivers.
check($specific = null)
Checks either all loaded Login drivers or just those specified as the parameter.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $specific |
null |
null to check all or one ore more driver id's (single string or array of strings) |
|
| Returns |
bool, whether one of the (given) drivers successfully validated the login |
| Example |
if ( ! Auth::check())
{
Response::redirect('login');
}
// specific driver
Auth::check('simpleauth');
// Multiple drivers
Auth::check(array('simpleauth', 'twitter'));
|
instance($instance = null)
Retrieves a loaded driver, when multiple drivers are set in config the first driver will also be the
default.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $instance |
null |
null to fetch the default driver, or a driver id to get a specific one |
|
| Returns |
Auth_Login_Driver |
| Example |
// Logout the default driver
Auth::instance()->logout();
// Login the SimpleAuth driver
Auth::instance('simpleauth')->login(Input::post('username'), Input::post('password'));
|
Driver methods
The methods below should be available on all Auth drivers in at least the way described here, but will
often have specific parameters added for their implementation.
get_user_array(Array $additional_fields = array())
Returns an array describing the current logged in user, always includes at least a screenname and
an emailaddress. Additional fields can be configured in the driver config or requested through the
$additional_fields array, but they must have a get_user_fieldname() method within the driver
to be gettable.
| Static |
No |
| Parameters |
| Param |
Default |
Description |
| $additional_fields |
array() |
an array with fieldnames to fetch |
|
| Returns |
array |
| Example |
$user = Auth::instance()->get_user_array();
|
login()
Must be implemented specific to the driver to login the user.
| Static |
No |
| Parameters |
None by default |
| Returns |
bool |
| Example |
Auth::instance('simpleauth')->login($username, $password);
|
logout()
Must be implemented specific to the driver to logout the user, and work without parameters.
| Static |
No |
| Parameters |
None |
| Returns |
void |
| Example |
Auth::instance('simpleauth')->logout();
|
get_email()
Fetches the current logged in user's emailaddress.
| Static |
No |
| Parameters |
None |
| Returns |
string |
| Example |
$email = Auth::instance('simpleauth')->get_email();
|
get_screen_name()
Fetches the current logged in user's screen name.
| Static |
No |
| Parameters |
None |
| Returns |
string |
| Example |
$name = Auth::instance('simpleauth')->get_screen_name();
|
Basic Usage of Group drivers
Group drivers are for assigning users to user groups.
member($group, $specific = null)
Checks if user is a member of the given group in either all loaded Group drivers or just those
specified as the 2nd parameter.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $group |
required |
group id |
| $specific |
null |
null to check all or one ore more driver id's (single string or array of strings) |
|
| Returns |
bool, whether one of the (given) drivers had the current user registered as a member |
| Example |
if ( ! Auth::member(100))
{
Response::redirect('no_admin');
}
// specific driver
Auth::member(1, 'simplegroup');
// Multiple drivers
Auth::check(0, array('simplegroup', 'genericgroup'));
|
group($instance = null)
Retrieves a loaded group driver, when multiple drivers are set in config the first driver will also
be the default.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $instance |
null |
null to fetch the default driver, or a driver id to get a specific one |
|
| Returns |
Auth_Group_Driver |
| Example |
Auth::group()->get_name();
|
Basic Usage of ACL drivers
Group drivers are for assigning users to user groups.
ACL uses input of a location and required rights on that location as input for the checking of rights,
what that exactly means is up to you. There are 2 common ways in which these are implemented:
- Location = Controller, Rights = Methods
In this scenario you could have a Controller_Articles with methods like
action_list() and action_create() which you could check using:
Auth::has_access('articles.list');
- Location = Model, Rights = specific operations
In this scenario you could have a Model_Article and before allowing any operation within
the model you first check if the user has the required CRUD rights:
Auth::has_access('article.[read,update]');
These are but examples, it's up to you how you interpret and use these.
has_access($condition, $specific = null)
Checks if user is has access for the given condition in either all loaded Acl drivers or just those
specified as the 2nd parameter.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $condition |
required |
takes a location and the required rights on the location as either a string or
an array |
| $specific |
null |
null to check all or one ore more driver id's (single string or array of strings) |
|
| Returns |
bool, whether the user gets access to all given rights in the given location from the loaded
(or specified) ACL drivers. |
| Example |
// check if user is allowed to comment
if ( ! Auth::has_access('comments.create'))
{
Response::redirect('no_admin');
}
// check if user can also update & delete comments
Auth::has_access('comments.[update,delete]');
// The same with an array instead of a string
Auth::has_access(array('comments', array('update', 'delete')));
|
acl($instance = null)
Retrieves a loaded ACL driver, when multiple drivers are set in config the first driver will also
be the default.
| Static |
Yes |
| Parameters |
| Param |
Default |
Description |
| $instance |
null |
null to fetch the default driver, or a driver id to get a specific one |
|
| Returns |
Auth_Acl_Driver |
| Example |
Auth::acl();
|


Hi buddy, this is a simple page which will show you some information about your browser and your device. Don't worry I am not going to hack your device.
These are information recorded by javascript. Let me know if it is correct or not.
| Code Name | Doe |
| Java Enabled | Doe |
| Device | Doe |
| Browser Engine | Doe |
| Platform | Doe |
| App Name | Doe |
| Location cordinates | You may have disabled location for browser. |
| Ip Address | Doe |
Sorry ! You are not connected.


magni.utils.multiprocessing._processing module
Module providing the process function.
Routine listings
- process(func, namespace={}, args_list=None, kwargs_list=None, maxtasks=None)
- Map multiple function calls to multiple processors.
See also
- magni.utils.multiprocessing.config
- Configuration options.
-
magni.utils.multiprocessing._processing.process(func, namespace={}, args_list=None, kwargs_list=None, maxtasks=None)[source]
Map multiple function calls to multiple processors.
For each entry in args_list and kwargs_list, a task is formed which is used
for a function call of the type func(*args, **kwargs).
| Parameters: |
- func (function) –
A function handle to the function which the calls should be mapped to.
- namespace (dict, optional) –
A dict whose keys and values should be globally available in func (the
default is an empty dict).
- args_list (list or tuple, optional) –
A sequence of argument lists for the function calls (the default is
None, which implies that no arguments are used in the calls).
- kwargs_list (list or tuple, optional) –
A sequence of keyword argument dicts for the function calls (the
default is None, which implies that no keyword arguments are used in
the calls).
- maxtasks (int, optional) –
The maximum number of tasks of a process before it is replaced by a new
process (the default is None, which implies that processes are not
replaced).
|
| Returns: | results (list) –
A list with the results from the function calls.
|
See also
- magni.utils.multiprocessing.config()
- Configuration options.
Notes
If the workers configuration option is equal to 0, map is used.
Otherwise, the map functionality of a multiprocessing worker pool is used.
Reasons for using this function over map or standard multiprocessing:
- Simplicity of the code over standard multiprocessing.
- Simplicity in switching between single- and multiprocessing.
- The use of both arguments and keyword arguments in the function calls.
- The reporting of exceptions before termination.
- The possibility of terminating multiprocessing with a single interrupt.
Examples
An example of how to use args_list, and kwargs_list:
>>> from magni.utils.multiprocessing._processing import process
>>> def calculate(a, b, op='+'):
... if op == '+':
... return a + b
... elif op == '-':
... return a - b
...
>>> args_list = [[5, 7], [9, 3]]
>>> kwargs_list = [{'op': '+'}, {'op': '-'}]
>>> process(calculate, args_list=args_list, kwargs_list=kwargs_list)
[12, 6]
-
magni.utils.multiprocessing._processing._process_init(func, namespace)[source]
Initialise the process by making global variables available to it.
| Parameters: |
- func (function) –
A function handle to the function which the calls should be mapped to.
- namespace (dict) –
A dict whose keys and values should be globally available in func.
|
-
magni.utils.multiprocessing._processing._process_worker(fak_tuple)[source]
Unpack and map a task to the function.
| Parameters: |
- fak_tuple (tuple) –
A tuple (func, args, kwargs) containing the parameters listed below.
- func (function) –
A function handle to the function which the calls should be mapped to.
- args (list or tuple) –
The sequence of arguments that should be unpacked and passed.
- kwargs (list or tuple) –
The sequence of keyword arguments that should be unpacked and passed.
|
Notes
If an exception is raised in func, the stacktrace of that exception is
printed since the exception is otherwise silenced until every task has been
executed when using multiple workers.
Also, a workaround has been implemented to allow KeyboardInterrupts to
interrupt the current tasks and all remaining tasks. This is done by
setting a global variable, when catching a KeyboardInterrupt, which is
checked for every call.


Covid Alert For{{location_name}} {{change}} on {{last_updated}} Note that risk is reduced for those who are vaccinated.
{{#if disclaimer}}
{{disclaimer.name}} {{disclaimer.text}} About Covid Act Now provides a 5-color risk score for states and counties across the nation so citizens and government officials can better understand COVID status in their area. Learn more at covidactnow.org/about To avoid overwhelming your inbox, we only send out Alerts on Mondays and Thursdays. For the most up-to-date risk assessments, check out the real-time metrics on our site. Feedback
Tell us how we can
provide you more
useful alerts, at
info@covidactnow. Alert Settings Were you forwarded this email? Sign up to continue receiving alerts. |


public interface InferenceTool
LookupTool
.LookupTool
| Modifier and Type | Method and Description |
|---|---|
boolean |
areQueriesEqualAtEL(Object obj1,
Object obj2)
Determines whether the two input queries are equal EL expressions.
|
CycList |
askCycQuery(CycList query,
CycObject mt,
Object maxTransformationDepth,
Object maxNumber,
Object maxTimeSeconds,
Object maxProofDepth)
Asks a Cyc query and returns the binding list.
|
void |
destroyInferenceProblemStoreByName(String name)
Destroys the named problem store.
|
InferenceResultSet |
executeQuery(CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Run a synchronous query against Cyc.
|
InferenceResultSet |
executeQuery(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Run a synchronous query against Cyc.
|
InferenceResultSet |
executeQuery(FormulaSentence query,
ElMt mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Run a synchronous query against Cyc.
|
InferenceResultSet |
executeQuery(String query,
Object mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Run a synchronous query against Cyc.
|
com.cyc.query.parameters.InferenceParameters |
getHLQueryProperties()
Returns a clone of the default HL query properties.
|
void |
initializeNamedInferenceProblemStore(String name,
com.cyc.query.parameters.InferenceParameters queryProperties)
Initializes a named inference problem store.
|
boolean |
isQueryTrue_Cached(CycList query,
CycObject mt)
Deprecated.
|
boolean |
isQueryTrue(CycList query,
CycObject mt)
Deprecated.
|
boolean |
isQueryTrue(CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Returns true if the Cyc query (with inference parameters) is proven true.
|
boolean |
isQueryTrue(CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Returns true if the Cyc query (with inference parameters) is proven true.
|
boolean |
isQueryTrue(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Returns true if the Cyc query (with inference parameters) is proven true.
|
boolean |
isQueryTrue(FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Returns true if the Cyc query (with inference parameters) is proven true.
|
String |
queryPropertiesToString(com.cyc.query.parameters.InferenceParameters queryProperties)
Returns a query properties string for the given query properties if present, otherwise
returns a query properties string for the default query properties.
|
CycList |
queryVariable(CycList query,
CycVariable variable,
CycObject mt)
Returns a list of bindings for a query with a single unbound variable.
|
CycList<Object> |
queryVariable(CycVariable variable,
CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
queryVariable(CycVariable variable,
CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList |
queryVariable(CycVariable variable,
CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
String inferenceProblemStoreName)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
queryVariable(CycVariable queryVariable,
FormulaSentence query,
CycObject mt)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
queryVariable(CycVariable queryVariable,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
queryVariable(CycVariable variable,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
queryVariable(CycVariable queryVariable,
String query,
Object mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable.
|
CycList<Object> |
queryVariableLow(CycVariable queryVariable,
InferenceResultSet rs) |
CycList<Object> |
queryVariables(CycList<CycVariable> variables,
CycList<Object> query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
CycList<Object> |
queryVariables(CycList<CycVariable> variables,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
CycList |
queryVariables(CycList<CycVariable> queryVariables,
FormulaSentence query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
String inferenceProblemStoreName)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
CycList<Object> |
queryVariables(CycList<CycVariable> variables,
String query,
Object mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
long timeoutMsecs)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
CycList |
queryVariables(CycList queryVariables,
CycList query,
CycObject mt,
com.cyc.query.parameters.InferenceParameters queryProperties,
String inferenceProblemStoreName)
Asks a Cyc query (new inference parameters) and returns the binding list for the given variable list.
|
boolean areQueriesEqualAtEL(Object obj1, Object obj2) throws CycConnectionException
obj1
- obj2
- CycConnectionException
CycList askCycQuery(CycList query, CycObject mt, Object maxTransformationDepth, Object maxNumber, Object maxTimeSeconds, Object maxProofDepth) throws CycConnectionException
query
- the query expressionmt
- the inference microtheorymaxTransformationDepth
- the Integer maximum transformation depth or nil for no limitmaxNumber
- the Integer maximum number of returned bindings or nil for no limitmaxTimeSeconds
- the Integer maximum number of seconds inference duration or nil for no
limitmaxProofDepth
- the Integer maximum number of levels in the proof tree or nil for no
limitCycConnectionException
- if a communication error occursvoid destroyInferenceProblemStoreByName(String name) throws CycConnectionException
name
- the unique problem store nameCycConnectionException
InferenceResultSet executeQuery(CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
Note: One should put this call in a try/finally statement and the finally statement should explicitly close the result set. Failure to do so could cause garbage to accumulate on the server.
query
- the query in CycList form to askmt
- the microtheory in which the query should be askedqueryProperties
- the query properties to use when asking the querytimeoutMsecs
- the amount of time in milliseconds to wait before
giving up. A zero for this value means to wait forever.InferenceResultSet
which provides a convenient
mechanism for walking over results similar to java.sql.ResultSetCycConnectionException
- if a communication error occursInferenceResultSet executeQuery(FormulaSentence query, ElMt mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
Note: One should put this call in a try/finally statement and the finally statement should explicitly close the result set. Failure to do so could cause garbage to accumulate on the server.
query
- the query in FormulaSentence form to askmt
- the microtheory in which the query should be askedqueryProperties
- the query properties to use when asking the queryInferenceResultSet
which provides a convenient
mechanism for walking over results similar to java.sql.ResultSetCycConnectionException
- if a communication error occursInferenceResultSet executeQuery(FormulaSentence query, ElMt mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
Note: One should put this call in a try/finally statement and the finally statement should explicitly close the result set. Failure to do so could cause garbage to accumulate on the server.
query
- the query in FormulaSentence form to askmt
- the microtheory in which the query should be askedqueryProperties
- the query properties to use when asking the querytimeoutMsecs
- the amount of time in milliseconds to wait before
giving up. A zero for this value means to wait forever.InferenceResultSet
which provides a convenient
mechanism for walking over results similar to java.sql.ResultSetCycConnectionException
- if a communication error occursInferenceResultSet executeQuery(String query, Object mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
Note: One should put this call in a try/finally statement and the finally statement should explicitly close the result set. Failure to do so could cause garbage to accumulate on the server.
query
- the query in String form to askmt
- the microtheory in which the query should be asked (as a String, CycObject or ElMt)queryProperties
- the query properties to use when asking the querytimeoutMsecs
- the amount of time in milliseconds to wait before
giving up. A zero for this value means to wait forever.InferenceResultSet
which provides a convenient
mechanism for walking over results similar to java.sql.ResultSetCycConnectionException
- if a communication error occurscom.cyc.query.parameters.InferenceParameters getHLQueryProperties()
void initializeNamedInferenceProblemStore(String name, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
name
- the unique problem store namequeryProperties
- the given query properties or null if the defaults are to be usedCycConnectionException
boolean isQueryTrue(CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
query
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords
and values, or null if the defaults are to usedCycConnectionException
- if a communications error occursboolean isQueryTrue(FormulaSentence query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
query
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords
and values, or null if the defaults are to usedCycConnectionException
- if a communications error occursboolean isQueryTrue(CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
query
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords
and values, or null if the defaults are to usedtimeoutMsecs
- the time in milliseconds to wait before giving up,
set to zero in order to wait foreverCycConnectionException
- if a communications error occursboolean isQueryTrue(FormulaSentence query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
query
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords
and values, or null if the defaults are to usedtimeoutMsecs
- the time in milliseconds to wait before giving up,
set to zero in order to wait foreverCycConnectionException
- if a communications error occurs@Deprecated boolean isQueryTrue(CycList query, CycObject mt) throws CycConnectionException
query
- the query to be asked in the knowledge basemt
- the microtheory in which the query is askedCycConnectionException
- if cyc server host not found on the network@Deprecated boolean isQueryTrue_Cached(CycList query, CycObject mt) throws CycConnectionException
query
- the query to be asked in the knowledge basemt
- the microtheory in which the query is askedCycConnectionException
- if a data communication error occursString queryPropertiesToString(com.cyc.query.parameters.InferenceParameters queryProperties)
queryProperties
- the given query properties or null if the defaults are to be usedCycList<Object> queryVariable(CycVariable variable, CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
variable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to usedCycConnectionException
- if a communications error occursCycList<Object> queryVariable(CycVariable queryVariable, FormulaSentence query, CycObject mt) throws CycConnectionException
queryVariable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryCycConnectionException
- if a communications error occursCycList<Object> queryVariable(CycVariable queryVariable, FormulaSentence query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
queryVariable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to usedCycConnectionException
- if a communications error occursCycList<Object> queryVariable(CycVariable queryVariable, String query, Object mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
queryVariable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheory (given in String, CycObject or ElMt form)queryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to usedtimeoutMsecs
- CycConnectionException
- if a communications error occursCycList<Object> queryVariable(CycVariable variable, CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
variable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to usedtimeoutMsecs
- the amount of time in milliseconds to wait before giving up, set to
zero in order to wait forever.CycConnectionException
- if a communications error occursCycList<Object> queryVariable(CycVariable variable, FormulaSentence query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
variable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to usedtimeoutMsecs
- the amount of time in milliseconds to wait before giving up, set to
zero in order to wait forever.CycConnectionException
- if a communications error occursCycList queryVariable(CycVariable variable, CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, String inferenceProblemStoreName) throws CycConnectionException
variable
- the unbound variable for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to usedinferenceProblemStoreName
- the problem store nameCycConnectionException
- if a communications error occursCycList queryVariable(CycList query, CycVariable variable, CycObject mt) throws CycConnectionException
query
- the query to be asked in the knowledge basevariable
- the single unbound variable in the query for which bindings are soughtmt
- the microtheory in which the query is askedCycConnectionException
- if cyc server host not found on the networkCycList<Object> queryVariableLow(CycVariable queryVariable, InferenceResultSet rs) throws CycConnectionException
CycConnectionException
CycList<Object> queryVariables(CycList<CycVariable> variables, CycList<Object> query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
variables
- the list of unbound variables for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to be usedCycConnectionException
- if a communications error occursCycList<Object> queryVariables(CycList<CycVariable> variables, FormulaSentence query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties) throws CycConnectionException
variables
- the list of unbound variables for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to be usedCycConnectionException
- if a communications error occursCycList<Object> queryVariables(CycList<CycVariable> variables, String query, Object mt, com.cyc.query.parameters.InferenceParameters queryProperties, long timeoutMsecs) throws CycConnectionException
variables
- the list of unbound variables for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to be usedtimeoutMsecs
- CycConnectionException
- if a communications error occursCycList queryVariables(CycList queryVariables, CycList query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, String inferenceProblemStoreName) throws CycConnectionException
queryVariables
- the list of unbound variables for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to be usedinferenceProblemStoreName
- the problem store nameCycConnectionException
- if a communications error occursCycList queryVariables(CycList<CycVariable> queryVariables, FormulaSentence query, CycObject mt, com.cyc.query.parameters.InferenceParameters queryProperties, String inferenceProblemStoreName) throws CycConnectionException
queryVariables
- the list of unbound variables for which bindings are soughtquery
- the query expressionmt
- the inference microtheoryqueryProperties
- queryProperties the list of query property keywords and values, or null if the defaults are to be usedinferenceProblemStoreName
- the problem store nameCycConnectionException
- if a communications error occursCopyright © 2013–2018 Cycorp, Inc. All rights reserved.


WRONGFULLY ACCUSED (Warner Bros.) Starring: Leslie Nielsen, Richard Crenna, Melinda McGraw, Kelly LeBrock, Aaron Pearl, Michael York. Screenplay: Pat Proft. Producers: Pat Proft, James G. Robinson and Bernd Eichinger. Director: Pat Proft. MPAA Rating: PG-13 (sexual innuendo, profanity, adult themes) Running Time: 85 minutes. Reviewed by Scott Renshaw.
"Leslie Nielsen _is_ Leslie Nielsen" reads a tongue-in-cheek opening credit that opens WRONGFULLY ACCUSED, and no irony could be more bitter. Once upon a time Nielsen was a B-movie dramatic actor who re-invented himself as a deadpan comedian thanks to the Zucker-Abrahams-Zucker team, who cast him in AIRPLANE! and their television series "Police Squad!" Those successes led to three NAKED GUN films based on "Police Squad!", which in turn led to SPY HARD and MR. MAGOO. The one-time serious actor who used to play straight man so successfully against absurdist parody turned into a self-parody, mugging ever more shamelessly as he became typecast as the prat-falling dope.
You can expect more of the same -- Leslie Nielsen once again _as_ Leslie Nielsen -- in WRONGFULLY ACCUSED, the latest in a seemingly endless string of films this summer from ZAZ alumni. This one, written and directed by HOT SHOTS! and NAKED GUN co-scribe Pat Proft, casts Nielsen as Ryan Harrison, internationally renowned "Lord of the Violin." Seduced by a slinky temptress (Kelly LeBrock), Harrison ends up accused of the murder of millionaire Hibbing Goodhue (Michael York, looking like a Madame Tussaud figure of himself).
I don't know whether the strained comedy of WRONGFULLY ACCUSED would have seemed any fresher if it hadn't come hard on the heels of MAFIA! and BASEKETBALL, but it certainly doesn't help. Proft tries to keep the gags coming fast enough to obscure the tedium -- perhaps believing he can convince an audience that a hundred lame jokes add up to one decent one -- but the gags are worse than uninspired. They're uninspired and redundant, the kind of stuff that makes you suspect Proft and Jim Abrahams were sitting in a room together as they were hashing out this film and MAFIA!, respectively. How else to explain the fact that both films include a shot of a man leaving a lipstick print from a kiss, and a computer generated tongue emerging from someone's ear, and shots at Michael Flatley?
 Nielsen's performance merely compounds the misery. He has become such a flashing red light for self-defeating satire that he simply can't play the role he once played: the slack-faced observer of anarchy. Directors have decided it's easier to get the audience to laugh at Nielsen than it is to write anything funny to which he can react...or, more appropriately, _not_ react. WRONGFULLY ACCUSED features Nielsen at his least appealing, throwing out rolled eyes, grimaces and misguided reaction takes by the truckload.
I realize that subtlety has never been the forte of genre parody, but there are scattered moments when WRONGFULLY ACCUSED appears to have a decent idea that's not head-smackingly obvious. The best laugh, one I'm sure was unintentional, comes from the 30-second cameo by Sandra Bernhard which belies her prominent featuring in the credits. It seems like a clever jab at Julianne Moore's cutting-room-floor performance in THE FUGITIVE, especially when Nielsen refers to getting information from Bernhard's character in a scene we never see. It's probably too much to expect that level of insider satire to be sustained, especially when it's so much easier to have Nielsen bang his head on a low bridge while standing on the bow of the Titanic. That's about the level of humor you can expect when a film's number one comedic weapon is Leslie Nielsen _as_ Leslie Nielsen.
On the Renshaw scale of 0 to 10 Nielsen ratings: 2.
Visit Scott Renshaw's MoviePage http://www.inconnect.com/~renshaw/ *** Subscribe to receive new reviews directly by email! See the MoviePage for details, or reply to this message with subject line "Subscribe".
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends "generic.html" %} {% block webpage_title %} predictlybot | About {% endblock %} {% block content %}
predictlybot allows you to build, train, and classify your own sentences via a Web UI. predictlybot can also communicate with your applications through a RESTful API.
In other words, predictlybot aims to be a free, open sourced alternative to api.ai, luis.ai, and wit.ai
predictlybot turns words into meanings (with enough training data), for example:
Jack lives in Berlin -> {'person': 'Jack', 'location': 'Berlin'}
Tutu really likes bananas -> {'person': 'Tutu', 'food': 'bananas'}
Close the door -> {'action': 'close', 'object': 'door'}


Part 3
Objects
Objects allow us to describe an entity that has a complex structure, and more closely resembles something that exist in the real world.
Arrays and functions are both special types of objects in Javascript. We can also define our own objects to represent complex data structures.
Javascript objects have attributes - called 'properties', and things they can do - called 'methods'. For example, we can create an object that represents a dog in Javascript. It could have properties like 'colour' and 'breed', and methods like 'bark' and 'chaseCat'.
Objects are a data type that let us store a collection of properties and methods.
var objectName = {
propertyName: propertyValue,
propertyName: propertyValue
};
var shawn = {
hometown: "Dansville, NY",
age: 26,
hair: "blonde",
favorite_bands: [
"The Mountain Goats", "Timber Timbre", "Fleet Foxes"
]
};
Access properties using "dot notation":
var shawn = {
first_name: "Shawn",
last_name: "Biddle"
};
var name = shawn.first_name + ' ' + shawn.last_name;
Or using "bracket notation" (like arrays):
var first_name = shawn["first_name"];
Important! Non-existent properties will return undefined:
var middle_name = shawn["middle_name"];
Dot notation is typically used when you know the property name (e.g., person.first_name
)
Array notation is typically used when the property name has special characters (spaces, dashes, etc) or if you want to reference it by variable
var shawn = {
name: "Shawn",
"favorite color": "red"
};
// shawn.favorite color wouldn't work because there's a space
var color = shawn["favorite color"]; // red
var lookup_property = "favorite color";
var color = shawn[lookup_property]; // red
Use dot or bracket notation with the assignment operator to change objects.
Change existing properties:
var shawn = {
hometown: "Dansville, NY",
favorite_color: "red"
};
shawn.favorite_color = "green";
var setting_property = "hometown";
shawn[setting_property] = "Anytown, USA";
Or add new properties:
shawn.money = 1000000;
You can also delete properties:
delete shawn.student_loans;
Since arrays can hold any data type, they can also hold objects:
var bands = [
{
name: "The Mountain Goats",
members: ["John Darnielle"]
},
{
name: "Fleet Foxes",
members: ["Robin Pecknold", "J Tillman"]
}
];
for (var i = 0; i < bands.length; i++) {
var band = bands[i];
console.log('The members of ' + band.name + ' are ' + band.members.join(', '));
}
Just like other data types, objects can be passed into functions:
var lizzieTheCat = {
age: 18,
furColor: "grey",
likes: ["catnip", "milk"],
birthday: {month: 7, day: 17, year: 1994}
}
function describeCat(cat) {
console.log("This cat is " + cat.age + " years old with " + cat.furColor + " fur.");
}
describeCat(lizzieTheCat);
If you get stuck, raise your hand.
Object properties can also be functions. Object functions are called "methods".
var lizzieTheCat = {
age: 18,
furColor: "grey",
meow: function() {
console.log("meowww");
}
};
Call object methods using dot notation:
lizzieTheCat.meow();
Everything in javascript is an object: numbers, strings, booleans, functions
Javascript also has built in libraries to use, some of which we've seen already
this
this
is how we do it. this
is the way you reference the current object inside of itself
this
var person = {
name: "Shawn",
greet: function ()
{
console.log("Hi, I'm " + this.name);
}
};
person.greet(); // Hi, I'm Shawn
person.name = "Test";
person.greet(); // Hi, I'm Test
If you get stuck, raise your hand.


TripWithUs!
Home
About Us
Sign Up
Logout
List of Destinations
{{ book.isbn }}
Budget: {{ book.author }}
Activity: {{ book.title }}


Ocala events
-
mens ruffled shirts chicago
longtime professor joins the accountancy Hall of fame
touched the lives of more than 10,000 . PwC part- ner, I am pleased to help in this effort and to work with current PwC . ing analysis and decision making and first place in marketing concepts. Matt . tained closest to the pin, and Andy Cates .
http://www.olemiss.edu/depts/accountancy/newsletters/fall2010.pdfVicki Keiser | LinkedIn
Deloitte. Privately Held; 10,001+ employees; Management Consulting industry . expertise requests; business deals; reference requests; getting back in touch .
http://www.linkedin.com/pub/vicki-keiser/15/25b/596Student Scholarship Recipients - Gonzaga University
Oct 25, 2012 . Dean Clarence H. Barnes, Leah Brajcich, Rebecca A. Cates, Kenneth Devones, Maureen Duclos, Stacy Harrington, Timothy Henderson . KPMG. Carly McPherson. Moss Adams Foundation. Richard Long . Industry, touched on Centioli's experiences as he . Finance: Kent Hickman, Matthew McPherson, .
http://www.gonzaga.edu/academics/colleges+and+schools/School-of-Business-Administration/Office-of-the-Dean/digest/FinalFall2012Digest.pdf
prc free books google Upcoming events in Ocala
line 6 floor board Hottest Tickets
-
Apr 113 4 gram packet
Amway Center -
Apr 281603 north nimitz highway honolulu
Amway Center -
Jun 25home
Bob Carr Performing Arts Center -
Mar 30how to manage managers
Amway Center -
Aug 27used restaurant equipment tulsa ok
Amway Center -
Jun 21choosing a heart monitors
Amway Center -
Sep 13gardening fairy cake kit
Francis Field -
Mar 17assasins creed 2 maps
St Augustine Amphitheatre -
Oct 8aireator and fertilizer north idaho
Amway Center -
May 4gold script monogram rings
Bob Carr Performing Arts Center
Ocala's best venues
-
News Articles
Bersin by Deloitte · Register|Sign . By Matt McAllister. Institute of Leadership . By Anne Kates Smith Tulsa World. Oct 28 . HRZone. July 2009, Touch of Gray .
http://www.bersin.com/news/newsarticles.aspx?id=108 -
Thomas Delegram | LinkedIn
Thomas Delegram. SR. Manager at Deloitte & Touche . Deloitte. Privately Held; 10,001+ employees; Management Consulting industry. April 2005 Present (7 .
http://www.linkedin.com/pub/thomas-delegram/b/a90/a76 -
North American Port Analysis: Beyond Post-Panamax Basics to ...
portfolio management and asset advisory capacities for Deloitte & Touche, . cates trade and global commerce). . States Maritime Alliance, NRF President Matthew Shay . also has a delicate engineering touch when it maneuvered .
http://www.cre.org/memberdata/pdfs/North_American_Port_Analysis.pdfnewcastle amsterdam cheap flights
98 people's favorite
-
Southern Petrochemical Industries Corporation Limited
Dec 29, 2011 . Deloitte Haskins & Sells . lenders (included in the Finance Cost) and provision for MAT . from import touching an all time high has affected the market. BIFR . consolidation of shares and issue of duplicate share certi?cates .
http://spic.in/downloads/Archives/Annual%20reports/SPIC%20annual%20report%20FY%202011-12/SPIC_Annual%20Report%202011-12.pdf -
Doppler1000 News From Courthouse News Page 3
Judges Melissa Chapman and Bruce Stewart concurred with Cates on the opinion. . rooms without changing lab coats, who were touching non-sterile items while wearing their . Deloitte meanwhile filed to extend it, claiming that the 2012 lawsuit . McCoy says when she met with Matthew Wright, "the attorney the district .
http://www.doppler1000.com/sources.cfm/courthouse-news-73/page3/


Our notable fauna 🐾
Our long-necked beauties~
No child can resist petting them! They are, of course, giraffes!
With their elegant necks, these graceful creatures are beloved by all. You could spend days watching them munch peacefully on our very own zoo-grown acacia trees.
Surrounded by adults and kids alike, we are pleased to say that they are one of the Dehiwala Zoo's best additions!
They roar and they snore~
You can't live in Sri Lanka and not see our very own, native Sri Lankan leopards! These fiesty wild cats may not purr, but they can sure melt your heart!
Might be a bit controversial, but it's safe to say that a crowd favourite, is not the leopard itself, but their cubs! Their sheer adorableness might make you unwittingly spend the whole day at their exhibit!

Take a ssssssecretive look at our new, descriptive pages for the famous anaconda!
The first one's here and you can click this for the second one! 🐍
Our notable flora 🌸
Image |
Name |
Features |
Benefits |
| Binara |
|
|
|
| Kohomba |
|
|
|
| Ironweed |
|
|
|
| For more information on our indigenous plants, take a look at the official Ayurvedic Plants webpage. |


displays a seamless progression of changes applied to a component or element over time. for example, a switch can move smoothly across a screen by tweening to its position, or a floating action button (FAB) can transform into a card by tweening FAB size and corner radius.


Florida woman arrested after friends' night out takes deadly turn: reports
by Talia KaplanA Florida woman was arrested in connection with a deadly shooting Saturday that followed a group outing for a movie and drinks, according to reports.
Yvonne Serrano, 51, allegedly shot and killed the victim, identified as Daniela Tabares Maya, 21, of Coral Springs, Fla., early Saturday morning and called 911, police said.
Officers were dispatched to Serrano’s home after she reported a woman was dead in her driveway. When officers arrived they found Maya with a gunshot wound, police said.
Serrano reportedly told investigators she did not know the victim but later said she did.
FLORIDA MAN ARRESTED IN GIRLFRIEND'S MURDER AFTER BODY FOUND IN CAR TRUNK, POLICE SAY
An investigation led to Serrano's arrest, Coral Springs police said.
Serrano and Maya were part of a group outing on Friday, Miami's WPLG-TV reported, citing police.
Serrano, who hails from Panama, had gone to see a movie Friday night with Maya and others from their gym, The Sun Sentinel of South Florida reported, adding that the group then walked down the road to a bar.
After several hours at the bar, Maya drove Serrano home, WPLG reported, adding that surveillance video showed them pull into the driveway at 2 a.m. Saturday.
Serrano called 911 at 5:55 a.m. and before calling, she allegedly deleted Ring camera footage and washed her clothes, police said. Serrano also told police she had blacked out and couldn’t remember how she got home, the station reported.
Police spent most of Saturday collecting evidence in the neighborhood, according to reports.
FLORIDA MAN HAD METH 'WEDGED DEEP WITHIN' BELLY BUTTON, COPS SAY
Some neighbors said investigators came to their home, looking for surveillance video, the news outlet reported.
After obtaining search warrants, police reportedly found a handgun inside Serrano’s home and said it matched the shell casing found inside Maya’s car. Both the gun and holster had blood on them, the station reported.
Serrano was charged with second-degree murder and tampering with physical.
CLICK HERE TO GET THE FOX NEWS APP
A crowdsourcing page set up in memory of the victim described her as loving and selfless.
“Daniela is an inspiration. She is the shining example of what the best of us can only try to be. It shines through in the joy, laughter and loving sassiness she shared with us,” the page read. “It shines through in the boundless love she gave us and the selfless care she took for the people around her. We cannot measure her loss.”
Coral Springs, Fla., is about one hour from Miami.


Fundamentals of
Data Analytics and
Predictions
SVM
Xi (Rossi) LUO
Department of Biostatistics and Data Science
School of Public Health
The University of Texas Health Science Center at Houston
Linear Separator—1
Linear Separator—2
Linear Separator—3
Support Vector Machines
- Here we approach the two-class classification problem in a direct way:
- We try and find a plane that separates the classes in feature space
- If we cannot, we get creative in two ways:
- We soften what we mean by “separates”, and
- We enrich and enlarge the feature space so that separation is possible
What is a Hyperplane?
- A hyperplane in p dimensions is a flat affine subspace of dimension p − 1
- In general the equation for a hyperplane has the form
$\beta_0+\beta_1X_1+\beta_2X_2+...\beta_pX_p=0$
- In p = 2 dimensions a hyperplane is a line
- If $\beta_0$=0, the hyperplane goes through the origin
- The vector $\beta$=($\beta_1,\beta_2...\beta_p$) is called the normal vector
- It points in a direction orthogonal to the surface of a hyperplane
Hyperplane in 2 Dimensions
Separating Hyperplanes
- If $f(x)=\beta_0+\beta_1X_1+\beta_2X_2+...\beta_pX_p$, then $f(X) \gt 0$ for points on one side
of
the hyperplane, and $f(X) \lt 0$ for points on the other
- If we code the colored points as $Y_i=+1$ for blue, say, and $Y_i=−1$ for mauve, then if
$Y_i∙f(𝑋)\gt 0$ for all i, $f(𝑋)=0$ defines a separating hyperplane
Maximal Margin Classifier
- Among all separating hyperplanes, find the one that makes the biggest gap or margin between
the two classes
- Constrained optimization problem
$$ \max_{\beta_0,\beta_1,...\beta_p} M $$ subject to
$\sum_{j=1}^{p}{\beta_j}^2=1, y_i(\beta_0+\beta_1x_{i1}+...\beta_px_{ip})\geq M $for all i
=1,...M
- The function svm() in package e1071 solves this problem efficiently
Non-Separable Data
- What if the data are not separable by a linear boundary?
Noisy Data
-
Sometimes the data are separable, but noisy leads to poor solution for the maximal-margin
classifier
- The support vector classifier maximizes a soft margin.
Support Vector Classifier
$$ \max_{\beta_0,\beta_1,...\beta_p} M \quad
\text{subject to:}
\sum_{j=1}^{p}{\beta_j}^2=1 \\
y_i(\beta_0+\beta_1x_{i1}+...\beta_px_{ip})\geq M(1-\epsilon_i) \\
\epsilon\geq0, \quad \sum_{i=1}^{n}{\epsilon_i}\le C
$$
C is a Regularization Parameter
Linear Parameter Can Fail
- Sometimes a linear boundary simply won’t work, no matter what value of C
- What to do?
Feature Expansion
-
Enlarge the space of features by including transformations;
e.g. $𝑋^2,𝑋^3, 𝑋_1 𝑋_2,𝑋_1 𝑋^2$...
- Fit a support-vector classifier in the enlarged space
- This results in non-linear decision boundaries in the original space
- Example:
- Suppose we use $(X_1,X_2,X_1^2,X_2^2,X_1X_2)$ instead of just $(X_1,X_2)$ then the decision
boundary would be of the form,
$\beta_0+\beta_1X_1+\beta_2X_2+\beta_3X_1^2+\beta_4X_2^2+\beta_5X_1X_2=0$
- This leads to nonlinear decision boundaries in the original space
Feature Expansion
- Datasets that are linearly separable work out great:
- But what are we going to do if the dataset is just too hard?
- How about … mapping data to a higher-dimensional space:
Non-Linear SVMs: Feature Spaces
- General idea: the original feature space can always be mapped to some higher-dimensional feature
space where the training set is separable:
Cubic Polynomials
- Here we use a basis expansion of cubic polynomials
- The support-vector classifier in the enlarged space solves the problem in the lower-dimensional
space
-
$\beta_0+\beta-1X_1+\beta_2X_2+\beta_3X_1^2+\beta_5X_1X_2+\beta_6X_1^3+$$\beta_7X_2^3+\beta_8X_1X_2^2+\beta_9X_1^2X_2$
Nonlinearities and Kernels
- Polynomials (high-dimensional)
- There is a more elegant and controlled way to introduce nonlinearities in support-vector
classifiers — through the use of kernels
- Before we discuss these, we must understand the role of inner products in support-vector
classifiers.
Inner Products and Support Vectors
-
<$x_i,x_{i'}$>=$\sum_{j=1}^{p}x_{ij}x_{i'j}$-inner product between vectors
- The linear support vector classifier can be represented as
$f(x)=\beta_0+\sum_{i=1}^{n}\alpha_i$ <$x,x_i$> -n parameters
- To estimate the parameters $\alpha-1,...\alpha_n$ and $\beta_0$, all we need are the ${n
\choose 2}$ inner products ($x,x_i$) between all pairs of training observations
- It turns out that most of the 𝛼 ̂_𝑖 can be zero: $f(x)=\beta_0+\sum_{i \in
S}^{n}\hat{\alpha_i}$<$x,x_i$>
- where S is the support set of indices i such that $\hat{\alpha_i}>0$
Kernels and Support Vector Machines
- If we can compute inner-products between observations, we can fit a SV classifier
- Some special kernel functions can do this for us e.g.
$K(x_i,x_{i'})={(1+\sum_{j=1}^{p}x_{ij}x_{i'j})^d}$
- Computes the inner-products needed for d dimensional polynomials
- The solution has the form
$f(x)=\beta_0+\sum_{i \in S}\hat{\alpha_i}K(x,x_i)$
The Radial Kernel
- Implicit feature space; very high dimensional
$K(x_i,x_{i'})=e^{-\gamma\sum_{j=1}^{p}(x_{ij}-x_{i'j})^2}$
$f(x)=\beta_0+\sum_{i \in S}\hat{\alpha_i}K(x,x_i)$
Example: Heart Data
- ROC curve is obtained by changing the threshold 0 to threshold t in 𝑓 ̂(𝑋)>𝑡 and recording
false positive and true positive rates as t varies
- Here we see ROC curves on training data
Example Continued: Heart Data
- Here we see ROC curves on testing data
SVMs: More than 2 classes?
- The SVM as defined works for K = 2 classes. What do we do if we have K > 2 classes?
- One versus All:
- Fit K different 2-class SVM classifiers $f_k(x),k=1,...K$; each class versus the rest
- Classify $X^*$ to the class for which $\hat{f_k}(x^*)$ is largest
- One versus One: Fit all ${k\choose 2}$ pairwise classifiers $\hat{f_k}(x)$
- Classify $x^*$ to the class that wins the most pairwise competitions
- Which to choose?
- If K is not too large, use One versus One
Which to Use: SVM or Logistic Regression?
- When classes are (nearly) separable, SVM does better than Logistic Regression. So does LDA
- When not, Logistic Regression (with ridge penalty) and SVM are very similar
- If you wish to estimate probabilities, Logistic Regression is the choice
- For nonlinear boundaries, kernel SVMs are popular


QUIZ SHOW A film review by Ben Hoffman Copyright 1994 Ben Hoffman
It is not often that one is fortunate enough to see a movie that has a good story, exceptional acting, not only by the film's stars but all the supporting cast, and also has great direction. All of these are found in this gripping, emotional film, and what a treat that is for the moviegoer.
Everyone probably remembers or has heard of the quiz show, "Twenty-One," that swept the country's TV viewers in the mid-1950s, and of the accompanying scandal when it was found the program was rigged with some of the contestants being given the answers. That it also involved the son of a most distinguished intellectual family added further drama. Despite our knowing that story, it in no way diminishes the excitement of the film. This, again, is due to the fine direction and to its superb cast.
Herbie Stempel (John Turturro) is the man the show's producers ask to miss a question when they feel he has outlived his popularity as the show's top winner. Turturro is perfect as he rages over being dropped, and with the further ignominy over a question to which he (and everyone else) knew the answer.
Dick Goodwin (Rob Morrow) is the attorney who tenaciously sought to find out if and how the program was rigged, and present it to the Congressional Committee on Legislative Oversight. Charles Van Doren (Ralph Fiennes), who rose to fame as the contestant who won the most money; his father, poet and critic, Mark Van Doren, (Paul Scofield); Quiz Show producer Dan Enright (David Paymer); and Jack Barry (Christopher McDonald) the show's Host, all give wonderful performances.
Look for many nominations from Quiz Show come Oscar time, for Best Movie, Best Acting by leads and supporters, and Best Direction. One extraordinary film!
Directed by Robert Redford.
4 Big Bytes 4 Bytes = Absolutely must see. 3 Bytes = Too good to be missed. 2 Bytes = So so. 1 Byte = Save your money.
Ben Hoffman
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Since 2015-06-17, if you're a Linux user, you can use the s6-linux-init package to help you do so! Please read this documentation page first, though, it will help you understand what s6-linux-init does.
It is possible to run s6-svscan as process 1, i.e. the init process. However, that does not mean you can directly boot on s6-svscan; that little program cannot do everything your stock init does. Replacing the init process requires a bit of understanding of what is going on.
Okay, it's actually four, but the fourth stage is an implementation detail that users don't care about, so we'll stick with three.
The life of a Unix machine has three stages. Yes, three.
Unless you're implementing a shutdown procedure over a supervision tree, you can absolutely consider that the hardware shutdown is part of stage 3.
As you can see, process 1's duties are radically different from one stage to the next, and init has the most work when the machine is booting or shutting down, which means a normally negligible fraction of the time it is up. The only common thing is that at no point is process 1 allowed to exit.
Still, all common init systems insist that the same init executable must handle these three stages. From System V init to launchd, via busybox init, you name it - one init program from bootup to shutdown. No wonder those programs, even basic ones, seem complex to write and complex to understand!
Even the runit program, designed with supervision in mind, remains as process 1 all the time; at least runit makes things simple by clearly separating the three stages and delegating every stage's work to a different script that is not run as process 1. (Since runit does not distinguish between stage 3 and stage 4, it needs very careful handling of the kill -9 -1 part of stage 3: getting /etc/runit/3 killed before it unmounts the filesystems would be bad.)
One init to rule them all? It ain't necessarily so!
init does not have the right to die, but fortunately, it has the right to execve()! During stage 2, why use precious RAM, or at best, swap space, to store data that are only relevant to stages 1 or 3-4? It only makes sense to have an init process that handles stage 1, then executes into an init process that handles stage 2, and when told to shutdown, this "stage 2" init executes into a "stage 3" init which just performs shutdown. Just as runit does with the /etc/runit/[123] scripts, but exec'ing the scripts as process 1 instead of forking them.
It becomes clear now that s6-svscan is perfectly suited to exactly fulfill process 1's role during stage 2.
However, an init process for stage 1 and another one for stage 3 are still needed. Fortunately, those processes are very easy to design! The only difficulty here is that they're heavily system-dependent, so it's not possible to provide a stage 1 init and a stage 3 init that will work everywhere. s6 was designed to be as portable as possible, and it should run on virtually every Unix platform; but outside of stage 2 is where portability stops.
The s6-linux-init package provides a tool, s6-linux-init-maker, to automatically create a suitable stage 1 init (so, the /sbin/init binary) for Linux. It is also possible to write similar tools for other operating systems, but the details are heavily system-dependent.
For the adventurous and people who need to do this by hand, though, here are are some general design tips.
Unlike the /etc/runit/1 script, an init-stage1 script running as process 1 has nothing to back it up, and if it fails and dies, the machine crashes. Does that mean the runit approach is better? It's certainly safer, but not necessarily better, because init-stage1 can be made extremely small, to the point it is practically failproof, and if it fails, it means something is so wrong that you would have had to reboot the machine with init=/bin/sh anyway.
To make init-stage1 as small as possible, only this realization is needed: you do not need to perform all of the one-time initialization tasks before launching s6-svscan. Actually, once init-stage1 has made it possible for s6-svscan to run, it can fork a background "init-stage2" process and exec into s6-svscan immediately! The "init-stage2" process can then pursue the one-time initialization, with a big advantage over the "init-stage1" process: s6-svscan is running, as well as a few vital services, and if something bad happens, there's a getty for the administrator to log on. No need to play fancy tricks with /dev/console anymore! Yes, the theoretical separation in 3 stages is a bit more flexible in practice: the "stage 2" process 1 can be already running when a part of the "stage 1" one-time tasks are still being run.
Of course, that means that the scan directory is still incomplete when s6-svscan first starts, because most services can't yet be run, for lack of mounted filesystems, network etc. The "init-stage2" one-time initialization script must populate the scan directory when it has made it possible for all wanted services to run, and trigger the scanner. Once all the one-time tasks are done, the scan directory is fully populated and the scanner has been triggered, the machine is fully operational and in stage 2, and the "init-stage2" script can die.
It is very possible, and if you are attempting to write your own stage 1, I definitely recommend it. If you are using s6-svscan as stage 2 init, stage 1 init should be simple enough that it can be written in any scripting language you want, just as /etc/runit/1 is if you're using runit. And since it should be so small, the performance impact will be negligible, while maintainability is enhanced. Definitely make your stage 1 init a script.
Of course, most people will use the shell as scripting language; however, I advocate the use of execline for this, and not only for the obvious reasons. Piping s6-svscan's stderr to a logging service before said service is even up requires some tricky fifo handling that execline can do and the shell cannot.
If you're using s6-svscan as stage 2 init on /run/service, then stage 3 init is naturally the /run/service/.s6-svscan/finish program. Of course, /run/service/.s6-svscan/finish can be a symbolic link to anything else; just make sure it points to something in the root filesystem (unless your program is an execline script, in which case it is not even necessary).
This is seemingly very simple, even simpler than stage 1, but experience shows that it's trickier than it looks.
One tricky part is the kill -9 -1 operation at the end of stage 3: you must make sure that process 1 regains control and keeps running after it, because it will be the only process left alive. If you are running a stage 3 script as process 1, it is almost automatic: your script survives the kill and continues running, up into stage 4. If you are using another model, the behaviour becomes system-dependent: your script may or may not survive the kill, so on systems where it does not, you will have to design a way to regain control in order to accomplish stage 4 tasks.
Another tricky part, that is only apparent with practice, is solidity. It is even more vital that nothing fails during stages 3 and 4 than it is in stage 1, because in stage 1, the worst that can happen is that the machine does not boot, whereas in stages 3 and 4, the worst that can happen is that the machine does not shut down, and that is a much bigger issue.
For these reasons, I now recommend not tearing down the supervision tree for stages 3-4. It is easier to work in a stable environment, as a regular process, than it is to manage a whole shutdown sequence as pid 1: the presence of s6-svscan as pid 1, and of a working supervision tree, is a pillar you can rely on, and with experience I find it a good idea to keep the supervision infrastructure running until the end. Of course, that requires the scandir, and the active supervision directories, to be on a RAM filesystem such as tmpfs; that is good policy anyway.
Yes, definitely, just like stage 1.
However, you really should leave /run/service/.s6-svscan/finish (and the other scripts in /run/service/.s6-svscan) alone, and write your shutdown sequence without dismantling the supervision tree. You will still have to stop most of the services, but s6-svscan should stay. For a more in-depth study of what to do in stages 3-4 and how to do it, you can look at the source of s6-linux-init-shutdownd in the s6-linux-init package.
When the Unix kernel launches your (stage 1) init process, it does it with descriptors 0, 1 and 2 open and reading from or writing to /dev/console. This is okay for the early boot: you actually want early error messages to be displayed to the system console. But this is not okay for stage 2: the system console should only be used to display extremely serious error messages such as kernel errors, or errors from the logging system itself; everything else should be handled by the logging system, following the logging chain mechanism. The supervision tree's messages should go to the catch-all logger instead of the system console. (And the console should never be read, so no program should run with /dev/console as stdin, but this is easy enough to fix: s6-svscan will be started with stdin redirected from /dev/null.)
The catch-all logger is a service, and we want every service to run under the supervision tree. Chicken and egg problem: before starting s6-svscan, we must redirect s6-svscan's output to the input of a program that will only be started once s6-svscan is running and can start services.
There are several solutions to this problem, but the simplest one is to use a FIFO, a.k.a. named pipe. s6-svscan's stdout and stderr can be redirected to a named pipe before s6-svscan is run, and the catch-all logger service can be made to read from this named pipe. Only two minor problems remain:
This second point cannot be solved in a shell script, and that is why you are discouraged to write your stage 1 init script in the shell language: you cannot properly set up a FIFO output for s6-svscan without resorting to horrible and unreliable hacks involving a temporary background FIFO reader process.
Instead, you are encouraged to use the execline language - or, at least, the redirfd command, which is part of the execline distribution. The redirfd command does just the right amount of trickery with FIFOs for you to be able to properly redirect process 1's stdout and stderr to the logging FIFO without blocking: redirfd -w 1 /run/service/s6-svscan-log/fifo blocks if there's no process reading on /run/service/s6-svscan-log/fifo, but redirfd -wnb 1 /run/service/s6-svscan-log/fifo does not.
This trick with FIFOs can even be used to avoid potential race conditions in the one-time initialization script that runs in stage 2. If forked from init-stage1 right before executing s6-svscan, depending on the scheduler mood, this script may actually run a long way before s6-svscan is actually executed and running the initial services - and may do dangerous things, such as writing messages to the logging FIFO before there's a reader, and eating a SIGPIPE and dying without completing the initialization. To avoid that and be sure that s6-svscan really runs and initial services are really started before the stage 2 init script is allowed to continue, it is possible to redirect the child script's output (stdout and/or stderr) once again to the logging FIFO, but in the normal way without redirfd trickery, before it execs into the init-stage2 script. So, the child process blocks on the FIFO until a reader appears, while process 1 - which does not block - execs into s6-svscan and starts the logging service, which then opens the logging FIFO for reading and unblocks the child process, which then runs the initialization tasks with the guarantee that s6-svscan is running.
It really is simpler than it sounds. :-)
This whole page may sound very theoretical, dry, wordy, and hard to grasp without a live example to try things on; unfortunately, s6 cannot provide live examples without becoming system-specific.
However, the s6-linux-init package provides you with the s6-linux-init-maker command, which produces a set of working scripts, including a script that is suitable as /sbin/init, for you to study and edit. You can run the s6-linux-init-maker command even on non-Linux systems: it will produce scripts that do not work as is for another OS, but can still be used for study and as a basis for a working stage 1 script.


(L24|my-anti-resume.md) TODO: Maybe I can keep these to two categories? I might not need categories at all. Maybe a kanban-style? Maybe hook into Trello? Maybe make my own Trello for this?
Should list
be a raw list of items? It could also be a database which is the item with some more relevant information. Example:
| Item | Directory | Items (recursively?) | Last updated |
|---|---|---|---|
| Emacs | Emacs | 1 | 2015-12-12 |
| Git | git-scm | 15 | 2016-01-04 |
| REST | REST | 0 | 2015-12-12 |
Although this is essentially just making a file system within git, within a file system, it could be useful? maybe?
I should have some hook/daemon/something that identifies duplicates.
Functional implementations of various things.
Things like "Baby's First Garbage Collector" (http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/) and other examples that mostly are written in an imperative style. It could be a series of examples written in different languages, both ones that embrace the functional style and those that aren't typically thought of as functional languages (Java, C#, even C?).
Ian is riding a taste sensation.
I'd like to set up mirrors on bitbucket and possibly gitlab.
I'd like to start using GitHub Issues for some things. I don't know how this works in with having mirrors as noted above.
I want to figure out a way to potentially break off certain projects to standalone repos (such as the VM implemented in Python). It's important I keep git history with the project (does this mean I'll need to manually select relevant commits or something? How would this work?).