1 Basic Caching
This is an introduction to the three types of caching techniques that Rails provides by default without the use of any third party plugins.
To start playing with testing you’ll want to ensure that config.action_controller.perform_caching is set to true if you’re running in development mode. This flag is normally set in the corresponding config/environments/*.rb and caching is disabled by default for development and test, and enabled for production.
config.action_controller.perform_caching = true
1.1 Page Caching
Page caching is a Rails mechanism which allows the request for a generated page to be fulfilled by the webserver (i.e. apache or nginx), without ever having to go through the Rails stack at all. Obviously, this is super-fast. Unfortunately, it can’t be applied to every situation (such as pages that need authentication) and since the webserver is literally just serving a file from the filesystem, cache expiration is an issue that needs to be dealt with.
So, how do you enable this super-fast cache behavior? Simple, let’s say you have a controller called ProductsController and an index action that lists all the products
class ProductsController < ActionController
caches_page :index
def index
@products = Products.all
end
end
The first time anyone requests /products, Rails will generate a file called products.html and the webserver will then look for that file before it passes the next request for /products to your Rails application.
By default, the page cache directory is set to Rails.public_path (which is usually set to the public folder) and this can be configured by changing the configuration setting config.action_controller.page_cache_directory. Changing the default from public helps avoid naming conflicts, since you may want to put other static html in public, but changing this will require web server reconfiguration to let the web server know where to serve the cached files from.
The Page Caching mechanism will automatically add a .html extension to requests for pages that do not have an extension to make it easy for the webserver to find those pages and this can be configured by changing the configuration setting config.action_controller.page_cache_extension.
In order to expire this page when a new product is added we could extend our example controller like this:
class ProductsController < ActionController
caches_page :index
def index
@products = Products.all
end
def create
expire_page :action => :index
end
end
If you want a more complicated expiration scheme, you can use cache sweepers to expire cached objects when things change. This is covered in the section on Sweepers.
Note: Page caching ignores all parameters. For example /products?page=1 will be written out to the filesystem as products.html with no reference to the page parameter. Thus, if someone requests /products?page=2 later, they will get the cached first page. Be careful when page caching GET parameters in the URL!
Page caching runs in an after filter. Thus, invalid requests won’t generate spurious cache entries as long as you halt them. Typically, a redirection in some before filter that checks request preconditions does the job.
1.2 Action Caching
One of the issues with Page Caching is that you cannot use it for pages that require to restrict access somehow. This is where Action Caching comes in. Action Caching works like Page Caching except for the fact that the incoming web request does go from the webserver to the Rails stack and Action Pack so that before filters can be run on it before the cache is served. This allows authentication and other restriction to be run while still serving the result of the output from a cached copy.
Clearing the cache works in the exact same way as with Page Caching.
Let’s say you only wanted authenticated users to call actions on ProductsController.
class ProductsController < ActionController
before_filter :authenticate
caches_action :index
def index
@products = Product.all
end
def create
expire_action :action => :index
end
end
You can also use :if (or :unless) to pass a Proc that specifies when the action should be cached. Also, you can use :layout => false to cache without layout so that dynamic information in the layout such as logged in user info or the number of items in the cart can be left uncached. This feature is available as of Rails 2.2.
You can modify the default action cache path by passing a :cache_path option. This will be passed directly to ActionCachePath.path_for. This is handy for actions with multiple possible routes that should be cached differently. If a block is given, it is called with the current controller instance.
Finally, if you are using memcached, you can also pass :expires_in. In fact, all parameters not used by caches_action are sent to the underlying cache store.
Action caching runs in an after filter. Thus, invalid requests won’t generate spurious cache entries as long as you halt them. Typically, a redirection in some before filter that checks request preconditions does the job.
1.3 Fragment Caching
Life would be perfect if we could get away with caching the entire contents of a page or action and serving it out to the world. Unfortunately, dynamic web applications usually build pages with a variety of components not all of which have the same caching characteristics. In order to address such a dynamically created page where different parts of the page need to be cached and expired differently Rails provides a mechanism called Fragment Caching.
Fragment Caching allows a fragment of view logic to be wrapped in a cache block and served out of the cache store when the next request comes in.
As an example, if you wanted to show all the orders placed on your website in real time and didn’t want to cache that part of the page, but did want to cache the part of the page which lists all products available, you could use this piece of code:
<% Order.find_recent.each do |o| %>
<%= o.buyer.name %> bought <% o.product.name %>
<% end %>
<% cache do %>
All available products:
<% Product.all.each do |p| %>
<%= link_to p.name, product_url(p) %>
<% end %>
<% end %>
The cache block in our example will bind to the action that called it and is written out to the same place as the Action Cache, which means that if you want to cache multiple fragments per action, you should provide an action_suffix to the cache call:
<% cache(:action => 'recent', :action_suffix => 'all_products') do %>
All available products:
and you can expire it using the expire_fragment method, like so:
expire_fragment(:controller => 'products', :action => 'recent', :action_suffix => 'all_products')
If you don’t want the cache block to bind to the action that called it, You can also use globally keyed fragments by calling the cache method with a key, like so:
<% cache('all_available_products') do %>
All available products:
<% end %>
This fragment is then available to all actions in the ProductsController using the key and can be expired the same way:
expire_fragment('all_available_products')
1.4 Sweepers
Cache sweeping is a mechanism which allows you to get around having a ton of expire_{page,action,fragment} calls in your code. It does this by moving all the work required to expire cached content into an ActionController::Caching::Sweeper subclass. This class is an observer and looks for changes to an object via callbacks, and when a change occurs it expires the caches associated with that object in an around or after filter.
Continuing with our Product controller example, we could rewrite it with a sweeper like this:
class ProductSweeper < ActionController::Caching::Sweeper
observe Product # This sweeper is going to keep an eye on the Product model
# If our sweeper detects that a Product was created call this
def after_create(product)
expire_cache_for(product)
end
# If our sweeper detects that a Product was updated call this
def after_update(product)
expire_cache_for(product)
end
# If our sweeper detects that a Product was deleted call this
def after_destroy(product)
expire_cache_for(product)
end
private
def expire_cache_for(product)
# Expire the index page now that we added a new product
expire_page(:controller => 'products', :action => 'index')
# Expire a fragment
expire_fragment('all_available_products')
end
end
You may notice that the actual product gets passed to the sweeper, so if we were caching the edit action for each product, we could add an expire method which specifies the page we want to expire:
expire_action(:controller => 'products', :action => 'edit', :id => product)
Then we add it to our controller to tell it to call the sweeper when certain actions are called. So, if we wanted to expire the cached content for the list and edit actions when the create action was called, we could do the following:
class ProductsController < ActionController
before_filter :authenticate
caches_action :index
cache_sweeper :product_sweeper
def index
@products = Product.all
end
end
1.5 SQL Caching
Query caching is a Rails feature that caches the result set returned by each query so that if Rails encounters the same query again for that request, it will use the cached result set as opposed to running the query against the database again.
For example:
class ProductsController < ActionController
def index
# Run a find query
@products = Product.all
...
# Run the same query again
@products = Product.all
end
end
The second time the same query is run against the database, it’s not actually going to hit the database. The first time the result is returned from the query it is stored in the query cache (in memory) and the second time it’s pulled from memory.
However, it’s important to note that query caches are created at the start of an action and destroyed at the end of that action and thus persist only for the duration of the action. If you’d like to store query results in a more persistent fashion, you can in Rails by using low level caching.
2 Cache Stores
Rails provides different stores for the cached data created by action and fragment caches. Page caches are always stored on disk.
Rails 2.1 and above provide ActiveSupport::Cache::Store which can be used to cache strings. Some cache store implementations, like MemoryStore, are able to cache arbitrary Ruby objects, but don’t count on every cache store to be able to do that.
The default cache stores provided with Rails include:
1) ActiveSupport::Cache::MemoryStore: A cache store implementation which stores everything into memory in the same process. If you’re running multiple Ruby on Rails server processes (which is the case if you’re using mongrel_cluster or Phusion Passenger), then this means that your Rails server process instances won’t be able to share cache data with each other. If your application never performs manual cache item expiry (e.g. when you‘re using generational cache keys), then using MemoryStore is ok. Otherwise, consider carefully whether you should be using this cache store.
MemoryStore is not only able to store strings, but also arbitrary Ruby objects.
MemoryStore is not thread-safe. Use SynchronizedMemoryStore instead if you need thread-safety.
ActionController::Base.cache_store = :memory_store
2) ActiveSupport::Cache::FileStore: Cached data is stored on the disk, this is the default store and the default path for this store is tmp/cache. Works well for all types of environments and allows all processes running from the same application directory to access the cached content. If tmp/cache does not exist, the default store becomes MemoryStore.
ActionController::Base.cache_store = :file_store, "/path/to/cache/directory"
3) ActiveSupport::Cache::DRbStore: Cached data is stored in a separate shared DRb process that all servers communicate with. This works for all environments and only keeps one cache around for all processes, but requires that you run and manage a separate DRb process.
ActionController::Base.cache_store = :drb_store, "druby://localhost:9192"
4) ActiveSupport::Cache::MemCacheStore: Works like DRbStore, but uses Danga’s memcached instead. Rails uses the bundled memcached-client gem by default. This is currently the most popular cache store for production websites.
Special features:
- Clustering and load balancing. One can specify multiple memcached servers, and MemCacheStore will load balance between all available servers. If a server goes down, then MemCacheStore will ignore it until it goes back online.
- Time-based expiry support. See write and the :expires_in option.
- Per-request in memory cache for all communication with the memcached server(s).
It also accepts a hash of additional options:
- :namespace: specifies a string that will automatically be prepended to keys when accessing the memcached store.
- :readonly: a boolean value that when set to true will make the store read-only, with an error raised on any attempt to write.
- :multithread: a boolean value that adds thread safety to read/write operations – it is unlikely you’ll need to use this option as the Rails threadsafe! method offers the same functionality.
The read and write methods of the MemCacheStore accept an options hash too. When reading you can specify :raw => true to prevent the object being marshaled (by default this is false which means the raw value in the cache is passed to Marshal.load before being returned to you.)
When writing to the cache it is also possible to specify :raw => true means the value is not passed to Marshal.dump before being stored in the cache (by default this is false).
The write method also accepts an :unless_exist flag which determines whether the memcached add (when true) or set (when false) method is used to store the item in the cache and an :expires_in option that specifies the time-to-live for the cached item in seconds.
ActionController::Base.cache_store = :mem_cache_store, "localhost"
5) ActiveSupport::Cache::SynchronizedMemoryStore: Like MemoryStore but thread-safe.
ActionController::Base.cache_store = :synchronized_memory_store
6) ActiveSupport::Cache::CompressedMemCacheStore: Works just like the regular MemCacheStore but uses GZip to decompress/compress on read/write.
ActionController::Base.cache_store = :compressed_mem_cache_store, "localhost"
7) Custom store: You can define your own cache store (new in Rails 2.1).
ActionController::Base.cache_store = MyOwnStore.new("parameter")
config.cache_store can be used in place of ActionController::Base.cache_store in your Rails::Initializer.run block in environment.rb
In addition to all of this, Rails also adds the ActiveRecord::Base#cache_key method that generates a key using the class name, id and updated_at timestamp (if available).
You can access these cache stores at a low level for storing queries and other objects. Here’s an example:
Rails.cache.read("city") # => nil
Rails.cache.write("city", "Duckburgh")
Rails.cache.read("city") # => "Duckburgh"
3 Conditional GET support
Conditional GETs are a feature of the HTTP specification that provide a way for web servers to tell browsers that the response to a GET request hasn’t changed since the last request and can be safely pulled from the browser cache.
They work by using the HTTP_IF_NONE_MATCH and HTTP_IF_MODIFIED_SINCE headers to pass back and forth both a unique content identifier and the timestamp of when the content was last changed. If the browser makes a request where the content identifier (etag) or last modified since timestamp matches the server’s version then the server only needs to send back an empty response with a not modified status.
It is the server’s (i.e. our) responsibility to look for a last modified timestamp and the if-none-match header and determine whether or not to send back the full response. With conditional-get support in Rails this is a pretty easy task:
class ProductsController < ApplicationController
def show
@product = Product.find(params[:id])
# If the request is stale according to the given timestamp and etag value
# (i.e. it needs to be processed again) then execute this block
if stale?(:last_modified => @product.updated_at.utc, :etag => @product)
respond_to do |wants|
# ... normal response processing
end
end
# If the request is fresh (i.e. it's not modified) then you don't need to do
# anything. The default render checks for this using the parameters
# used in the previous call to stale? and will automatically send a
# :not_modified. So that's it, you're done.
end
If you don’t have any special response processing and are using the default rendering mechanism (i.e. you’re not using respond_to or calling render yourself) then you’ve got an easy helper in fresh_when:
class ProductsController < ApplicationController
# This will automatically send back a :not_modified if the request is fresh,
# and will render the default template (product.*) if it's stale.
def show
@product = Product.find(params[:id])
fresh_when :last_modified => @product.published_at.utc, :etag => @product
end
end
4 Advanced Caching
Along with the built-in mechanisms outlined above, a number of excellent plugins exist to help with finer grained control over caching. These include Chris Wanstrath’s excellent cache_fu plugin (more info “here”: http://errtheblog.com/posts/57-kickin-ass-w-cachefu) and Evan Weaver’s interlock plugin (more info “here”: http://blog.evanweaver.com/articles/2007/12/13/better-rails-caching/). Both of these plugins play nice with memcached and are a must-see for anyone seriously considering optimizing their caching needs.
Also the new Cache money plugin is supposed to be mad cool.
5 References
- Scaling Rails Screencasts
- RailsEnvy, Rails Caching Tutorial, Part 1
- RailsEnvy, Rails Caching Tutorial, Part 2
- ActiveSupport::Cache documentation
- Rails 2.1 integrated caching tutorial
6 Changelog Lighthouse ticket
- May 02, 2009: Formatting cleanups
- April 26, 2009: Clean up typos in submitted patch
- April 1, 2009: Made a bunch of small fixes
- February 22, 2009: Beefed up the section on cache_stores
- December 27, 2008: Typo fixes
- November 23, 2008: Incremental updates with various suggested changes and formatting cleanup
- September 15, 2008: Initial version by Aditya Chadha


| (++) :: [a] -> [a] -> [a] |
If the first list is not finite, the result is the first list.
| head :: [a] -> a |
| last :: [a] -> a |
| tail :: [a] -> [a] |
| init :: [a] -> [a] |
| null :: [a] -> Bool |
| length :: [a] -> Int |
| map :: (a -> b) -> [a] -> [b] |
| reverse :: [a] -> [a] |
| intersperse :: a -> [a] -> [a] |
| intercalate :: [a] -> [[a]] -> [a] |
| transpose :: [[a]] -> [[a]] |
| subsequences :: [a] -> [[a]] |
| permutations :: [a] -> [[a]] |
| foldl :: (a -> b -> a) -> a -> [b] -> a |
The list must be finite.
| foldl' :: (a -> b -> a) -> a -> [b] -> a |
| foldl1 :: (a -> a -> a) -> [a] -> a |
| foldl1' :: (a -> a -> a) -> [a] -> a |
| foldr :: (a -> b -> b) -> b -> [a] -> b |
| foldr1 :: (a -> a -> a) -> [a] -> a |
| concat :: [[a]] -> [a] |
| concatMap :: (a -> [b]) -> [a] -> [b] |
| and :: [Bool] -> Bool |
| or :: [Bool] -> Bool |
| any :: (a -> Bool) -> [a] -> Bool |
| all :: (a -> Bool) -> [a] -> Bool |
| sum :: Num a => [a] -> a |
| product :: Num a => [a] -> a |
| maximum :: Ord a => [a] -> a |
| minimum :: Ord a => [a] -> a |
| scanl :: (a -> b -> a) -> a -> [b] -> [a] |
Note that
| scanl1 :: (a -> a -> a) -> [a] -> [a] |
| scanr :: (a -> b -> b) -> b -> [a] -> [b] |
| scanr1 :: (a -> a -> a) -> [a] -> [a] |
| mapAccumL :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) |
| mapAccumR :: (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) |
| iterate :: (a -> a) -> a -> [a] |
| repeat :: a -> [a] |
| replicate :: Int -> a -> [a] |
| cycle :: [a] -> [a] |
| unfoldr :: (b -> Maybe (a, b)) -> b -> [a] |
In some cases, unfoldr can undo a foldr operation:
if the following holds:
A simple use of unfoldr:
| take :: Int -> [a] -> [a] |
It is an instance of the more general Data.List.genericTake, in which n may be of any integral type.
| drop :: Int -> [a] -> [a] |
It is an instance of the more general Data.List.genericDrop, in which n may be of any integral type.
| splitAt :: Int -> [a] -> ([a], [a]) |
It is equivalent to (take n xs, drop n xs). splitAt is an instance of the more general Data.List.genericSplitAt, in which n may be of any integral type.
| takeWhile :: (a -> Bool) -> [a] -> [a] |
| dropWhile :: (a -> Bool) -> [a] -> [a] |
| span :: (a -> Bool) -> [a] -> ([a], [a]) |
| break :: (a -> Bool) -> [a] -> ([a], [a]) |
| stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] |
| group :: Eq a => [a] -> [[a]] |
It is a special case of groupBy, which allows the programmer to supply their own equality test.
| inits :: [a] -> [[a]] |
| tails :: [a] -> [[a]] |
| isPrefixOf :: Eq a => [a] -> [a] -> Bool |
| isSuffixOf :: Eq a => [a] -> [a] -> Bool |
| isInfixOf :: Eq a => [a] -> [a] -> Bool |
Example:
| elem :: Eq a => a -> [a] -> Bool |
| notElem :: Eq a => a -> [a] -> Bool |
| lookup :: Eq a => a -> [(a, b)] -> Maybe b |
| find :: (a -> Bool) -> [a] -> Maybe a |
| filter :: (a -> Bool) -> [a] -> [a] |
| partition :: (a -> Bool) -> [a] -> ([a], [a]) |
These functions treat a list xs as a indexed collection, with indices ranging from 0 to length xs - 1.
| (!!) :: [a] -> Int -> a |
| elemIndex :: Eq a => a -> [a] -> Maybe Int |
| elemIndices :: Eq a => a -> [a] -> [Int] |
| findIndex :: (a -> Bool) -> [a] -> Maybe Int |
| findIndices :: (a -> Bool) -> [a] -> [Int] |
| zip :: [a] -> [b] -> [(a, b)] |
| zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] |
| zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] |
| zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] |
| zip6 :: [a] |
| -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] |
| zip7 :: [a] |
| -> [b] |
| -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] |
| zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] |
| zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] |
| zipWith4 :: (a -> b -> c -> d -> e) |
| -> [a] -> [b] -> [c] -> [d] -> [e] |
| zipWith5 :: (a -> b -> c -> d -> e -> f) |
| -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] |
| zipWith6 :: (a -> b -> c -> d -> e -> f -> g) |
| -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] |
| zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) |
| -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] |
| unzip :: [(a, b)] -> ([a], [b]) |
| unzip3 :: [(a, b, c)] -> ([a], [b], [c]) |
| unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) |
| unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) |
| unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) |
| unzip7 :: [(a, b, c, d, e, f, g)] |
| -> ([a], [b], [c], [d], [e], [f], [g]) |
| lines :: String -> [String] |
| words :: String -> [String] |
| unlines :: [String] -> String |
| unwords :: [String] -> String |
| nub :: Eq a => [a] -> [a] |
| delete :: Eq a => a -> [a] -> [a] |
It is a special case of deleteBy, which allows the programmer to supply their own equality test.
| (\\) :: Eq a => [a] -> [a] -> [a] |
It is a special case of deleteFirstsBy, which allows the programmer to supply their own equality test.
| union :: Eq a => [a] -> [a] -> [a] |
Duplicates, and elements of the first list, are removed from the the second list, but if the first list contains duplicates, so will the result. It is a special case of unionBy, which allows the programmer to supply their own equality test.
| intersect :: Eq a => [a] -> [a] -> [a] |
If the first list contains duplicates, so will the result.
It is a special case of intersectBy, which allows the programmer to supply their own equality test.
| sort :: Ord a => [a] -> [a] |
| insert :: Ord a => a -> [a] -> [a] |
By convention, overloaded functions have a non-overloaded counterpart whose name is suffixed with ‘By’.
The predicate is assumed to define an equivalence.
| nubBy :: (a -> a -> Bool) -> [a] -> [a] |
| deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] |
| deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] |
| unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] |
| intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] |
| groupBy :: (a -> a -> Bool) -> [a] -> [[a]] |
The function is assumed to define a total ordering.
| sortBy :: (a -> a -> Ordering) -> [a] -> [a] |
| insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a] |
| maximumBy :: (a -> a -> Ordering) -> [a] -> a |
| minimumBy :: (a -> a -> Ordering) -> [a] -> a |
The prefix ‘generic’ indicates an overloaded function that is a generalized version of a Prelude function.
| genericLength :: Num i => [b] -> i |
| genericTake :: Integral i => i -> [a] -> [a] |
| genericDrop :: Integral i => i -> [a] -> [a] |
| genericSplitAt :: Integral i => i -> [b] -> ([b], [b]) |
| genericIndex :: Integral a => [b] -> a -> b |
| genericReplicate :: Integral i => i -> a -> [a] |


class: center, middle, inverse, title-slide # Basics: Functions and Troubleshooting ## Week 2 --- class: center, middle # Functions --- # Important R Facts *Fact 1:* **R** is an **open-source** language. -- *Fact 2:* The power of **R** comes from **packages**. -- *Fact 3:* **R** is a **functional programming** language. -- (This means it is designed for using and writing *functions*.) --- # Anatomy of a function ```r rnorm(10, mean = 5, sd =3) ``` ``` ## [1] 7.222717 3.047437 7.070927 9.553958 8.261264 1.739862 5.496745 ## [8] 7.606795 -1.197588 2.947701 ``` --- # Anatomy of a function ```r rnorm(10, mean = 5, sd =3) ``` -- Function name: rnorm(10, mean = 5, sd =3) -- Required arguments: rnorm(10, mean = 5, sd =3) (we often don't use the names for required arguments, but `n = 10` would be okay too) --- # Anatomy of a function Optional arguments: rnorm(10, mean = 5, sd =3) (*always* use the argument names for optional arguments) --- class: center, middle # Troubleshooting Errors --- # Syntax Errors * Did you leave off a parenthesis? rnorm(10, mean = 5 ``` ## Error: <text>:4:0: unexpected end of input ## 2: rnorm(10, mean = 5 ## 3: ## ^ ``` --- # Syntax Errors * Did you leave off a comma? rnorm(10 mean = 5) ``` ## Error: <text>:2:10: unexpected symbol ## 1: ## 2: rnorm(10 mean ## ^ ``` --- # Syntax Errors * Did you make a typo? rnrom(10, mean = 5) ``` ## Error in rnrom(10, mean = 5): could not find function "rnrom" ``` --- # Object type errors * Are you using the right **input** that the function expects? rnorm('hi', mean = 5) ``` ## Warning in rnorm("hi", mean = 5): NAs introduced by coercion ``` ``` ## Error in rnorm("hi", mean = 5): invalid arguments ``` --- # Object type errors * Are you expecting the right **output** of the function? ``` ## Error in my_obj(5): could not find function "my_obj" ``` my_obj <- rnorm(10, mean = 5)

my_obj(5) ``` ## Error in my_obj(5): could not find function "my_obj" ``` --- class: center, middle # Errors, warnings, and messages --- # Messages Just because you see scary red text, this does **not** mean something went wrong! This is just **R** communicating with you. -- For example, you often see: ```r library(tidyverse) ``` --- # Warnings Often, **R** will give you a **warning**. -- This means that your code *did* run... -- ...but you probably want to make sure it succeeded. --- # Warnings ```r my_vec <- c("a", "b", "c") my_new_vec <- as.integer(my_vec) ``` ``` ## Warning: NAs introduced by coercion ``` -- ```r my_new_vec ``` ``` ## [1] NA NA NA ``` --- # Errors If the word **Error** appears in your message from **R**, then you have a problem. -- This means your code **could not run**! -- ```r my_vec <- c("a", "b", "c") my_new_vec <- my_vec + 1 ``` ``` ## Error in my_vec + 1: non-numeric argument to binary operator ``` --- class: center, middle ## Parlez-vous ERROR? Error messages can be confusing! --- # Translations **R** says... > Error: Object 'some_obj' not found. It *probably* means... > You haven't run the code to create 'some_obj' OR you have a typo in the name! -- ```r some_ojb <- 1:10 mean(some_obj) ``` ``` ## Error in mean(some_obj): object 'some_obj' not found ``` --- # Translations **R** says... > Error: Object of type 'closure' is not subsettable. It *probably* means... > Oops, you tried to use square brackets on a function -- ```r mean[1,2] ``` ``` ## Error in mean[1, 2]: object of type 'closure' is not subsettable ``` --- # Translations **R** says... > Error: Non-numeric argument to binary operator It *probably* means... > You tried to do math on data that isn't numeric. -- ```r "a" + 2 ``` ``` ## Error in "a" + 2: non-numeric argument to binary operator ``` --- # Okay, now what? When all else fails, **Google** your error message. -- * Leave out the specifics. -- * Include the function you are using. --- # Try it... *What's wrong here?* ```r matrix(c("a", "b", "c", "d"), num_row = 2) ``` ``` ## Error in matrix(c("a", "b", "c", "d"), num_row = 2): unused argument (num_row = 2) ```


American Beef Steak cut – 400 g
$14.99/ea
$3.75 / 100 g
American Pork Ribs – 500 g
$13.99/ea
$2.8 / 100 g
Pastured Chicken breasts – 300 g
$8.99/ea
$2.99 / 100 g
Pastured Chicken legs – 150 g
$2.99/ea
$0.99 / 50 g
American Pork sausages – 180 g(3 sausages per pack)
$5.99/ea
$1.66 / 50 g
American Pork bacons – 300 g(8 lines per pack)


About
Authored By: Denis Smirnov
Driven and energetic Web and Information Systems major with a passion for web development. Passionate to improve and excited to see where life will go. Seeking a web development Internship to implement and improve my current skill set, effectively further my personal experience in hopes of a career in front end web development.
That's me


WITNESS LIST State Affairs Committee June 27, 2006 - 9:00A Electronic Voting Systems ON: Barnett, Jason (ES&S), Addison, TX Blakely, Don (ES&S), Addison, TX Clark, Catherine (Texas Association of School Boards), Austin, TX Clark, Dennis (Emerald Underground Water Conservation District), Ozona, TX DeBeauvoir, Dana Travis County Clerk (County & District Clerks Association Legislative Committee), Austin, TX Floum, Scott (Hart InterCivic), New Braunfels, TX Gregor, Carrie Austin County Clerk (Austin County, County Clerks Association), Bellville, TX Houston, Scott (Texas Municipal League), Austin, TX Lange, Allan (Lipan-Kickapoo Water Conservation District), Vancourt, TX Mashburn, Sherry (Village of Bee Cave), Bee Cave, TX McGeehan, Ann (Office of the Secretary of the State), Austin, TX McGowan, Pat Nolan County Clerk (Nolan County), Sweetwater, TX Meadows, Jerry (Hart InterCivic), Georgetown, TX Moody, Chris (ES&S), Addison, TX Norcross, Rob (Diebold Election Systems, Inc.), Irving, TX Reeves, David (Diebold Election Systems, Inc.), Austin, TX Runge, Caroline (Menard Co. WCID, Menard Co. UWD, Hickory UWCD No. 1), Menard, TX Simpson, Barbara Coryell County Clerk (Coryell County), Gatesville, TX Trainor, Trey (Office of the Secretary of State), Austin, TX Interim Charges 1 and 2 ON: Cervantes, Conley (Tenet Health System and Texas Hospital Association), Dallas, TX Dickey, Louis MD (Aetna, Inc.), Hartford, CT Engelke, Larry (Texas State Troopers Association), Seguin, TX Fuelberg, Ann (Employees Retirement System of Texas), Austin, TX Hassel, Steve (The Texas A&M University System), College Station, TX Hinchey, William MD (Texas Medical Association), Austin, TX Hollingsworth, Lonnie (Texas Classroom Teachers Association), Austin, TX Jung, Ronnie (Teachers Retirement System of Texas), Austin, TX King, Carl (Aetna, Inc.), Plano, TX Rodgers, J. Darren (Blue Cross Blue Shield of Texas), Dallas, TX Sarver, James (University of Texas System), Austin, TX Schiess, Jennifer (Legislative Budget Board), Austin, TX Stewart, Dan (University of Texas System), Austin, TX Wielmaker, John (Legislative Budget Board), Austin, TX Wright, Jody (Legislative Budget Board), Austin, TX Registering, but not testifying: On: Featherston, Pattie (Teachers Retirement System of Texas), Austin, TX Hickman, William (Teachers Retirement System of Texas), Austin, TX Electronic Voting Systems Providing written testimony: On: Holland, Scott (Irion County WCD, Sterling County WCD), Mertzon, TX Olney, Duane (Democratic Party in Washington County), Brenham, TX Interim Charges 1 and 2 On: Hartman, Eric (Texas Federation of Teachers), Austin, TX


It's All About You
Note:
The input fields in this sample aren't firing change events because of a
bug.


Create and maintain websites.
Working as operator in a DCS control room on SCADA programs, specialized for guidance and remote monitoring in food prodaction industry.
Apart from being a web developer, I am a passionate collector of turntables and gramophone records, I also enjoy their restoration and repairs. I enjoy most of my time being outdoors. I live near the most famous Belgrade lake, and I often go for a swim there.
When forced indoors, I follow a number of sci-fi and fantasy genre movies and television shows. I spend a large amount of my free time exploring the latest technology advancements in the front-end web development world.


{% extends "bootstrap_layout.html" %} {% set active_page = "about" %} {% block content %}
This is a flight application created by Pratik Desai, Dan Spinelli, Adam Whitten, and Jan Zielonka. You can navigate to the cheapest flight between two cities by inputting the departure city, arrival city, and departure date. We hope you enjoy!
{% endblock %}


It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy.
$55/Month
Unlimited products
Mobile website and store
Customer support
Unlimited staff
Custom domain free
Unlimited email


In depth:
Max Miedinger
1926-30: trains as a typesetter in Zurich, after which he attends evening classes at the Kunstgewerbeschule
in Zurich.
1936-46: typographer for Globus department store’s advertising studio in Zurich. 1947-56: customer
counselor and typeface sales representative for the Haas’sche Schriftgießerei in Münchenstein near Basle.
From 1956 onwards: freelance graphic artist in Zurich.
1956: Eduard Hoffmann, the director of the Haas’sche Schriftgießerei, commissions Miedinger to develop
a new sans-serif typeface.
1957: the Haas-Grotesk face is introduced.
1958: introduction of the roman (or normal) version of Haas-Grotesk.
1959: introduction of a bold Haas-Grotesk.
1960: the typeface changes its name from Neue Haas Grotesk to Helvetica™.
1983: Linotype publishes its Neue Helvetica®, based on the earlier Helvetica™.
2001: Linotype publishes Helvetica World an update to the classic Helvetica.
Max Miedinger (24 December 1910 in Zurich, Switzerland – 8 March 1980, Zürich, Switzerland) was a Swiss typeface designer.
He was famous for creating the Neue Haas Grotesk typeface in 1957 that was renamed Helvetica in 1960.
Marketed as a symbol of cutting-edge Swiss technology, Helvetica achieved immediate global success. Between
1926 and 1930 Miedinger trained as a typesetter in Zürich, after which he attended evening classes at
the Kunstgewerbeschule Zürich. At age sixteen Max became an apprentice typesetter for Jacques Bollmann
at a book printing office in Zürich. After four years as an apprentice, Miedinger enrolled in the School
of Arts and Crafts.


Salmon Cookies
Home
Sales
About us
Add New Location
Location Name:
Minimum Customurs/Hour:
Maximum Customurs/Hour:
Average Cookies/Sale:


Slides can be nested inside of each other.
These "nested" slides are usefull for adding additional information underneath a horizontal slide.
Fine, you know how it works now.
Set data-background="#dddddd"
on a slide to change the background color.
<section data-background="image.png">
public void startDemo(){
for(int i = 0; i < 3; i++){
System.out.println( i + ": Hello World");
}
}
You can link between slides internally, like this.
Any questions?


Closed Captions (CC) and subtitles enhance an audiovisual content by providing speech information and description of representative events in a textual format. Captioning is especially used as an aid for...
Surreal! My first Google Summer of Code has now come to an end. After almost 5 months (including the research pre-GSoC) it’s time to pack up. This has been a...
The first of the three phases of coding is about to end. And the evaluations for this phase start from 24th June. This post contains the synopsis of my work...
A month-long community bonding period ended on 27 May, commencing the official coding period. In this post, I would like to share my GSoC 2019 community bonding experience with CCExtractor...
My proposal co-oCCur: High-speed subtitle synchronization has been accepted by CCExtractor Development for Google Summer of Code (GSoC) 2019! I am thrilled to bits to spend my summer working with...


As I write this, I am still reeling from the death of my friend. Last Thursday my life was changed when my roommate came home, shaking and crying. It took a minute for her to say it, that Brian was dead. Later, we discovered that he took a few doses of GHB and drank alcohol as well. Since his death was only a week ago, we are still unsure of the exact dosage, or exactly what happened. We do know, however, that Wednesday night Brian went to bed and never woke up.
I am not anti-GHB, myself being experimental with drugs, but I writing this to warn about the dangers of mixing GHB with alcohol. None of us thought that something like this could happen to one of our friends. But, now, we are all effected by this experience. Not a single one of us will ever be the same, and though we will never forget Brian and are better having known him, we wish he was still with us today.
In memory of Brian G., 1982 - 2002
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Like Hallmark Christmas movies? Tech company offering $1,000 for binge-watch gig
by Brie StimsonWhat do you want for Christmas? How about a job watching TV?
A tech company is offering $1,000 to "a lover of all things Christmas, G-Rated romcoms, and too-close-to-home family dramas.”
The lucky binger will be required to watch 24 Hallmark Christmas movies in two weeks and review them on social media, according to CenturyLink’s website.
 Felt like the plot was a bit half-baked? Be as honest as possible in your review,” the ad says.
The reviewer will also get what the ad refers to as a “Hallmark binge-watching package,” complete with hot chocolate, Christmas cookies, twinkle lights and a mini Christmas tree.
CLICK HERE TO GET THE FOX NEWS APP
Does this ad sound vaguely like the plot of a Hallmark movie to anyone else? There was definitely one about a woman posting an ad for a fake Christmas boyfriend.
Interested candidates can apply on the website.


Basics of the web are: the web, html, url, http and web application.
HTTP is the protocol to the web.
HTML is hypertext markup language, which is the MAIN type of content used. This content tells you what you see. Markup tells you how it looks. These documents are the main type of content used one the web.
The major pieces of the web are: You, computer and browser, the internet, servers, and HTTP (which are protocols).
HTML and markups are made up of things called TAGS and Elements.
TAGS are opening name tags and content and closing name tags. Elements are the entire package of the tags and content.

Computers are only smart as their programmers. Computers do not have the ability to correct the programmers!
Inline and Block are different as block forms an invisible "box" around the content"
HTML is considered the foundation of a page, while CSS is the decoration and style of a page. JS is the interactive components.
Tree-like Structures (branching structures) of HTML. A tree-like structure is like the branches on a tree. Different branches with different styles. The structures appear as boxes. Boxes inside of boxes inside of more boxes.These boxes consist of an HTML,CSS, and DOM.
Programmers have the ability to alter the branches via text editors such as, Sublime Text, CodePen, and scratchpad.
It is very important that programmers avoid repetition for many reasons.
Avoiding Errors:When a programmer does not avoid repetition, they do the same thing over and over. Then when a programmer decides to make changes it tends to lead to errors. It is important that programmers make the same change to all relevent areas to avoid errors.
Consistency is key to programming codes. When a programmer specifies the same style for similar codes. This makes it easier to make changes. For example applying the class code of "class".
CSS stands for Cascading Style Sheets. CSS allows programmers to have control of how their HTML docs will look. CSS can be thought of as search and replace tools. Cascading means there are rules that are applied to an element that is a direct match, as well as they are applied to the child elements, unless the child element has multiple overlapping rules that are defined to it then those rules take affect, this is call "Inheritance". The properties that can be inherited are color, font, letter-spaces, line height, list-style, text-align, text-indent, text-transform, white space, and word spacing.
As we learned in a previous lesson, HTML elements are boxes, each box has four components. Being as there are so many components to each box it can be difficult to size the box just right.
There are two techniques that are useful with sizing, one is to set the size in percentage as opposed to pixels, the other is to utilize the box sizing border box attribute.
Positioning: Div's are block elements, and by default they use the entire page. Adding rules of display flex in the CSS will override the default and allow the DIV's to appear next to each other. The "Box" is the margin, border, padding and
content.
Computers are universal machines that we can program to essentially any computation that programmers program. Programmers need to be precise with their programs and codes. If a programmer makes a mistake, the computer does not correct the mistake.
A computer program is a list of instructions that tells a computer what to do. Programmers tell the computer what to do by using the programs. Programs are really the core of computer science, without programs a computer is "useless".
Pyhton is a high level computer language that we can use to write programs. Python is called an Interpreter, it runs the programs, interprets them and then executes them. Python emphasizes code readability.
Computer Language is a formal constructed language designed to communicate intructions to a computer. It is used to create programs to control the behavior of a computer. There are reasons we do not use "Natural" language to program. It is amibiguous and verbose. Different people will interpret the same sentence many different ways. An example of Computer Language is the Backus-Naur Form. The purpose for this is to allow programmers to precisely describe the language in a way that is simple and consise.
A Python expression is a math expression of sorts. For example you can print 4+4 and run this, which will result in 8. A valid expression must have an open and a close. Python expression=expression-operator-expression. Expressions represent things like, numbers, strings or an instance of class. Any value is an expression. The open expression and the close expression. For example: print 11+ 11 is a valid expression, but print 11 + (without a number at the end) is not.
Variables give programmers a way to give names to values. If my_number is a variable with a value of 4, then the following code would print out 8: Variables are a value that can change, depending on the conditions, and they are not capitalized. There must be a varible before you can introduce it.
print my_number + my_number
Strings are basically words that are encased between opening single or double quote sign and and ending single or double quote sign.
The varibles in strings can be altered. You will need to place a space after the last letter in the string and before the ending single or double quote sign.
In the line 1 + 3 = 4, the equals sign means "is the same as".
In the line my_number = 4, the equals sign means "takes the value of" or means the assignment of.
Variables can be useful to programmers in many ways:
In Python, 6 is a number while "6" is a string.
The code 6 + 6 would give 12.
The code "6" + "6" would give "66".
A function takes input, does something to that input, which then produces output. For example, a function named square can take a number as input and the output will be the input squared. Function can be a type of "procedure".
Making functions are a line of code that begin with def. In the body of the function a code is input that tells what to do within the parameters of that input. For example SQUARE: following code could be the definition of a function called square:
Once programmers have created a function that function will never have to be created again.
Since return tells Python what the function should produce as output. If a function is void of a return statement, then there will be no return output. Nothing will happen. See below:
First you need comparisons to be able to test and decide what to do. Python provides different operators we can use for doing comparisions, such as, less than sign, greater than sign, not equal to sign and many more. They operate on numbers. Any number can be used for comparisons. Quality comparison which is the double == compares while the single equal is an assignment. The output is a Boolean number which is either True or False.
The way to make a code do something different, depending on the result of a comparison is to use the "IF" statement. The "IF" statement is a True result and the "Else" is a False result.
Biggest takes three numbers and outputs the larger of the three numbers.
This is a way to do things over and over again.
While can execute any number of times. It will keep going as long as the test expression is True. A False test expression will not. A loop that never ends is called an "infinite" loop.
An example of print numbers is:
A procedure that takes as input a positive whole number and prints out all the whole numbers from 1 to the input number.
The Break statement gives us a way to stop the loop if it is "True".
Debugging is a way to locate and correct errors.
Examine errors messages when programs crash.
The last line of Python Tracebacks will tell you what went wrong. Read the errors starting with the last line and read backwards, this will tell you where the errors is.
Work from example code.
If your modified code does not work, comment it out and do step-by-step modifications to the example code until the code does what you want it to do.
Make sure examples work.
Check the example code you are using to make sure it works as you want it to.
Check(print) intermediate results.
When your code does not crash and yet does not work as you are wanting it to, add print statements to your program to see where in the code things stopped working.
Keep and compare version
When you have a working version of your code save it before you add something to it. This will give you something to compare to.
List data is a sequence of anything and they are much more powerful than strings.
Nested lists are elements that can be anything, and any number of elements. They show the versatility of lists. However it is not very useful as they do not have structure to what we put in them They are useful to the extent that we can put anything
in them such as a list in a list.
Lists support mutation, I know it sounds scary. We can change the value of the list after we have created them. Mutation modifies the existing object within an element.
Aliasing can be thought of as two variable names with the same property. Two different ways to refer to the same object. Any changes made to either variable will change both variables, however if you change the element the other variable will not change.
There are many built-in on lists.
Append, this method adds a new element to the end of a list. Append method mutates the list that it is invoked on, it does not create a new list.
Concatenation. The plus operator can be used with lists and is similar to how it is used to concatenate strings. It produces a new list, it does not mutate either of the input lists.
Length. The len operator can be used to find the length of an object. The len operator works for many things other than lists, it works for any object that is a collection of things including strings. The output is the number
of elements in its input.
The use of Functions will not present an elegant solution, but does pave the way for learning new stuff, such as creating programs that will remind you to take breaks at specific times for specific amounts of time. Functions are added to an empty programming file. Writing one line at a time, like writing a recipe. A screen object is automatically created whenever a function derived from a Screen method is called. This link will direct you to further explanations of "Functions".
Functions did not quite present a very elegant solution, this requires the use of "classes". In Python this is done by using Turtle and turtle.Turtle. You can draw basically anything with this.
In this lesson we used Twilio to send texts. Twilio is an example of an external library that is not part of Python. Using the __ import __: you write something similar to 'from twillio.rest import TwilioRestClient', this will gain you access to TwilioRestClient without having to import all the extra stuff that is in twillio.rest. This is the link to download Twilio.
This is a very useful tool to catch mis-spelled (curse) words that you did not intend to send to your boss. Reading the documentation for the tools you use is VERY important. We used this tool
A 'Class' is like a blueprint for a building while an 'instance' is like an ACTUAL building that was made from the blueprint. You can create lots of objects from that blueprint-known technically as an instance. Instance methods are special functions that belong to an 'instance' of a 'class.' They usually get or set information about the instance they are attached to. They are made easily by using the class operator. Python makes Inheritance really easy. We define a new class, based on another, 'parent' class. Our new class brings everything over from the parent, and we can also add other things to it. If any new attributes or methods have the same name as an attribute or method in our parent class, it is used instead of the parent one. In this lesson we learned about inserting moveis onto our page. Movie Website, which should include the "Title", "youtube trailer", "storyline" and "poster image". I have included a link to the "Movie Website" lesson. This video was my favorite part.
The function called __init__ (also called "constructor")is run when we create an instance of something, as opposed to the 'blueprint' we have here, __init__ is run. . When creating a Python program for Movie Website we used CLASS, CONSTRUCTOR (which uses the SELF which is a conventional in Python to name the first parameter of a method self, e.g.:), INSTANCE VARIABLES, INSTANCE METHODS and INSTANCES. Class variables that will not be changing per the Python rule should be in all caps. this link explains more about Class and Instance Varibles. DOC strings is a way of inputting specific documentations/messages.
The most important linguistic distinction is between Objects, Classes, and Modules. An important concept that you have to understand is the difference between a class and an object. The problem is, there is no real "difference"
between a Class and an Object. This is where "class is-a object" comes in. A class inherits from the class named object to make a class but it's not an object really it's a class, but do not forget to inherit from object. Method Overriding is a sub class within a class that overrides the Objects information.
This is a link for further explanations of Class.
Object-Oriented Progranning (OOP) also comes into play as it not only structures programs in a better way, but it also helps structure the programming task. As programs become bigger and more complicated, the problem of managing the programs also increase. Object-Oriented approach offers ways of dealing with this complexity, not just in design, but also in the organization of the work. The Oject-Oriented approach helps with things such as Collaboration, Design, Separating the Interface from the Implementation, Keeping the Interface Simple, Dividing the Work into Modules, Reusing Tested Codes, Inheriting Generic Code, and Making Decisions Dynamically. Modules allow you to organize your PYTHON code. By grouping related code into a module makes the code easier to understand as well as use. In PYTHON a module is an oject with arbitrarily named attributes that you can bind. Simply put, a Module is a file consiting of PYTHON code, that can be defined as functions, classes and variables. A Module can also include runnable code. There are many reasons as to why Object-Oriented Programming is important, a few are (along as what is underlined above): Object-Oriented Programming (OOP) is a programming paradigm that uses abstraction to create models based on the real world. Object-Oriented Programming uses several techniques from previously established paradigms, which allows re-using tested codes over and over. Object-Oriented Programming envisions software as a collection of cooperating objects rather than a collection of functions or simply a list of commands (as is the traditional view). In Object-Oriented Progrmming, each object can receive messages, process data, and send messages to other objects. Each object can be viewed as an independent mini machine with a distinct role or responsibility. Object-Oriented Programming promotes greater flexibility and maintainability in programming, and is widely popular in large-scale software engineering. Object-Oriented Programming strongly emphasizes modularity, object-oriented code is simpler to develop and easier to understand later on. Object-oriented code promotes more direct analysis, coding, and understanding of complex situations and procedures than less modular programming methods. I understood after my Udacity Coach sent me a link that further explained why Object-Oriented Programming is important. The link is OOP.
The Python Standard Library contains built-in modules that provide access to system functionality as well as modules written in Python which provides standardized solutions that occur in everyday programming. This is the link Python Standard Library.
Extra links for your enjoyment!
Link to the Nano Dgree Program
Scratchpad
Codepen
Profanity Editor
Twilio
Python
OOP
Python Standard Library


--- title: Serious doubts about the App Store layout: post ---
I’ve never doubted the viability of running a serious business of writing iPhone apps before. For the first time, now, I am.
Couldn't agree more. The situation with the App Store is unsustainable and will only serve to push developers into the arms of upcoming platforms once they become more widespread (personally, I'm angling for Android).


Hero Finder
Answer a few basic questions.
Then find a hero with the greatest compatibility!
Go to Survey


|
Bullet Collision Detection & Physics Library
|
#include "btCollisionShape.h"
#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
#include "btTriangleCallback.h"
Go to the source code of this file.
Classes | |
| class | btConcaveShape |
| The btConcaveShape class provides an interface for non-moving (static) concave shapes. More... | |
Typedefs | |
| typedef enum PHY_ScalarType | PHY_ScalarType |
| PHY_ScalarType enumerates possible scalar types. More... | |
Enumerations | |
| enum | PHY_ScalarType { PHY_FLOAT, PHY_DOUBLE, PHY_INTEGER, PHY_SHORT, PHY_FIXEDPOINT88, PHY_UCHAR } |
| PHY_ScalarType enumerates possible scalar types. More... | |
| typedef enum PHY_ScalarType PHY_ScalarType |
PHY_ScalarType enumerates possible scalar types.
See the btStridingMeshInterface or btHeightfieldTerrainShape for its use
| enum PHY_ScalarType |
PHY_ScalarType enumerates possible scalar types.
See the btStridingMeshInterface or btHeightfieldTerrainShape for its use
| Enumerator | |
|---|---|
| PHY_FLOAT | |
| PHY_DOUBLE | |
| PHY_INTEGER | |
| PHY_SHORT | |
| PHY_FIXEDPOINT88 | |
| PHY_UCHAR |
Definition at line 25 of file btConcaveShape.h.


I had some email contact with the German company developing this EnergyCam product a couple of years ago before I found OEM then had a marketing email from them yesterday and thought other members here might be interested too.
In the download section under integrators there are Raspberry Pi example implementations.
I haven't studied the website yet but I wonder how well it will work with the lower contrast LCD displays found on newer meters?
Unfortunately, it looks to be fairly pricey but an interesting approach nevertheless.
Regards,
Steve
Re: EnergyCam - OCR Meter Reading Camera
Steve's right,
the cost seems excessive to me, and even these http://www.xemtec.com/11-0-AMR-Retrofit.html are not joking ...
I think it's better to fix it yourself DIY!
Re: EnergyCam - OCR Meter Reading Camera
Hi Steve,
I'm looking for long time to find a solution for old meter. I have contacted fastforward company and also northstartelemetrics , however the price is to high. Could you help me please with the OEM manufacturer.
Thanks
Razvan
Re: EnergyCam - OCR Meter Reading Camera
Hi Steve,
I would be also interested in the OEM, could you please share the info with me (PM?).
Thank you in advance.
stiw
Re: EnergyCam - OCR Meter Reading Camera
I purpose OEM is for OpenEnergyMonitor ;-) , is'nt it ?
Re: EnergyCam - OCR Meter Reading Camera
It can also mean Original Equipment Manufacturer.
Re: EnergyCam - OCR Meter Reading Camera
Okay ... maybe ;-)
I ordered 2 "Stromauge" by Umwelt-Messtechnik.de
http://umwelt-messtechnik.de/Smart-Grid-Komponenten/FAST-FORWARD/Fast-Fo...
and will tryout to bring the values to emonview by tristan.
Will give feedback then. shipping will be over 1 week ;-(
Re: EnergyCam - OCR Meter Reading Camera
So, a while is gone, now I tested the two "Stromauge". We used a stick from "imst" the "iM871A-USB" for wireless mBus at raspberry. The code from fast forward at "https://github.com/ffcrg/ecpiww" works well to fetch data over wMBus.
But the wmbuslib.so (originally from imst) only works with raspberry pi 1. Last week I got a new library compiled directly from imst to use with raspberry Pi2, I have to tryout.
i changed the code from fast forward to work with multiple manufacturers sending data over wireless mBus. So we got data grabbed from kampstrup energy meters with wmbus addin. We are working on that two.
the new process gets the name: eccwmbus and will be usable under github soon. The grabbed data will be pushed to emonHub and visible on emon view. I called imst, they have a module for raspbarry pi on SPI, too. Have to try it out.
greetings from Germany, stay tuned.
Re: EnergyCam - OCR Meter Reading Camera
Okay, now i got the codes for our wmBus Meters from NZR. and i look forward to do some coding.


| Name | Model | Type | Located in |
|---|---|---|---|
| Sensore Temperatura | Emerson IT | TEMPERATURE | Corridoio |
| Sensore Fumo | HEIMAN | TEMPERATURE | Cucina |
| Name | Model | Type | Connected to |
|---|---|---|---|
| Termostato | TP_LINK | ELECTRICAL | Termostato Smart |
| Attuatorre Tapparella Smart | powahome | MECHANICAL | Tapparella Smart |


Friday Fun with Gilt Games
The Gilt Public API is a great tool for developing new ways for people to shop quickly, efficiently, or on new platforms. But developers using the API are also finding unexpected things to do with Gilt data— they’re using it to make games.
So in the spirit of Friday, why not spend a few minutes playing with a couple of games that have been built on top of the Public API?
Gilt Memory was built by Karl Norling, a developer here at Gilt. See how quickly you can find the matching pairs of products, then challenge your friends to beat your score!
The Price is Right on Gilt was built overnight at the NYC Powered by MongoDB Hackathon last weekend. This live multiplayer game lets you and up to 3 other friends play a price-guessing game to see who knows Gilt’s products the best. Developer Yufei Liu built the project using Node.js and MongoDB.
Happy Friday, everyone!


--- title: Historic Lake Bonneville author: display_name: AGRC Staff email<EMAIL_ADDRESS>tags: - history - lakes - water categories: [] date: 2012-07-11 13:55:32 -0600 Bonneville: downloads: - url: https://drive.google.com/drive/folders/0ByStJjVZ7c7mUGg2Sy1nZnF0eFk label: Historic Lake Bonneville updates: - 2007 --- {% include abstract.html download="https://drive.google.com/drive/folders/0ByStJjVZ7c7mUGg2Sy1nZnF0eFk" name="Historic Lake Bonneville" stewards="AGRC" abstract="Water.HistoricLakeBonneville represents the geographic extent of the historic Lake Bonneville shoreline." %}
This data set represents an approximation of the Bonneville level of historic Lake Bonneville and does not take into consideration isostatic rebound. This dataset was created by locating the historic shoreline on NAIP imagery and USGS quadrangles and generating a contour at that location using USGS 10 meter DEM for the base elevation.
{% include contact.html subject=page.title contact=site.data.contacts.agrc %}


 Engage your clients through compelling visuals that do most of the marketing for you.
Stand out to the right audience
Using a collaborative formula of designers, researchers, photographers, videographers, and copywriters, we’ll build and extend your brand in digital places.
Graphic design
Great design makes you memorable. We deliver artwork that underscores your brand message and captures potential clients’ attention.
Photography
Increase your credibility by getting the most stunning, high-quality photos that improve your business image.
Client testimonials
We put our trust in Sunnyside and they delivered, making sure our needs were met and deadlines were always hit.
Emily R.
Marketing DirectorSunnyside’s enthusiasm coupled with their keen interest in our brand’s success made it a satisfying and enjoyable experience.
Thomas S.
Chief Operating OfficerIncredible end result! Our sales increased over 400% when we worked with Sunnyside. Highly recommended!


The Outdoor Girls in Florida
by Laura Lee Hope
The Outdoor Girls in Florida is a story of adventure following a group of girls (Amy, Mollie, Betty, and Grace) on a journey to help their friend Will.
Readability levels for passages on Lit2Go are reported as Flesch-Kincaid grade levels which are roughly equivalent to U.S. grade levels.
The Outdoor Girls in Florida is a story of adventure following a group of girls (Amy, Mollie, Betty, and Grace) on a journey to help their friend Will.
This poem expresses the problem many people have with getting up when it is dark in the morning and going to bed in the evening when it is still light outside.
A child climbs into a tree and imagines seeing other places.
A children’s subtraction poem about chickadees.
Written as a play, this is a story about neighbors who do not get along. The hedgehog challenges the hare to a contest. The contest is used to settle the differences between the neighbors. However, is the means fair?
Twelve fishermen think one of them has drowned. When they count to see if everyone is there they always count eleven.
A nursery rhyme (from Mother Goose) originating from a milkmaid chant used to charm her cow to give milk.
A fun nursery rhyme/riddle.
The story of a good rabbit and a very naughty bad one.
A rhyme that serves to tell children to behave through the song of a bird.
A nursery rhyme about the differences between the city mouse and the garden mouse and how each is happy in his own manner.
A rhyme about a farmer who chases a hog out of his fodder field.
A folk tale that teaches children not to daydream, but work for their reward.
A humorous poem about the daily routine of a farmer and his maid.
A poem about symbolic fertility.
As a way to pass the time during a raging snowstorm, family members exchanges stories by the fireside.
An invisible friend plays with toys.
A child’s riddle involving multiplication and logic.
A cat bites the tail off of the mouse. The mouse is led on a merry chase attempting to bring back cream for the cat who will then return the mouse’s tail.
A nursery rhyme that mimics a lullaby.
A poem about a boy hunting a cock-sparrow.


When it comes to all things weight loss, the simplest, fastest way to make impactful, lasting change is to form habits you can actually stick with for life. That’s why this plan involves an easy-to-follow meal planning guide. This full week of (delicious!) food will take the guesswork out of grocery shopping and prepping with nutritionist-approved breakfast, lunch, and dinner ideas.You learn about lots of healthy, filling meals and snacks that can help you not only weigh less but also feel your very best.
Plan Length : NA
Meal Type : Protein Rich
Cost : Free
Muscle Building Diet plan!(for begginers)
While a strict training regimen is necessary, you can never underestimate the importance of a solid muscle gaining diet plan to get the best out of your workout.Now gaining muscles has become the ultimate goal of your life. There is no denying that the early stages of your fitness regimen are best for improving strength. The fact that you are new to training helps your body to respond rapidly and also adapts faster to your weight lifting. Thus, expediting your muscle building process. However, the importance of a bodybuilding diet plan can never be ruled out in achieving your goal.
Follow Six Meals A Day Plan
Make Strategic Use Of Carbs
Rely On Lean Proteins
Limit The Intake Of Processed Foods
Keep Yourself Hydrated
Plan Length : NA
Meal Type : Weight Gain
Cost : Free
Weight Gain Diet plan!
For some people, gaining weight or adding muscle can be just as difficult as losing weight for others.However, simply adding certain foods to your diet can make your weight gain efforts both healthy and more effective.Gaining weight is no joke. It is much more difficult than losing weight. However, if you want to reach your goal, you have to stay focused. With the right and suitable diet you can absolutely transform yourself from a skinny person to a much healthier person


--- layout: post authors: ["Ivan Gonzalez"] title: "2015 Election: Ivan Gonzalez" date: 2015-01-16 time: "12:00:00" tags: ["Software Carpentry Foundation", "Election 2015"] ---
I've been an instructor since September 2013 and have taught 10 workshops so far. I'm finishing a master's in Science Communication and work at the Martinos Center for Biomedical Imaging. I would propose three things to the new Committee: improve our outreach and communication strategies, expand Software Carpentry to other regions and languages, and strengthen the mentoring program for new instructors.
I'm probably one of the least computer-inclined instructors in the whole pool. Back when I was doing my BSc in Physics in Spain, I didn't like computers much. I got my first one as a freshman and the only programming class I took was an awful intro to numerical analysis in FORTRAN.
Two years in my PhD, I realized computer simulations are handy in real life and that the elegance of the analytical approach comes also with some vacuity (cows are not always spherical, you know). I implemented a Monte Carlo in Mathematica and felt proud. My Russian friend Alexei thought different ("Mathematica is a black box!") and encouraged me to learn a "real" programming language. I took a class on C++ and discovered that programming is pretty.
Armed with my new vision and class, I took a post-doc at Oak Ridge National Lab in a computational physics group to work in a new algorithm that gives exact solutions for quantum systems with reduced dimensionality. I also thought that programming would be handy if I ever had to apply for a real job.
After couple of weeks in Oak Ridge, a fellow postdoc handed me a toy
C++ implementation of the algorithm. I never told this to anyone,
but I spent that day trying to compile it using gcc
instead of g++
. (Short story, doesn't work).
From this start you can imagine the pain: countless hours in the vicious cycle of writing buggy code, throwing it to the compiler, which inevitably buried me with errors or seg faults. I got everything working nicely at some point and became a "competent programmer", but I still doubt whether it was worth it.
Years later, I found out Software Carpentry on the web. I started devouring Greg's videos and wondering why nobody had told me all that before. I learnt lots, realizing I wasn't as "competent" as I thought.
The truth is many still think that computer skills is something that scientists have somehow built in. That's why I would ask the new Committee to improve our communication strategies. I think we need to reach out further and to different audiences, not only scientists looking to improve their skills, but also lab managers, program administrators, university departments, and the press. And maybe to other groups: there had been workshops for librarians, but what about data journalists?Like Raniere, I would like to expand Software Carpentry geographically. Most workshops happen in English-speaking countries, even outside North America: there was a bunch in the UK, but just one in Spain. Sure is because of the awesome people pushing in these places like Aleksandra, Giacomo or Damien, but I also think that the language barrier comes into play. I'd like to push translation of Software Carpentry materials, continuing the on-going efforts in Portuguese and Spanish.
Lastly, as many other candidates, I want to strengthen our mentoring program for new instructors. When I taught the first times, I felt a disconnect between intructor training and what's needed in a real workshop. With more new instructors coming and others teaching after a while, a stronger mentoring program would be beneficial for all.


Source code for interactive_python.state
import collections
import asyncio
from pyee import EventEmitter
from .connection import Connection
from .discovery import Discovery
from .scene import Scene
[docs]class State(EventEmitter):
"""State is the state container for a single interactive session.
It should usually be created via the static
:func:`~interactive_python.State.connect` method::
connection = State.connect(
project_version_id=my_version_id,
authorization="Bearer " + oauth_token)
The Scene is a pyee.EventEmitter. When calls come down, they're always
emitted on the State by their method name. So, for instance, you can
listen to "onSceneCreate" or "onParticipantJoin" on the scene::
def greet(call):
for participant in call.data['participants']:
print('Welcome {}!', participant['username'])
scene.on('onParticipantJoin', greet)
The state can work in two modes for handling delivery of events and updates.
You can use `pump()` calls synchronously within your game loop to apply
updates that have been queued. Alternately, you can call ``pump_async()`` to
signal to that state that you want updates delivered asynchronously, as soon
as they come in. For example::
# Async delivery. `giveInput` is emitted as soon as any input comes in.
state.on('giveInput', lambda call: do_the_thing(call))
state.pump_async()
# Sync delivery. `giveInput` is emitted only during calls to pump()
state.on('giveInput', lambda call: do_the_thing(call))
while True:
my_game_loop.tick()
state.pump()
# You can also read queues of changes from pump(), if you prefer
# to dispatch changes manually:
# for call in pump(): ...
In both modes, all incoming call are emitted as events on the State
instance.
:param connection: The websocket connection to interactive.
:type connection: Connection
"""
def __init__(self, connection):
super(State, self).__init__()
self._scenes = {'default': Scene('default')}
self.connection = connection
self._enable_event_queue = True
self._event_queue = collections.deque()
self._scenes['default']._attach_connection(self.connection)
self.on('onSceneCreate', self._on_scene_create_or_update)
self.on('onSceneUpdate', self._on_scene_create_or_update)
self.on('onSceneDelete', self._on_scene_delete)
self.on('onControlCreate', self._on_control_update_or_create)
self.on('onControlUpdate', self._on_control_update_or_create)
self.on('onControlDelete', self._on_control_delete)
self.on('giveInput', self._give_input)
[docs] def scene(self, name):
"""
Looks up an existing scene by ID. It returns None if the scene does
not exist.
:param name: The name of the scene to look up
:type name: str
:return:
:rtype: Scene
"""
return self._scenes.get(name, None)
[docs] def pump_async(self, loop=asyncio.get_event_loop()):
"""
Starts a pump() process working in the background. Events will be
dispatched asynchronously.
Returns a future that can be used for cancelling the pump, if desired.
Otherwise the pump will automatically stop once
the connection is closed.
:rtype: asyncio.Future
"""
self._enable_event_queue = False
async def run():
try:
while await self.connection.has_packet():
self.pump()
except asyncio.CancelledError:
self._enable_event_queue = True
except Exception as e:
self.emit('error', e)
return asyncio.ensure_future(run(), loop=loop)
[docs] def pump(self):
"""
pump causes the state to read any updates it has queued up. This
should usually be called at the start of any game loop where you're
going to be doing processing of Interactive events.
Any events that have not been read when pump() is called are discarded.
Alternately, you can call pump_async() to have delivery handled for you
without manual input.
:rtype: Iterator of Calls
"""
self._event_queue.clear()
while True:
call = self.connection.get_packet()
if call is None:
return
self.emit(call.name, call)
if self._enable_event_queue:
self._event_queue.append(call)
return self._event_queue
[docs] async def create_scenes(self, *scenes):
"""
Can be called with one or more Scenes to add them to Interactive.
:param scenes: list of scenes to create
:type scenes: Scene
"""
for scene in scenes:
self._scenes[scene.id] = scene
scene._attach_connection(self)
return await self.connection.call(
'createScenes', [s._resolve_all() for s in scenes])
[docs] async def set_ready(self, is_ready=True):
"""
Marks the interactive integration as being ready-to-go. Must be called
before controls will appear.
:param is_ready: True or False to allow input
:rtype: Reply
"""
return await self.connection.call('ready', {'isReady': is_ready})
def _give_input(self, call):
control_id = call.data['input']['controlID']
for scene in self._scenes.values():
if control_id in scene.controls:
scene.controls[control_id]._give_input(call)
break
def _on_scene_delete(self, call):
if call.data['sceneID'] not in self._scenes:
return
self.scenes[call.data['sceneID']].delete(call)
del self.scenes[call.data['sceneID']]
def _on_scene_create_or_update(self, call):
for scene in call.data.scenes:
if scene['sceneID'] not in self._scenes:
self._scenes[scene['sceneID']] = Scene(self, scene['sceneID'])
self._scenes[scene['sceneID']]._apply_changes(scene, call)
def _on_control_delete(self, call):
if call.data['sceneID'] in self._scenes:
self._scenes[call.data['sceneID']]._on_control_delete(call)
def _on_control_update_or_create(self, call):
if call.data['sceneID'] in self._scenes:
self._scenes[call.data['sceneID']].\
_on_control_update_or_create(call)
[docs] @staticmethod
async def connect(discovery=Discovery(), **kwargs):
"""
Creates a new interactive connection. Most arguments will be passed
through into the Connection constructor.
:param discovery:
:type discovery: Discovery
:param kwargs:
:rtype: State
"""
if 'address' not in kwargs:
kwargs['address'] = await discovery.find()
connection = Connection(**kwargs)
await connection.connect()
return State(connection)


Result of Afghan presidential vote postponed again: election commission
KABUL (Reuters) - The results of Afghanistan’s presidential election, that were due on Nov. 14, have been postponed for a second time, the election commission said on Wednesday.
“The announcement of the preliminary result will not be announced tomorrow until the technical issues are addressed,” election commission spokesman Abdul Aziz Ibrahimi said.
Reuters reported on Sunday that the results were likely to be delayed after the main challenger to incumbent Ashraf Ghani said he would not agree to the addition of hundreds of thousands of votes to a planned recount.


Wes Bos has created a course to get you confident in your JS skills in 30 days. In it you work on a new project daily for 30 days and in each project you make something using vanilla JS without any frameworks or libraries.
Today I started the challenge and first project was to make a drum-kit where different sounds are played based on the keyboard button you press. And the corresponding button gets highlighted on screen.
The key concepts I learned from today’s challenge were:
- Setting event-listeners with JS
- Working with keyboard events and identifying key-codes
- Playing audio and restarting the audio when it is already playing
- How to sync JS code with CSS transitions
- What value
this
takes inside the event listener function
Setting event-listeners with JS
The syntax for this is very simple
<target-element>.addEventListener('<event-name>', <function-to-call-when-event-is-fired>);
You can find a list of supported events here but beware, the complete list of events is too large and you might never need to use most of them.
Working with keyboard events and identifying key-codes
function handleKeyDownEvent(event) {
console.log(event.keyCode);
}
window.addEventListener('keydown', handleKeyDownEvent);
Here we attach an event-listener for the keydown
event to the window
object since we want to capture the events across our whole web-page.
Then we find out which key was pressed based on the keyCode
value passed via the fired event.
Wes has created a nifty little website (https://keycode.info) which we can use to find the corresponding keyCode
for any key.
Playing audio and restarting the audio when it is already playing
In this project we have a set of buttons on the screen corresponding to different keys on the keyboard. And each button has a corresponding <audio>
element on the page. The goal is to play the corresponding audio when a valid key is pressed on the keyboard.
So after detecting which key is pressed using the keyCode
attribute, we select the corresponding <audio>
element using a pre-specified data-key
attribute in HTML and call the audioElement.play();
method on it.
let audioElement = document.querySelector(`audio[data-key="${keyCode}"]`);
audioElement.currentTime = 0;
audioElement.play();
In the above code-block you might have observed that I set the current-time
of that element to 0
before calling play
on it. This is done because when an audio
is still playing (that is it has not finished) and we call .play()
on it, this new call gets ignored. Therefore we reset the play-time for that particular audio element so that it correctly registers and plays 2 consecutive commands of the same key.
How to sync JS code with CSS transitions
When a key is pressed, we highlight the corresponding button for a short duration on the screen while playing sound for it. To highlight the button, we just add a class playing
to it which scales it up and changes the border a bit. The second part of that is to remove the playing
class as soon as the transition is finished so as to return the button to normal state.
For this I initially thought of using setTimeout
with the same time-out as that mentioned in CSS as transition duration. Wes pointed out the flaw in it is that when we decide to update the transition duration we would need to make sure to update it in both the places (in CSS and in JS).
So a better way to synchronize CSS transitions with JS is again to use events. Here we specifically use transitionend
event on the buttons like below.
function removeButtonHighlight(event) {
if (event.propertyName === 'transform') {
this.classList.remove('playing');
}
}
document.querySelectorAll('.keys').forEach(button => {
button.addEventListener('transitionend', removeButtonHighlight);
});
In above code, we select each button and then add the transitionend
event-listener for it so now it will call removeButtonHighlight
only and exactly when any transition on any of those buttons ends.
After that we simply remove the playing
class from that button so that it returns back to its original/normal state. You might have noticed that I have put a check of event.propertyName === 'transform'
. I would suggest you try and remove that check and console.log
the event to find out why I might have put that check in.
What value this
takes inside the event-listener function
One of the toughest concept to learn and correctly understand in JS is this
or more specifically, what this
means at different points of execution in our code.
In the last code-block you have noticed that I simply did this.classList.remove('playing')
instead of trying to select that particular element using any other method.
It is so because in that particular case the value of this
is whatever object the function removeButtonHighlight
has been called.
So when we attach an event-listener on each of our button and on triggering of those events, they call removeButtonHighlight
with the context of that particular button. So there this
is referring directly to the button on which the event listener has been triggered.
Conclusion
Hope I have been able to explain what I learned in today’s challenge. Hit me up on twitter @varun_barad in case you haven’t understood something from this article or you have something new for me to learn.
In any case, don’t forget to check out the JavaScript30 challenge from Wes Bos. It is an awesome way to get some JS confidence.


Next: slot-value, Previous: slot-missing, Up: Objects Dictionary
slot-unbound
class instance slot-name ⇒ {result}*
slot-unbound
(class t)
instance slot-name
class—the class of the instance.
instance—the instance in which an attempt was made to read the unbound slot.
slot-name—the name of the unbound slot.
result—an object.
The generic function slot-unbound is called when an unbound slot is read in an instance whose metaclass is standard-class. The default method signals an error
of type unbound-slot. The name slot of the unbound-slot condition is initialized to the name of the offending variable, and the instance slot of the unbound-slot condition is initialized to the offending instance.
The generic function slot-unbound is not intended to be called by programmers. Programmers may write methods for it. The function slot-unbound is called only indirectly by slot-value.
If slot-unbound returns, only the primary value will be used by the caller, and all other values will be ignored.
The default method on slot-unbound signals an error of type unbound-slot.
An unbound slot may occur if no :initform form was specified for the slot and the slot value has not been set, or if slot-makunbound has been called on the slot.


a visualization of global weather conditions
forecast by supercomputers
updated every three hours
ocean surface current estimates
updated every five days
Community |
Author |
Cameron Beccario @cambecc
Source |
Modules |
Weather Data |
Global Forecast System
NCEP / National Weather Service / NOAA
Ocean Currents Data |
OSCAR
Earth & Space Research
GRIB/NetCDF Decoder |
Geographic Data |
Hosting |
Font |
Waterman Butterfly |
Earlier Work |
Inspiration |
atmospheric pressure corresponds roughly to altitude
several pressure layers are meteorologically interesting
they show data assuming the earth is completely smooth
note: 1 hectopascal (hPa) ≡ 1 millibar (mb)
1000 hPa |
00,~100 m, near sea level conditions
850 hPa |
0~1,500 m, planetary boundary, low
700 hPa |
0~3,500 m, planetary boundary, high
500 hPa |
0~5,000 m, vorticity
250 hPa |
~10,500 m, jet stream
70 hPa |
~17,500 m, stratosphere
10 hPa |
~26,500 m, even more stratosphere
the "Surface" layer represents conditions at ground or water level
this layer follows the contours of mountains, valleys, etc.
overlays show another dimension of data using color
some overlays are valid at a specific height
while others are valid for the entire thickness of the atmosphere
Wind |
wind speed at specified height
Temp |
temperature at specified height
TPW (Total Precipitable Water) |
total amount of water in a column of air
stretching from ground to space
TCW (Total Cloud Water) |
total amount of water in clouds
in a column of air from ground to space
MSLP (Mean Sea Level Pressure) |
air pressure reduced to sea level
weather and ocean data are generated from numerical models
earth.nullschool.net implies no guarantee of accuracy


Key: = Must support, = QICore-defined extension, = Is-Modifier
| Field | Card. | Type and Description |
|---|---|---|
| active |
0..1
|
Boolean
|
| address |
0..*
|
List<Address>
|
| address-preferred |
0..1
|
Extension
|
| address.city |
0..1
|
String
|
| address.country |
0..1
|
String
|
| address.district |
0..1
|
String
|
| address.id |
0..1
|
String
|
| address.line |
0..*
|
List<String>
|
| address.period |
0..1
|
interval<DateTime>
|
| address.postalCode |
0..1
|
String
|
| address.state |
0..1
|
String
|
| address.text |
0..1
|
String
|
| address.type |
0..1
|
code
|
| address.use |
0..1
|
code
|
| birthDate |
0..1
|
DateTime
|
| birthPlace |
0..1
|
Extension
|
| birthTime |
0..1
|
Extension
|
| cadavericDonor |
0..1
|
Extension
|
| clinicalTrial |
0..*
|
List<Element>
|
| communication |
0..*
|
List<Communication>
|
| contact |
0..*
|
List<Contact>
|
| deceased[x] |
0..1
|
Boolean | DateTime
|
| disability |
0..*
|
List<Extension>
|
| ethnicity |
0..1
|
Extension
|
| gender |
1..1
|
code
|
| generalPractitioner |
0..*
|
List<Reference>
|
| identifier |
1..*
|
List<Identifier>
|
| link |
0..*
|
List<Link>
|
| managingOrganization |
0..1
|
Reference
|
| maritalStatus |
0..1
|
Concept
|
| militaryService |
0..1
|
Extension
|
| multipleBirth[x] |
0..1
|
Boolean | Integer
|
| name |
1..*
|
List<HumanName>
|
| nationality |
0..*
|
List<Element>
|
| photo |
0..*
|
List<Attachment>
|
| race |
0..1
|
Extension
|
| religion |
0..1
|
Extension
|
| telecom |
0..*
|
List<ContactPoint>
|
| telecom-preferred |
0..1
|
Extension
|
| telecom.id |
0..1
|
String
|
| telecom.period |
0..1
|
interval<DateTime>
|
| telecom.rank |
0..1
|
positiveInt
|
Key: = Must support, = QICore-defined extension, = Is-Modifier


Hello. I've searched the forums and haven't come up with a single hit for Drunken Master... I was wondering if it is even worthwhile to try this class... it seems like it would be fun to play. In my attempt, I started with a Str. Monk and moved to Drunken Master at lv.6. I'd like to get it as fast as possible. If anyone can give me advice on building a Drunken Master, I'd really appreciate it.
EDIT: in NWN, please _________________ Now is my day's work done; I'll take good breath: Rest, sword; thou hast thy fill of blood and death.
Edited By FinneousPJ on 11/24/05 15:46
It appears to be a PRC Prestige Class that i really can't see any use for 'cept maybe the impr disarm..
-DaMouse
hehe yeah its not really that great I just thought it'd be fun to play with... with the spitting fire and things =P
Wrong forums. go to the PRC forums.
Post moved here...


{% extends "base.html" %} {% block title %}Registration Successful{% endblock title %} {% block head %}Registration to Bountyful Coins Completed Successfully{% endblock head %} {% block content %}
Thank you for registering to Bountyful Coins. Your information has been saved. Now you can either login or go back to the main page of Bounties
{% endblock content %}


Four men arrested in Athy after family dispute with a machete
Crime
by Paula CampbellGardai arrested four men in Athy after a family dispute in which one man was seriously injured with a machete on November 23, at 2.10pm
Gardai were called to the Ardrew area of Athy to the scene of a serious assault.
Two gardai attended the incident and there was an ambulance at the scene on their arrival.
Gardai discovered that two vehicles had been involved in a ramming incident. Both vehicles had been damaged and a male was being treated at the scene.
The man who is in his early 50's was taken to Beaumont hospital after he sustained an serious head injury following an alleged machete attack. Three of the men remain in custody.


At first I thought that Ruby came with too many built-in iteration methods. Now, having gotten a glimpse of JavaScript, I lament that JavaScript only comes with 2 loops... WHILE and FOR.
Not to worry though. We can get creative with these 2 loops to build complex functions. First, it's worth noting that there are really only 2 types of loops:
WHILE loops fall into category A. Here is an example in JavaScript:
var n = 1;
while (n <= 3) {
n += 1;
console.log("n = " + n);
}
// Output:
// n = 2
// n = 3
// n = 4
n = 1
while n <= 3 do
n += 1
p "n = #{n}"
end
# Output:
# n = 2
# n = 3
# n = 4
FOR loops fall into Category B. Here is an example in JavaScript:
for (var n = 2; n < 5; n++) {
console.log("n = " + n);
}
// Output:
// n = 2
// n = 3
// n = 4
for n in 2..4 do
p "n = #{n}"
end
# Output:
# n = 2
# n = 3
# n = 4


San Jose police say explosives found at home near school
SAN JOSE, Calif. (AP) - San Jose police have arrested a man they say had improvised explosive devices at his home and they’re investigating whether he’s connected to a bomb found at a nearby school.
Police say Andrew White was taken into custody at around 2:30 a.m. Friday after an eight-hour standoff. Authorities say they found several devices at his home, prompting the evacuation of neighbors.
White was arrested on a drug warrant and for resisting arrest. It’s not immediately clear whether he has an attorney.
Investigators haven’t determined whether White is connected to a homemade bomb discovered Tuesday morning near a student parking lot at Oak Grove High School.
Nobody was hurt but the school was closed for a day.
White’s home is a few blocks from that school.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


Ariel Camus
Ariel Camus chilling On the Ibiza Beach
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Molestias ex
laboriosam commodi laudantium unde aut odit? Et libero unde aperiam
alias quasi quibusdam eligendi mollitia assumenda a, dignissimos
impedit, deserunt soluta placeat blanditiis est? Ratione ipsum commodi
inventore minima, cupiditate soluta quia veritatis fugiat quidem, illo
eveniet! Nihil libero nostrum veniam! Numquam temporibus porro incidunt
placeat qui, excepturi exercitationem sunt nihil, ab unde maiores quam
molestias magnam minus? Hic aliquid blanditiis omnis soluta atque, quo
corporis ducimus consequuntur autem magni ipsam deserunt, aperiam, eaque
officia aliquam debitis molestias voluptas mollitia rem quasi
necessitatibus quam. Ullam alias quasi esse nulla qui!
Click to see more
Ariel is an entrepreneur who has lived in San Francisco, Boston,
Argentina, Spain, Vietnam, and Indonesia. He is currently the founder of
Microverse, an online school for remote software developers with a mission
to educate and connect 1 million people with remote jobs by 2030.
Previously, Ariel was the co-founder and CEO of TouristEye, a travel
startup that he grew to 1 million users and sold to Lonely Planet in 2013.


Home
Users
Notes
Logged user:
Bob
| Roles:
[ROLE_USER,ROLE_ADMIN]
Logged user:
Bob
| Roles:
[ROLE_USER,ROLE_ADMIN]


Articolo #1
di Nicola Deidda
New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.
Visualizza tutti gli articoli
New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.
New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.
New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.
New York, the largest city in the U.S., is an architectural marvel with plenty of historic monuments, magnificent buildings and countless dazzling skyscrapers.
Pensato per chiunque voglia rilassarsi con qualche pillola di storia.
Ogni episodio del podcast si basa su canovacci esclusivi, che successivamente vengono adattati per diventare articoli da leggere.
Scopri di più


Previous: USING PROJECT FILES
C AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO C DATE: MAY 8, 1989 C Variables: C SCORE -> an array of test scores C SUM -> sum of the test scores C COUNT -> counter of scores read in C I -> loop counter REAL FUNCTION COMPAV(SCORE,COUNT) INTEGER SUM,COUNT,J,SCORE(5) DO 30 I = 1,COUNT SUM = SUM + SCORE(I) 30 CONTINUE COMPAV = SUM/COUNT END PROGRAM AVENUM C C MAIN PROGRAM C C AUTHOR: LOIS BIGBIE C DATE: MAY 15, 1990 C C Variables: C MAXNOS -> maximum number of input values C NUMS -> an array of numbers C COUNT -> exact number of input values C AVG -> average returned by COMPAV C I -> loop counter C PARAMETER(MAXNOS=5) INTEGER I, COUNT REAL NUMS(MAXNOS), AVG COUNT = 0 DO 80 I = 1,MAXNOS READ (5,*,END=100) NUMS(I) COUNT = COUNT + 1 80 CONTINUE 100 AVG = COMPAV(NUMS, COUNT) END
The compiler gives no error messages when this program is compiled. Yet here is what happens when it is run:
$ run average 70 90 85 <EOF> $
What happened? Why didn't the program do anything? The following is the output from ftnchek when it is used to debug the above program:
$ ftnchek -list -symtab average FTNCHEK Version 3.2 November 2002 File average.f: 1 C AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO 2 C DATE: MAY 8, 1989 3 4 C Variables: 5 C SCORE -> an array of test scores 6 C SUM -> sum of the test scores 7 C COUNT -> counter of scores read in 8 C I -> loop counter 9 10 REAL FUNCTION COMPAV(SCORE,COUNT) 11 INTEGER SUM,COUNT,J,SCORE(5) 12 13 DO 30 I = 1,COUNT 14 SUM = SUM + SCORE(I) 15 30 CONTINUE 16 COMPAV = SUM/COUNT ^ Warning near line 16 col 20: integer quotient expr SUM/COUNT converted to real 17 END 18 Module COMPAV: func: real Variables: Name Type Dims Name Type Dims Name Type Dims Name Type Dims COMPAV real COUNT intg I intg* J intg SCORE intg 1 SUM intg * Variable not declared. Type has been implicitly defined. Warning in module COMPAV: Variables declared but never referenced: J declared at line 11 Warning in module COMPAV: Variables may be used before set: SUM used at line 14 SUM set at line 14 Statement labels defined: Label Line StmtType <30> 15 exec 19 20 PROGRAM AVENUM 21 C 22 C MAIN PROGRAM 23 C 24 C AUTHOR: LOIS BIGBIE 25 C DATE: MAY 15, 1990 26 C 27 C Variables: 28 C MAXNOS -> maximum number of input values 29 C NUMS -> an array of numbers 30 C COUNT -> exact number of input values 31 C AVG -> average returned by COMPAV 32 C I -> loop counter 33 C 34 35 PARAMETER(MAXNOS=5) 36 INTEGER I, COUNT 37 REAL NUMS(MAXNOS), AVG 38 COUNT = 0 39 DO 80 I = 1,MAXNOS 40 READ (5,*,END=100) NUMS(I) 41 COUNT = COUNT + 1 42 80 CONTINUE 43 100 AVG = COMPAV(NUMS, COUNT) 44 END Module AVENUM: prog External subprograms referenced: COMPAV: real* Variables: Name Type Dims Name Type Dims Name Type Dims Name Type Dims AVG real COUNT intg I intg MAXNOS intg* NUMS real 1 * Variable not declared. Type has been implicitly defined. Warning in module AVENUM: Variables set but never used: AVG set at line 43 I/O Operations: Unit ID Unit No. Access Form Operation Line 5 SEQ FMTD READ 40 Statement labels defined: Label Line StmtType Label Line StmtType <80> 42 exec <100> 43 exec 0 syntax errors detected in file average.f 6 warnings issued in file average.f Warning: Subprogram COMPAV argument data type mismatch at position 1: Dummy arg SCORE in module COMPAV line 10 file average.f is type intg Actual arg NUMS in module AVENUM line 43 file average.f is type real
According to ftnchek, the program contains variables which may be used before they are assigned an initial value, and variables which are not needed. ftnchek also warns the user that an integer quotient has been converted to a real. This may assist the user in catching an unintended roundoff error. Since the -symtab flag was given, ftnchek prints out a table containing identifiers from the local module and their corresponding datatype and number of dimensions. Finally, ftnchek warns that the function COMPAV is not used with the proper type of arguments.
With ftnchek's help, we can debug the program. We can see that there were the following errors:
We also see that I, not J, should have been declared INTEGER in function COMPAV. Also, MAXNOS was not declared as INTEGER, nor COMPAV as REAL, in program AVENUM. These are not errors, but they may indicate carelessness. As it happened, the default type of these variables coincided with the intended type.
Here is the corrected program, and its output when run:
C AUTHORS: MIKE MYERS AND LUCIA SPAGNUOLO C DATE: MAY 8, 1989 C C Variables: C SCORE -> an array of test scores C SUM -> sum of the test scores C COUNT -> counter of scores read in C I -> loop counter C REAL FUNCTION COMPAV(SCORE,COUNT) INTEGER SUM,COUNT,I,SCORE(5) C SUM = 0 DO 30 I = 1,COUNT SUM = SUM + SCORE(I) 30 CONTINUE COMPAV = FLOAT(SUM)/FLOAT(COUNT) END C C PROGRAM AVENUM C C MAIN PROGRAM C C AUTHOR: LOIS BIGBIE C DATE: MAY 15, 1990 C C Variables: C MAXNOS -> maximum number of input values C NUMS -> an array of numbers C COUNT -> exact number of input values C AVG -> average returned by COMPAV C I -> loop counter C C INTEGER MAXNOS PARAMETER(MAXNOS=5) INTEGER I, NUMS(MAXNOS), COUNT REAL AVG,COMPAV COUNT = 0 DO 80 I = 1,MAXNOS READ (5,*,END=100) NUMS(I) COUNT = COUNT + 1 80 CONTINUE 100 AVG = COMPAV(NUMS, COUNT) WRITE(6,*) 'AVERAGE =',AVG END $ run average 70 90 85 <EOF> AVERAGE = 81.66666 $
With ftnchek's help, our program is a success!
Next: INTERPRETING THE OUTPUT