nips nips2004 nips2004-139 nips2004-139-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Vladimir Koltchinskii, Manel Martínez-ramón, Stefan Posse
Abstract: We study a method of optimal data-driven aggregation of classiﬁers in a convex combination and establish tight upper bounds on its excess risk with respect to a convex loss function under the assumption that the solution of optimal aggregation problem is sparse. We use a boosting type algorithm of optimal aggregation to develop aggregate classiﬁers of activation patterns in fMRI based on locally trained SVM classiﬁers. The aggregation coefﬁcients are then used to design a ”boosting map” of the brain needed to identify the regions with most signiﬁcant impact on classiﬁcation. 1
[1] Tsybakov, A. (2003) Optimal rates of aggregation. In: COLT2003, Lecture Notes in Artiﬁcial Intelligence, Eds.: M. Warmuth and B. Schoelkopf, Springer.
[2] Cox, D.D., Savoy, R.L. (2003) Functional magnetic resonance imaging (fMRI) ”brain reading”: detecting and classifying distributed patterns of fMRI activity in human visual cortex, Neuroimage19, 2, 261–70.
[3] Friedman, J., Hastie, T., Rosset, S., Tibshirani, R. and Zhu, J. (2004) Discussion on Boosting, Annals of Statistics, 32, 1, 102–107.
[4] Bartlett, P. L., Jordan, M.I., McAuliffe, J. D. (2003) Convexity, classiﬁcation, and risk bounds. Technical Report 638, Department of Statistics, U.C. Berkeley, 2003. Journal of the American Statistical Association.To appear.
[5] Koltchinskii, V., Panchenko, D. and Lozano, F. (2003) Bounding the generalization error of combined classiﬁers: balancing the dimensionality and the margins. A. Appl. Prob. , 13, 1.
[6] Koltchinskii, V., Panchenko, D. and Andonova, S. (2003) Generalization bounds for voting classiﬁers based on sparsity and clustering. In: COLT2003, Lecture Notes in Artiﬁcial Intelligence, Eds.: M. Warmuth and B. Schoelkopf, Springer.
[7] Blanchard, G., Lugosi, G. and Vayatis, N. (2003) On the rates of convergence of regularized boosting classiﬁers. Journal of Machine Learning Research 4, 861-894.
[8] Koltchinskii, V. (2003) Local Rademacher Complexities and Oracle Inequalities in Risk Minimization. Preprint.
[9] Schapire, R. E. (1999) A brief Introduction to Boosting. In: Proc. of the 6th Intl. Conf. on Artiﬁcial Inteligence.
[10] Friston, K., Frith, C., Liddle, P. and Frackowiak, R. (1991) Comparing functional (PET) images: the assessment of signiﬁcant change. J. Cereb. Blood Flow Met.11, 690-699
[11] Allwein, E. L., Schapire, R. E., and Singer, Y. (2000) Reducing multiclass to binary: A unifying approach for margin classiﬁers. J. Machine Learning Research, 1, 113-141.


{% extends "templates/nav.html" %} {% block title %}: {{ _("The Observatory of Economic Complexity") }}{% endblock %} {% block body %}
{{ _("We are the world's leading visualization engine for international trade data.") }}
{{ _("Learn More") }}


Browsers usually insert quotation marks around the q element.
WWF's goal is to: Build a future where people live in harmony with nature.
Build a future where people live in harmony with nature.


Linear model change¶
Description¶
Let \(0<t_1<t_2<\dots<n\) be unknown change points indexes. Consider the following multiple linear regression model
for \(j>1\). Here, the observed dependant variable is \(y_t\in\mathbb{R}\), the covariate vector is \(x_t \in\mathbb{R}^p\), the disturbance is \(\varepsilon_t\in\mathbb{R}\). The vectors \(\delta_j\in\mathbb{R}^p\) are the paramater vectors (or regression coefficients).
The least-squares estimates of the break dates is obtained by minimiming the sum of squared residuals [CLBP03]. Formally, the associated cost function on an interval \(I\) is
\[c(y_{I}) = \min_{\delta\in\mathbb{R}^p} \sum_{t\in I} \|y_t - \delta' z_t \|_2^2\]
Usage¶
Start with the usual imports and create a signal with piecewise linear trends.
import numpy as np
import matplotlib.pylab as plt
import ruptures as rpt
# creation of data
n, n_reg = 2000, 3 # number of samples, number of regressors (including intercept)
n_bkps, sigma = 3, 5 # number of change points, noise standart deviation
# regressors
tt = np.linspace(0, 10*np.pi, n)
X = np.vstack((np.sin(tt), np.sin(5*tt), np.ones(n))).T
# parameter vectors
deltas, bkps = rpt.pw_constant(n, n_reg, n_bkps, noise_std=None, delta=(1, 3))
# observed signal
y = np.sum(X*deltas, axis=1)
y += np.random.normal(size=y.shape)
# display signal
rpt.show.display(y, bkps, figsize=(10, 6))
plt.show()
Then create a CostLinear
instance and print the cost of the sub-signal
signal[50:150]
.
# stack observed signal and regressors.
# first dimension is the observed signal.
signal = np.column_stack((y.reshape(-1, 1), X))
c = rpt.costs.CostLinear().fit(signal)
print(c.error(50, 150))
You can also compute the sum of costs for a given list of change points.
print(c.sum_of_costs(bkps))
print(c.sum_of_costs([10, 100, 200, 250, n]))
In order to use this cost class in a change point detection algorithm (inheriting from
BaseEstimator
), either pass a CostLinear
instance (through the argument
'custom_cost'
) or set model="linear"
.
c = rpt.costs.CostLinear(); algo = rpt.Dynp(custom_cost=c)
# is equivalent to
algo = rpt.Dynp(model="linear")
Code explanation¶
-
class
ruptures.costs.
CostLinear
[source]¶ Least-squares estimate for linear changes.
References
- CLBP03
J. Bai and P. Perron. Critical values for multiple structural change tests. Econometrics Journal, 6(1):72–78, 2003.


Select a problem to add for exam {{test.date|date:"Y. m. d."}} {{test.name}} group: {{test.group}}
Name
Score
View
Select
{% for problem in problem_list %}
{{problem.name}}
{{problem.score}}
select
{% endfor %}
{% include "footer.html" %}


Object
A MongoDB database.
Instances of DB are normally obtained by calling Mongo#db.
@param [String] name the database name. @param [Mongo::MongoClient] client a connection object pointing to MongoDB. Note
that databases are usually instantiated via the MongoClient class. See the examples below.
@option opts [Boolean] :strict (False) If true, collections must exist to be accessed and must
not exist to be created. See DB#collection and DB#create_collection.
@option opts [Object, create_pk(doc)] :pk (BSON::ObjectId) A primary key factory object,
which should take a hash and return a hash which merges the original hash with any primary key fields the factory wishes to inject. (NOTE: if the object already has a primary key, the factory should not inject a new key).
@option opts [String, Integer, Symbol] :w (1) Set default number of nodes to which a write
should be acknowledged
@option opts [Boolean] :j (false) Set journal acknowledgement @option opts [Integer] :wtimeout (nil) Set replica set acknowledgement timeout @option opts [Boolean] :fsync (false) Set fsync acknowledgement.
Notes on write concern: These write concern options are propagated to Collection objects instantiated off of this DB. If no options are provided, the default write concern set on this instance's MongoClient object will be used. This default can be overridden upon instantiation of any collection by explicitly setting write concern options on initialization or at the time of an operation.
@option opts [Integer] :cache_time (300) Set the time that all ensure_index calls should cache the command.
@core databases constructor_details
# File lib/mongo/db.rb, line 88 def initialize(name, client, opts={}) @name = Mongo::Support.validate_db_name(name) @connection = client @strict = opts[:strict] @pk_factory = opts[:pk] @write_concern = get_write_concern(opts, client) @read = opts[:read] || @connection.read Mongo::ReadPreference::validate(@read) @tag_sets = opts.fetch(:tag_sets, @connection.tag_sets) @acceptable_latency = opts.fetch(:acceptable_latency, @connection.acceptable_latency) @cache_time = opts[:cache_time] || 300 #5 minutes. end
Adds a stored Javascript function to the database which can executed server-side in map_reduce, db.eval and $where clauses.
@param [String] function_name @param [String] code
@return [String] the function name saved to the database
# File lib/mongo/db.rb, line 163 def add_stored_function(function_name, code) self[SYSTEM_JS_COLLECTION].save( { "_id" => function_name, :value => BSON::Code.new(code) } ) end
Adds a user to this database for use with authentication. If the user already exists in the system, the password will be updated.
@param [String] username @param [String] password @param [Boolean] read_only
Create a read-only user.
@return [Hash] an object representing the user.
# File lib/mongo/db.rb, line 195 def add_user(username, password, read_only = false) users = self[SYSTEM_USER_COLLECTION] user = users.find_one({:user => username}) || {:user => username} user['pwd'] = Mongo::Support.hash_password(username, password) user['readOnly'] = true if read_only; users.save(user) return user end
Authenticate with the given username and password. Note that mongod must be started with the –auth option for authentication to be enabled.
@param [String] username @param [String] password @param [Boolean] save_auth
Save this authentication to the client object using MongoClient#add_auth. This will ensure that the authentication will be applied on database reconnect. Note that this value must be true when using connection pooling.
@return [Boolean]
@raise [AuthenticationError]
@core authenticate authenticate-instance_method
# File lib/mongo/db.rb, line 118 def authenticate(username, password, save_auth=true) if @connection.pool_size > 1 if !save_auth raise MongoArgumentError, "If using connection pooling, :save_auth must be set to true." end end begin socket = @connection.checkout_reader(:primary_preferred) issue_authentication(username, password, save_auth, :socket => socket) ensure socket.pool.checkin(socket) if socket end @connection.authenticate_pools end
Get a collection by name.
@param [String, Symbol] name the collection name. @param [Hash] opts any valid options that can be passed to Collection#new.
@raise [MongoDBError] if collection does not already exist and we’re in
+strict+ mode.
@return [Mongo::Collection]
# File lib/mongo/db.rb, line 324 def collection(name, opts={}) if strict? && !collection_names.include?(name.to_s) raise Mongo::MongoDBError, "Collection #{name} doesn't exist. " + "Currently in strict mode." else opts = opts.dup opts.merge!(:pk => @pk_factory) unless opts[:pk] Collection.new(name, self, opts) end end
Get an array of collection names in this database.
@return [Array]
# File lib/mongo/db.rb, line 246 def collection_names names = collections_info.collect { |doc| doc['name'] || '' } names = names.delete_if {|name| name.index(@name).nil? || name.index('$')} names.map {|name| name.sub(@name + '.', '')} end
Get an array of Collection instances, one for each collection in this database.
@return [Array<Mongo::Collection>]
# File lib/mongo/db.rb, line 255 def collections collection_names.map do |name| Collection.new(name, self) end end
Get info on system namespaces (collections). This method returns a cursor which can be iterated over. For each collection, a hash will be yielded containing a ‘name’ string and, optionally, an ‘options’ hash.
@param [String] coll_name return info for the specified collection only.
@return [Mongo::Cursor]
# File lib/mongo/db.rb, line 268 def collections_info(coll_name=nil) selector = {} selector[:name] = full_collection_name(coll_name) if coll_name Cursor.new(Collection.new(SYSTEM_NAMESPACE_COLLECTION, self), :selector => selector) end
Send a command to the database.
Note: DB commands must start with the “command” key. For this reason, any selector containing more than one key must be an OrderedHash.
Note also that a command in MongoDB is just a kind of query that occurs on the system command collection ($cmd). Examine this method’s implementation to see how it works.
@param [OrderedHash, Hash] selector an OrderedHash, or a standard Hash with just one key, specifying the command to be performed. In Ruby 1.9, OrderedHash isn’t necessary since hashes are ordered by default.
@option opts [Boolean] :check_response (true) If true, raises an exception if the
command fails.
@option opts [Socket] :socket a socket to use for sending the command. This is mainly for internal use. @option opts [:primary, :secondary] :read Read preference for this command. See Collection#find for
more details.
@option opts [String] :comment (nil) a comment to include in profiling logs
@return [Hash]
@core commands command_instance-method
# File lib/mongo/db.rb, line 517 def command(selector, opts={}) check_response = opts.fetch(:check_response, true) socket = opts[:socket] raise MongoArgumentError, "command must be given a selector" unless selector.is_a?(Hash) && !selector.empty? if selector.keys.length > 1 && RUBY_VERSION < '1.9' && selector.class != BSON::OrderedHash raise MongoArgumentError, "DB#command requires an OrderedHash when hash contains multiple keys" end if read_pref = opts[:read] Mongo::ReadPreference::validate(read_pref) unless read_pref == :primary || Mongo::Support::secondary_ok?(selector) raise MongoArgumentError, "Command is not supported on secondaries: #{selector.keys.first}" end end begin result = Cursor.new(system_command_collection, :limit => -1, :selector => selector, :socket => socket, :read => read_pref, :comment => opts[:comment]).next_document rescue OperationFailure => ex raise OperationFailure, "Database command '#{selector.keys.first}' failed: #{ex.message}" end if result.nil? raise OperationFailure, "Database command '#{selector.keys.first}' failed: returned null." elsif (check_response && !ok?(result)) message = "Database command '#{selector.keys.first}' failed: (" message << result.map do |key, value| "#{key}: '#{value}'" end.join('; ') message << ').' code = result['code'] || result['assertionCode'] raise OperationFailure.new(message, code, result) else result end end
Create a collection.
new collection. If strict is true, will raise an error if collection name already exists.
@param [String, Symbol] name the name of the new collection.
@option opts [Boolean] :capped (False) created a capped collection.
@option opts [Integer] :size (Nil) If capped is true,
specifies the maximum number of bytes for the capped collection. If +false+, specifies the number of bytes allocated for the initial extent of the collection.
@option opts [Integer] :max (Nil) If capped is true, indicates
the maximum number of records in a capped collection.
@raise [MongoDBError] raised under two conditions:
either we're in +strict+ mode and the collection already exists or collection creation fails on the server.
@return [Mongo::Collection]
# File lib/mongo/db.rb, line 296 def create_collection(name, opts={}) name = name.to_s if collection_names.include?(name) if strict? raise MongoDBError, "Collection #{name} already exists. " + "Currently in strict mode." else return Collection.new(name, self, opts) end end # Create a new collection. oh = BSON::OrderedHash.new oh[:create] = name doc = command(oh.merge(opts || {})) return Collection.new(name, self, :pk => @pk_factory) if ok?(doc) raise MongoDBError, "Error creating collection: #{doc.inspect}" end
Dereference a DBRef, returning the document it points to.
@param [Mongo::DBRef] dbref
@return [Hash] the document indicated by the db reference.
@see www.mongodb.org/display/DOCS/DB+Ref MongoDB DBRef spec.
# File lib/mongo/db.rb, line 406 def dereference(dbref) collection(dbref.namespace).find_one("_id" => dbref.object_id) end
Drop a collection by name.
@param [String, Symbol] name
@return [Boolean] true on success or false if the collection name doesn’t exist.
# File lib/mongo/db.rb, line 341 def drop_collection(name) return true unless collection_names.include?(name.to_s) ok?(command(:drop => name)) end
Drop an index from a given collection. Normally called from Collection#drop_index or Collection#drop_indexes.
@param [String] collection_name @param [String] index_name
@return [True] returns true on success.
@raise MongoDBError if there’s an error dropping the index.
# File lib/mongo/db.rb, line 454 def drop_index(collection_name, index_name) oh = BSON::OrderedHash.new oh[:deleteIndexes] = collection_name oh[:index] = index_name.to_s doc = command(oh, :check_response => false) ok?(doc) || raise(MongoDBError, "Error with drop_index command: #{doc.inspect}") end
Return true if an error was caused by the most recently executed database operation.
@return [Boolean]
# File lib/mongo/db.rb, line 370 def error? get_last_error['err'] != nil end
Evaluate a JavaScript expression in MongoDB.
@param [String, Code] code a JavaScript expression to evaluate server-side. @param [Integer, Hash] args any additional argument to be passed to the code expression when
it's run on the server.
@return [String] the return value of the function.
# File lib/mongo/db.rb, line 417 def eval(code, *args) if not code.is_a? BSON::Code code = BSON::Code.new(code) end oh = BSON::OrderedHash.new oh[:$eval] = code oh[:args] = args doc = command(oh) doc['retval'] end
A shortcut returning db plus dot plus collection name.
@param [String] collection_name
@return [String]
# File lib/mongo/db.rb, line 563 def full_collection_name(collection_name<EMAIL_ADDRESS>end
Run the getlasterror command with the specified replication options.
@option opts [Boolean] :fsync (false) @option opts [Integer] :w (nil) @option opts [Integer] :wtimeout (nil) @option opts [Boolean] :j (false)
@return [Hash] the entire response to getlasterror.
@raise [MongoDBError] if the operation fails.
# File lib/mongo/db.rb, line 357 def get_last_error(opts={}) cmd = BSON::OrderedHash.new cmd[:getlasterror] = 1 cmd.merge!(opts) doc = command(cmd, :check_response => false) raise MongoDBError, "error retrieving last error: #{doc.inspect}" unless ok?(doc) doc end
Get information on the indexes for the given collection. Normally called by Collection#index_information.
@param [String] collection_name
@return [Hash] keys are index names and the values are lists of [key, direction] pairs
defining the index.
# File lib/mongo/db.rb, line 469 def index_information(collection_name) sel = {:ns => full_collection_name(collection_name)} info = {} Cursor.new(Collection.new(SYSTEM_INDEX_COLLECTION, self), :selector => sel).each do |index| info[index['name']] = index end info end
# File lib/mongo/db.rb, line 135 def issue_authentication(username, password, save_auth=true, opts={}) doc = command({:getnonce => 1}, :check_response => false, :socket => opts[:socket]) raise MongoDBError, "Error retrieving nonce: #{doc}" unless ok?(doc) nonce = doc['nonce'] auth = BSON::OrderedHash.new auth['authenticate'] = 1 auth['user'] = username auth['nonce'] = nonce auth['key'] = Mongo::Support.auth_key(username, password, nonce) if ok?(doc = self.command(auth, :check_response => false, :socket => opts[:socket])) if save_auth @connection.add_auth(@name, username, password) end true else message = "Failed to authenticate user '#{username}' on db '#{self.name}'" raise Mongo::AuthenticationError.new(message, doc['code'], doc) end end
# File lib/mongo/db.rb, line 233 def issue_logout(opts={}) doc = command({:logout => 1}, :socket => opts[:socket]) if ok?(doc) @connection.remove_auth(@name) true else raise MongoDBError, "error logging out: #{doc.inspect}" end end
Deauthorizes use for this database for this client connection. Also removes any saved authentication in the MongoClient class associated with this database.
@raise [MongoDBError] if logging out fails.
@return [Boolean]
# File lib/mongo/db.rb, line 225 def logout(opts={}) if @connection.pool_size > 1 @connection.logout_pools(@name) end issue_logout(opts) end
Return true if the supplied doc contains an ‘ok’ field with the value 1.
@param [Hash] doc
@return [Boolean]
# File lib/mongo/db.rb, line 490 def ok?(doc) Mongo::Support.ok?(doc) end
The primary key factory object (or nil).
@return [Object, Nil]
# File lib/mongo/db.rb, line 570 def pk_factory @pk_factory end
Specify a primary key factory if not already set.
@raise [MongoArgumentError] if the primary key factory has already been set.
# File lib/mongo/db.rb, line 577 def pk_factory=(pk_factory) if @pk_factory raise MongoArgumentError, "Cannot change primary key factory once it's been set" end @pk_factory = pk_factory end
Get the most recent error to have occurred on this database.
This command only returns errors that have occurred since the last call to DB#reset_error_history - returns nil if there is no such error.
@return [String, Nil] the text of the error or nil if no error has occurred.
# File lib/mongo/db.rb, line 380 def previous_error error = command(:getpreverror => 1) if error["err"] error else nil end end
Get the current profiling information.
@return [Array] a list of documents containing profiling information.
# File lib/mongo/db.rb, line 631 def profiling_info Cursor.new(Collection.new(SYSTEM_PROFILE_COLLECTION, self), :selector => {}).to_a end
Return the current database profiling level. If profiling is enabled, you can get the results using DB#profiling_info.
@return [Symbol] :off, :slow_only, or :all
@core profiling profiling_level-instance_method
# File lib/mongo/db.rb, line 591 def profiling_level oh = BSON::OrderedHash.new oh[:profile] = -1 doc = command(oh, :check_response => false) raise "Error with profile command: #{doc.inspect}" unless ok?(doc) && doc['was'].kind_of?(Numeric) case doc['was'].to_i when 0 :off when 1 :slow_only when 2 :all else raise "Error: illegal profiling level value #{doc['was']}" end end
Set this database’s profiling level. If profiling is enabled, you can get the results using DB#profiling_info.
@param [Symbol] level acceptable options are :off, :slow_only, or :all.
# File lib/mongo/db.rb, line 612 def profiling_level=(level) oh = BSON::OrderedHash.new oh[:profile] = case level when :off 0 when :slow_only 1 when :all 2 else raise "Error: illegal profiling level value #{level}" end doc = command(oh, :check_response => false) ok?(doc) || raise(MongoDBError, "Error with profile command: #{doc.inspect}") end
Removes stored Javascript function from the database. Returns false if the function does not exist
@param [String] function_name
@return [Boolean]
# File lib/mongo/db.rb, line 178 def remove_stored_function(function_name) if self[SYSTEM_JS_COLLECTION].find_one({"_id" => function_name}) self[SYSTEM_JS_COLLECTION].remove({"_id" => function_name}, :w => 1) else return false end end
Remove the given user from this database. Returns false if the user doesn’t exist in the system.
@param [String] username
@return [Boolean]
# File lib/mongo/db.rb, line 210 def remove_user(username) if self[SYSTEM_USER_COLLECTION].find_one({:user => username}) self[SYSTEM_USER_COLLECTION].remove({:user => username}, :w => 1) else return false end end
Rename a collection.
@param [String] from original collection name. @param [String] to new collection name.
@return [True] returns true on success.
@raise MongoDBError if there’s an error renaming the collection.
# File lib/mongo/db.rb, line 437 def rename_collection(from, to) oh = BSON::OrderedHash.new oh[:renameCollection] =<EMAIL_ADDRESS>oh[:to] =<EMAIL_ADDRESS>doc = DB.new('admin', @connection).command(oh, :check_response => false) ok?(doc) || raise(MongoDBError, "Error renaming collection: #{doc.inspect}") end
Reset the error history of this database
Calls to DB#previous_error will only return errors that have occurred since the most recent call to this method.
@return [Hash]
# File lib/mongo/db.rb, line 395 def reset_error_history command(:reseterror => 1) end
Return stats on this database. Uses MongoDB’s dbstats command.
@return [Hash]
# File lib/mongo/db.rb, line 481 def stats self.command({:dbstats => 1}) end
Returns the value of the strict flag.
# File lib/mongo/db.rb, line 45 def strict?; @strict; end
Validate a named collection.
@param [String] name the collection name.
@return [Hash] validation information.
@raise [MongoDBError] if the command fails or there’s a problem with the validation
data, or if the collection is invalid.
# File lib/mongo/db.rb, line 643 def validate_collection(name) cmd = BSON::OrderedHash.new cmd[:validate] = name cmd[:full] = true doc = command(cmd, :check_response => false) if !ok?(doc) raise MongoDBError, "Error with validate command: #{doc.inspect}" end if (doc.has_key?('valid') && !doc['valid']) || (doc['result'] =~ /\b(exception|corrupt)\b/) raise MongoDBError, "Error: invalid collection #{name}: #{doc.inspect}" end doc end
Generated with the Darkfish Rdoc Generator 2.


I know the date says, "10/5/2015," but in all honesty it is closer to 10/6, and it most likely will be by the time I am done writing this post. Before I turn in for the night, I wanted to share some information I have been jumping headlong into for the past week or so about version control. If you aren't familiar with version control, it is a way keeping tabs on and managing files through different iterations. For Developers, especially when collaborating, it is essential to track progress and create backups, and version control makes those interactions more fluid. Version control allows multiple Developers to work on a single file at the same time and merge together those changes into a more solidified file.
The version control system I've played around with is Git. Git is an open-source version control system, so it is free to use. Even for a coding novice, such as myself, I found navigating my way through Git straightforward. Git allows you to maneuver your way through files and make changes by entering text commands into your terminal.
Another great tool to use when talking about version control systems is GitHub. GitHub lives remotely, on the internet, while Git is lives locally on one's computer. Because GitHub can be accessed remotely by multiple users, it is preferred when collaborating on projects. One nifty feature on GitHub is the ability to fork (or copy) public files and clone that copy on to your computer, so anyone can collaborate and provide innovation. Since changes to files are compiled into multiple save points called commits, developers can refer to previous commits to see when something went wrong and pick up where they left off. If the changes are a good fit, they can be merged into the master file.
Hopefully you were able to take away some basic information on version control and version control systems so you can "Git" a head start in tracking the progress and changes of your projects.


2016 AUVSI SUAS Competition Day 1
Hi everyone,
Rijesh, Jorge, Sebastian, Johnathan, Andrew, and I have arrived safely in Lexington Park, Maryland for the 2016 AUVSI Student UAS Competition. This will be a quick update, as the only competition event today was the team check-in and briefing.
The plane in the crate, VERY nicely packed.
We learned today at the briefing that out of the 46 teams originally registered, only 24 teams (including, of course, us) made it to competition. Only ~30 teams managed to submit a journal paper, and more teams dropped off during the checks for a proof of flight video and proof of interfacing with the interoperability server. This is significantly less teams than were present last year (30); we feel good about being one of the teams that successfully passed the increased requirements for this year's competition.
Schedule for the next few days:
- Thursday, June 16th - Flight Readiness Review and Safety Inspection.
- Friday, June 17th and Saturday, June 18th - Competition flights. The weather forecast for Friday indicates thunderstorms, so flights will most likely have to occur all the way to late Saturday afternoon. Saturday is also the date of the competition banquet.
- Sunday, June 19th - Rain day (spillover for competition flights). Which might have to be used.
- Monday, June 20th - ???
- Tuesday, June 21st - Return home.
We'll keep you updated right here on this blog - stay tuned!
Johnathan, Jorge, and Sebastian. And Rijesh trying to take photos in peace.
Cindy


| Apache server? | {% if is_a == true %} OK {% else %} No Apache server found. BicBucStriim should work with other HTTP servers, too. But it needs URL rewriting as defined in the file .htaccess. Please check. {% endif %} |
| Server software/version | {{srv}} |
| Is URL rewriting (mod_rewrite) enabled? | {% if mre == true %} OK {% else %} Unable to check. Please check manually. {% endif %} |
| Is the data directory writeable? | {% if dwrit == true %} OK {% else %} The data directory doesn't exist or is not writeable! {% endif %} |
| Is data/metadata.db writeable? | {% if mwrit == true %} OK {% else %} The file data/metadata.db doesn't exist or is not writeable! {% endif %} |
| Is sqlite3 installed? | {% if hsql != false %} OK {% else %} No sqlite3 installed! Please install PHP support for sqlite3. {% endif %} |


 The film is adapted from the novel by Haitian author Dany Laferrière. The thin story never moves far away from its sophomoric attempt to shock and irritate a white male audience about its simplistic findings, but something that is certainly thought of in a very real way and taken to be a serious generalization by Western society. To accomplish this parody, everyone in the film becomes a cliché figure, with the main stud taking on every positive sexual myth of his prowess that he could about how good in bed the Negro is.
It seems this film will have you believe that every white girl in the film is dying to try out this sex God for themselves, and with the stud evoking what goes for a cool attitude, too willing to please one and all, the film becomes ridiculous in its banality without getting to how racist its theme is.   The film by reducing everyone to being what their color of skin is, as it fails to get at truths that are more than skin-deep.  If the main character in a spicy spoof like this one, can't be likable, then the film has no chance of succeeding.
It was a difficult film to just see this as a playful venture, which it should have been, but what made matters worse, was that it took itself seriously and tried to make a forced case about racial prejudice, using absurd scenes to try and show how white men feel inferior to the Negro when it comes to sex and therefore will do anything to get back at the Negro. I assume this film was trying to be funny, but its story was so full of generalizations that it was not possible to get by that and see people as they really are and not as stereotypes.
This film probably does more harm to racial relations than it does good. It is a film that the KKK could easily agree with its findings, failing to see that the film was meant to be tongue-in-cheek. And that's the problem with the film, the satire had no power, as the film seemed more real than ironic.
In the Monteal setting, three carefree bachelors share an apartment; Bouba (Kotto), who is a devout Moslem and is the resident sage who loves his sleep, Freud, tea, jazz, and a good conversation; the other roommate is a friendly white boy (Durand), who rides his bike around the park and seems awkward around women; and, the main man in the film, Fluke (Isaach De Bankole), whose main purpose in life is to score as many white chicks as he can by using his Negro sexual prowess and affable charms. You can't insult him, he's almost impervious in his feelings to being put down. He is also an aspiring writer, who takes his typewriter to the park, where he writes a novel about his sexual adventures when he isn't too busy trying to pick up every white girl he sees.
Jacques W. Benoît's French-Canadian film is a dehumanizing experience, a film of missed opportunities to explore interracial realtionships, it is so dehumanizing that it doesn't even give the girls real names the stud has sex with, they are just given names like Miz Literature, Miz Tickle-Tickle, Miz Redhead, and so on. The boring life of Fluke is made exciting by the one-night stands he has with the girls whom he picks up and then talks about them as if they were products. Outside of his sex, it is hard to find anything he does that is even remotelty interesting. That he wishes to be a writer and succeeds at it by the film's finale, typing as if he were banging on a drum, was hard to swallow. The only thing that was credible about the stud, was the enormous ego he had, it must have been as big as his...well, you know what I mean.
REVIEWED ON 10/19/2000 GRADE: C-
Dennis Schwartz: "Ozus' World Movie Reviews"
© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Home media center meta-tutorial with miniDLNA, Raspberry Pi, Deluge and Apple TV
For a few months now I have been enjoying a new home media system that I threw together with my Raspberry Pi. My setup allows me sit in my living room and stream content from my Raspberry Pi to my 4th Generation Apple TV in full 1080p resolution. The Raspberry Pi is a small, inexpensive stand-alone computer, but it can serve as a powerful media server, and I’ve been blown away by its consistent performance. Rather than write everything from scratch, I’ve gathered the tutorials I used when setting up my devices and software and sprinkled it with a few bits of knowledge that I wish I knew when I started.
Here is an overview of my current setup:
- Raspberry Pi Model 2 B with miniDLNA (media server), Deluge (for torrenting media), TorGuard (anonymous VPN service) and omxplayer (built-in Raspberry Pi media player for playing media right on the Raspberry Pi)
- Apple TV with VLC app (for streaming content from my network-connected Raspberry Pi via miniDLNA)
- iPhone/iPad with Creation 5 + Creation 2 Video Player (for streaming content from my Raspberry Pi to my mobile devices)
Here’s what you’ll need:
- Raspberry Pi (Model 2 or 3)
- Wifi-connection
- Laptop (you will be SSHing into the Raspberry Pi and managing your torrent downloads through a web-browser interface on your laptop)
- Sufficiently large microSD card (mine is 64GB), large USB drive (I recommend 256GB) or external hard drive (1TB)
- TorGuard account (optional)
- Apple TV (optional)
- iPhone or iPad with Creation 5 and Creation 2 Video player app installed (optional)
Virtual Private Network (VPN)
If you are planning on downloading Copyrighted content from a public tracker, you should be using a virtual private network (VNP). I have been using TorGuard for about 6 months and have had excellent service, great download speeds and setup was fairly painless.
Follow along with this tutorial on how to get TorGuard running on your Raspberry Pi.
miniDLNA
Next, we will install miniDLNA on your Raspberry Pi. miniDLNA stands for (mini) Digital Network Living Alliance and is a protocol that is used in many devices, including consoles, SmartTVs, and mobile devices. To install it, follow along with this Instructables tutorial. Step 4 (Mounting the drive on startup) is not absolutely necessary, but it is a good idea if you will be using a dedicated external USB drive or external hard drive to store your content. I don’t have a dedicated USB stick that I use with miniDLNA, but it works just fine playing content from my 64GB microSD card.
Download Creation 5 and Creation 2 Video Player on your iPhone. These are free apps with very minimal advertising. Through the Creation 5 app, you should be able to select your miniDLNA server as a media source. You should then see your Music, Image and Video folders that you just configured, but they will all be empty.
BitTorrent Client (Deluge)
Now that you have your VPN and miniDLNA set up, you will want to try it out with some new content. I use Deluge, a BitTorrent client written in Python, but there are plenty of other great options out there. Deluge is fairly light-weight, so it works well with the Raspberry Pi. There are a number of ways that you can access Deluge, I prefer to use the Deluge WebUI. Here’s one more tutorial from How-to Geek that talks about a few different ways to install and configure Deluge. I recommend jumping to the Setting up Deluge for WebUI Access
section and running the three commands you will need to get started:
$ sudo apt-get install deluged
$ sudo apt-get install python-mako
$ sudo apt-get install deluge-web
This gets everything installed. To use Deluge, you will need to run two more commands:
$ deluged
$ deluge-web&
deluged
runs the Deluge daemon (a background process; the d
at the end of deluge
signifies that it is a daemon) that will start Deluge. deluge-web&
starts that web interface that should be available at http://
You can set Deluge to save downloaded files directly into your various miniDLNA folders, but you will need to restart miniDLNA with the following commands before they are visible on your network. SSH into your Raspberry Pi by running the following command:
$ ssh pi@<your raspberry pi ip address>
If you don’t know your Raspberry Pi’s IP address, run following command:
$ ifconfig
Look at the output under wlan0
and it will be the address following inet addr
, something like <IP_ADDRESS>
or <IP_ADDRESS>
. To clarify, this is your Raspberry Pi’s internal IP address; it is assigned to your Raspberry Pi by your home network and it has nothing to do with the external IP address that you set up with TorGuard.
Enter your Raspberry Pi’s login and password and then enter the following commands once you have established an SSH connection:
$ sudo service minidlna restart
$ sudo service minidlna force-reload
Now you should be able to see your content in media players that support miniDLNA.
Here are some additional resources for help with miniDLNA on Ubuntu.com.
Before you start downloading content, I would use use TorGuard’s Check My Torrent IP Address tool. This is a blank .torrent
file that you add to Deluge. In the torrent’s tracker information you can see the Public IP address that is listed on the public tracker. This would be the address that Digital Millennium Copyright Act (DMCA) would report to your ISP if it was your public IP address, so make sure it is not your public IP address that you use in your home. You can select proxy IP address from a number of different countries in the TorGuard setup.
VLC for tvOS
VLC is a great media player, and you probably have it downloaded on your computer. You might not have know that VLC has an app for the Apple TV. This app supports the playback of media from miniDLNA servers like the one you just set up, so you can stream content directly from your Raspberry Pi onto your Apple TV through the VLC app. One thing to note, however, is that VLC for tvOS does not support AC3 audio encodings, but you should be good to go for almost any other audio/video format on the planet.
Conclusion
Using the Raspberry Pi certainly isn’t necessary for simply downloading torrents, but having it set as a dedicated machine for downloading content and playing back files is a lot of fun and works better than I would have guessed.I don’t like running torrents on my MacBook Air, and sometimes I like to use my laptop when I’m watching TV. I would usually have to plug in my laptop to my TV directly and mirror the laptop display onto my TV, but the solution I have eliminates this headache altogether. My setup is by no means perfect, but it gets the job done with a very tolerable amount of effort on my part. Let me know in the comments if you have any critiques or ideas for how to enhance the setup I have described here. Thanks, and good luck with setting up your own home media system.


--- layout: post title: Helping Your Child Learn To Read date: 2009-10-10 11:58:36.000000000 -07:00 type: post parent_id: '0' published: true pd: '' status: publish categories: - Early Childhood Issues - Reading Instruction tags: - environmental print - kindergarten literacy - teaching your child to read author: login: k email: k@k display_name: mcary first_name: '' last_name: '' ---
I thought kindergarten was all about socialization. However that seems to have changed and learning to read seems to be a priority. What can I do at home to help my son succeed?
In addition to the homework assignments your son's teacher may give him, there are millions of ways in which you can foster your child’s literacy development. Here are a few examples of activities that parents of kindergarten and first grade students can utilize to support their child’s literacy development at home.
1) Go to the library often and let your child pick the books that interest him and read together for at least 30 minutes a day.
2) Do a “picture walk” before you read a book. Go through the pictures page by page and talk about what is probably happening in the story. Use the illustrations in a book to help decode the text. Discuss your child’s predictions as you follow up by reading together.
3) Talk about the beginning, middle and ends of books you read as well as the characters and setting.
4) Ask questions about books that you read aloud to see if your child comprehends. Discuss and explain.
5) Read lots of nursery rhymes (to help develop phonemic awareness) and predictable stories.
6) Encourage your child to retell favorite stories to you using puppets or dolls.
7) Help your child learn to identify letters and their sounds.
8) Make flash cards of easy basic “sight words” (the, go, like, can, we, went, etc.) and look for them in books.
9) Make a game of reading environmental print (fast food restaurant names, grocery stores, food labels, gas station names, street signs, etc.).

11) Write grocery lists together.
12) Help your child make mini-story booklets. Start by using three pieces of paper, one page each for the beginning, the middle and the end.


Your web browser does not support the <canvas> element.
Your web browser does not support the <canvas> element.


Todo List
Add Item
Item Description:
Manage List
Delete Selected Items
Select First Item
Select Even Items
Search Term:
Move Selected Items to Top


How To Fix An iPhone That Won’t Ring
by Elizabeth KartiniDo you miss lots of phone calls because your iPhone won’t ring? Don’t worry, you are not the only user who experienced this problem as it bothered many people. The issue is quite annoying because you will see missed calls on the screen even though the phone is right next to you, but it may also be confusing especially if you are sure the ringer is on, the phone is not muted and you didn’t hear any sound. In this article, we are going to discuss the reasons why this issue occurs, and we are going to share several solutions to help you fix iPhone not ringing problem.
See also: How To Fix No Service On iPhone
Why My iPhone Doesn’t Ring?
Let’s list a few reasons why this issue may appear. Perhaps you made some changes in iPhone settings or you let your kids play with your phone? Maybe you enabled “Do not disturb”? A software glitch can be responsible for the problem, but this annoying issue can also appear right after you update the iOS software on your iPhone. Water damage or the fact you dropped your device, are among the reasons that can cause iPhone not ringing issue.
Solutions For iPhone Not Ringing Problem
Remove iPhone case
There are so many iPhone cases out there, designed mostly for protection purpose. Some of them have a thick design and not fit the iPhone properly. Check if the case you are using for your iPhone doesn’t cover the ring/silent switch. Remove that case completely from your iPhone, and see if that makes any difference.
See als0: iPhone Bluetooth Problem or iMessage not working
Toggle the ring/silent switch button
Maybe you have done this trick before, but do it one more time. If the button is in the ring state, switch it to the silent state. Then, switch it to the ring mode again, and ask your friend to call you. Make sure you switch it properly. You can see the difference between the ring and the silent mode in the picture below.
Disable Do not disturb
Do Not Disturb is a great feature you can find on iPhone. It can help you to focus on something without being disturbed by phone calls. When you are attending a meeting or want to take a rest for a few hours, you can rely on this handy feature. What happens if you activate the “Do Not Disturb“? Your iPhone will not ring, but it still allows the phone calls to come in and as you won’t hear the sound, you will see missed calls. In some cases, the user accidentally turns this feature on without even realizing. You can check at a glance to the top-left side of your iPhone screen. If you see the moon icon, it means the Do Not Disturb mode is activated. To disable it, follow the steps below:
- Go to Control Center by swiping up from any screen of your iPhone.
- Tap the moon icon to turn it off.
You can also check through Settings. Maybe you have scheduled this feature at some point and forget about it. Turn off the Schedule on Do Not Disturb.
- Open Settings >> Do Not Disturb. Here, see if the button next to Schedule section is green. If it does, turn it off.
- On the same screen, make sure the button of Manually section is not green. If it is, tap once to turn it off.
Volume up the iPhone
Try to increase the volume of your iPhone to the highest level and then call your number using the other device. To volume up your iPhone, you have to unlock your iPhone first. Then, click the plus button (+) on the side of the iPhone until the volume goes to the maximum.
Change the ringtone
Some users said the problem was fixed once they changed the ringtone. No matter how crazy this may sound, try it out. Change the ringtone on your iPhone. After that, call your number using the other smartphone.
- Head to Settings >> Sounds >> Ringtone.
- Choose default or any other ringtone.
Switch off the Bluetooth
Try to switch off the Bluetooth to make sure your iPhone is not connected to any accessories, such as speakers or Bluetooth headphone. You can turn it off by going to Settings >> Bluetooth.
Disable LTE
Enabling LTE on your iPhone can impact the battery life, calls, text messages, voicemail, and cellular data if it’s not been certified by your carrier yet. It can be the reason why your iPhone not ringing when a call comes in.
Steps to disable LTE
- Go to Settings >> Cellular >> Cellular Data Option >> tap Voice & Data
- Select 3G
Restart iPhone
Restarting iPhone may help you to get rid iPhone not ringing issue. It is not a difficult thing, you just press and hold the power and the home button altogether at the same time until the iPhone restarts.
Update the iOS
Software update always comes with improvements, bug fixes, and new features. It some cases, the problem can be solved by updating the iOS on your iPhone to the new version.
- Connect to a stable WiFi network and make sure your iPhone has at least 50% of battery life.
- Go to Settings >> General >> tap Software Update.
- If the iOS update is available, your iPhone will download it first.
- Tap Install Now.
Reset All Settings
This method will wipe all the settings, including all the features related to the sounds, such as volume setting, notification, etc.
- Open Settings >> General >> Reset >> Reset All Settings.
- A passcode is required.
- After you enter your passcode, tap Reset All Settings on a popup screen.
Erase iPhone
Try to reset your iPhone to its factory settings using the “Erase All Contents and Settings” feature. This method will remove all of the media, data and the settings, such as language setting, keyboard, etc. That’s why we advise you to back up your data beforehand. There are two methods for backing up the iPhone data: through iCloud or iTunes.
Notice: we don’t recommend this method on a jailbroken iPhone because it may cause the iPhone stuck in Apple logo.
Steps to erase all contents and settings
- Settings >> General >> Reset >> Erase All Contents and Settings.
- You need to enter a passcode.
- Then, tap Erase iPhone.
Restore iPhone
If erasing the iPhone doesn’t make the issue disappear, try to restore your iPhone. Through the restoring process, all the things on the iPhone will be wiped including the OS and firmware.
Steps to restore your iPhone
- Make sure your iPhone is full of charge.
- Ensure your iPhone is connected to a stable WiFi. This is important, otherwise, you may get iPhone stuck in recovery mode.
- Connect iPhone to Mac/PC with the latest iTunes version installed inside by using a lightning cable.
- Click Restore on Summary tab.
- Before the process starts, iTunes will download the firmware first.
- Wait until the restoring process is completed.
What else?
Clean speaker holes
After you have tried all the troubleshooting steps, and if none of them worked, try to clean speaker holes. If you find dirt covers the speaker holes, you can clean it using a duster or toothpick. Avoid using any liquid because it can enter the iPhone and damage the components.
 The broken part of headphone that is left inside the hole, can cause iPhone not ringing problem because the iPhone will detect the call that comes in as an earphone mode. If you find nothing there, try to plug the original earphone. Call your number and if you can hear the sound, then the problem is related to your iPhone speaker. Otherwise, there might be a hardware issue.
Charging trick
This trick will not resolve the problem, but it can help you find the right solution. The loudspeaker of iPhone connects to the charging port cable. The idea of this trick is to check if the issue is associated with hardware or not.
- Plug your iPhone in the USB port on your computer or a wall outlet for charging
- Test your iPhone by calling it from the other device. Does it ring?
- Now, unplug the lightning cable from the iPhone. Then call it again using a different device to check if it’s ringing or not.
If you hear a ringing sound when the iPhone is charged, but it doesn’t happen when it’s unplugged, likely it’s a hardware issue. The issue may occur on a lightning port that is connected to the speakers.
My iPhone Doesn’t Ring When A Call Comes In From Skype, WhatsApp, etc
Enable 4G
If your iPhone not ringing, try switch Voice & Data to 4G if you are using Cellular Data. The other option, try to use WiFi instead of Data.
Steps to enable 4G
- Head to Settings >> Cellular >> Cellular Data Options >> Voice & Data.
- Select 4G.
Steps to switch Cellular Data to WiFi
- Go to Settings >> Cellular >> turn off the Cellular Data button.
- Back to Settings.
- Select WiFi and choose a network.
Update the apps
If the issue comes when you are using certain apps, update the applications.
- Open App Store
- Tap the Updates section on the bottom-right of the screen.
- Check if there is an update for messaging apps you often use.
- If you find the updates, tap the button next to the app name, and let the updating process to complete.
Reset Network Settings
This method will reset all the settings related to cellular and WiFi, such as the saved networks, WiFi password, VPN settings, etc. The process is not related to a conventional phone call or SMS settings. However, if you have a problem with iPhone not ringing when you are receiving a call from messaging apps this can be quite helpful. The messaging apps like WhatsApp, Skype, etc may not work well if the Internet connection is slow. Here are the steps to reset network settings:
- Go to Settings >> General >> Reset >> Reset Network Settings.
- Enter your passcode.
- Tap Reset Network Settings.
All the solutions above are found effective to fix iPhone not ringing issue on iPhone 4, iPhone 4s, iPhone 5, iPhone 5s, iPhone 6, iPhone 6 Plus, iPhone 6s, iPhone 6s Plus, iPhone SE, iPhone 7, and iPhone 7 Plus, iPhone 8, iPhone 8 Plus, and iPhone X.
If you tried the solutions above, and nothing works, contact Genius Bar or the nearest Apple Authorized Service Provider.


Soldering is a process in which two or more items are joined together by melting and putting a filler metal having a lower melting point than the adjoining metal.
My first project of soldering is sound-to-light kit. It was not successful because the lights are always on, no matter it received sound or no sound.
My second project is a LED light. It was successful. The blue line blinks really cool.
Overall, the process of soldering was easy and relaxing.


---
layout: default
title: A Loving and Supportive Community
alias: loving
img-float: no-float
class: no-columns
sitemap:
priority: 0.7
changefreq: 'yearly'
lastmod: 2017-12-29 14:43:37
---
The people of St. Paul's are very clear on what they value about their church: the close, rich relationships and building-up that happens naturally in a small community. We like to talk about being accepted for who we are and being cared for in times of need.
Hear for yourself! We asked members about a time they felt loved in the church. Here's a small sample of what they said:
- "We embrace each other as a family—when one’s family is not near (with dinner or a personal touch)"
- "Acts of service for friends and neighbors—sharing of talents"
- "My opinions were valued by pastor and others"
- "There's a shoulder to cry on always"
- "We have an open, welcoming feeling—about church, communion, conversations, nonjudgmental, tolerant"
- "With the encouragement of church family"
- "A sense of welcome from multiple church members upon entering"
- "Being recognized and acknowledged"
- "The feeling of not being judged"
- "Respect, love, genuine care (such as with the Women’s Fellowship)"
- "Compassion for each other—death in family or friend"


We extend networks!
- expedite scalable action-items
- brand impactful relationships
- mesh bleeding-edge experiences
- strategize wireless interfaces
- embrace interactive systems
- productize integrated portals
- disintermediate world-class bandwidth
- evolve vertical infrastructures
- exploit web-enabled convergence
- optimize seamless architectures


Search and Link wizards are our recommended way to populate your record. They make adding works, funding and peer reviews simple and save you time over updating your record manually. Select a platform from the list below to start linking items to your record.
More information about linking funding to your ORCID record


--- layout: post status: publish published: true title: Grails Testing Acegi Security author: display_name: Geoff Lane login: admin email<EMAIL_ADDRESS>url: http://www.zorched.net author_login: admin author_email<EMAIL_ADDRESS>author_url: http://www.zorched.net date: '2008-09-01 17:46:31 -0400' date_gmt: '2008-09-01 23:46:31 -0400' categories: - Groovy tags: - mock-objects - grails - security - acegi - Unit Testing ---
Almost every web application I create needs some form of user authentication and authorization. Grails provides a great plugin system that allows you to extend the base framework to provide these kinds of features. My current favorite security plugin for Grails is the Acegi Security Plugin. It's built using the Spring Security framework and the robust and widely used Acegi framework. I like the fact that it is built on top of existing, well-known frameworks which is the philosophy of Grails itself. It is also a flexible plugin that has a good default object model.
One of the situations that inevitably arises is how to unit test code that depends on your security framework. Either you will want to test that basic authorization is working, or you might have code that makes decisions based upon who is logged in or what roles they might have. To run those test you have to setup your test cases so that the code that works when the system is running normally is tested.
{% highlight groovy %} import org.springframework.security.context.SecurityContextHolder as SCH import org.springframework.security.providers.TestingAuthenticationToken import org.springframework.security.GrantedAuthority import org.springframework.security.Authentication import org.springframework.security.GrantedAuthorityImpl class AuthenticationBaseTests extends GroovyTestCase { def setUp() { def user = User.get(1) // or create a new one if one doesn't exist authenticate(user, "abc123", [new GrantedAuthorityImpl('ROLE_ADMIN')]) } protected Authentication authenticate(user, credentials, authorities) { def principal = new Expando() principal.domainClass = user Authentication authentication = new TestingAuthenticationToken(principal, null, authorities as GrantedAuthority[]) authentication.authenticated = true SCH.context.authentication = authentication return authentication } } {% endhighlight %}
The fun thing about this message is the use of the Expando class. Expando allows you to create a class on the fly. This is a really interesting way to do a Mock object on-the-fly in Groovy. In this case we're creating a Mock authentication principle. We know, by looking at the Acegi Security code, that the security framework expects an object that will call domainClass to get the underlying implementation of the User (or Principle) implemented in the application. That will return us the User object that we are setting.
This simple method can be added to a base class and then inherited from any tests that need user authentication to run successfully.


The newest EOSIDE features depend on the changes introduced in the EOSFactory version 3.3.0. In order to use those features, update EOSFactory using:
pip install eosfactory-tokenika
EOSIDE installation view has been updated. Missing and outdated dependencies are now clearly indicated, automatic fix (if possible) is offered. See this video for more information on the new installation view.
Videos chapter has been added to the EOSIDE documentation. This gallery will include How-To video guides that will help you to understand EOSIO smart-contract technology and the EOSIDE instructions. We will update this gallery frequently with additional useful content. Any suggestions are highly appreciated.
The new EOSIDE installation view is automatically displayed during the EOSIDE update. In order to display this view again, please use: ctrl/cmd+shift+p EOSIDE: release notes.


The Basics of Git
Who am I?
Craig Reeder
Cloud Engineer @
Uturn Data Solutions
I love tooling
I really love tooling
Git is one of my favorite tools
What is Git?
Distributed Version Control Software
Created by Linus Torvalds in 2005
(To manage Linux source code)
Though it's been largely developed by others since
Quick Note: GitHub
GitHub is just a hosted platform for Git
And some other cool stuff
Git is to GitHub as Burgers are to BurgerKing
What does git do?
Tracks changes
Keeps history
Enables collaboration
Everyone has a full copy
This has proved useful for recovery purposes
Why use git?
Ever done this?
project/
config-4.3.20
config-1.5.21
config-7.8.21
config-live
Never do that again!
Git has history
All changes
(since the beginning of time)
Easily reversable
Who broke it?
$ git log
Author: Travis Langhals<EMAIL_ADDRESS>Date: Fri Sep 3 12:13:57 2021 -0400
Remove the Fizz from the Buzz, it's not needed
(spoiler alert: it was needed)
Great! How do I use it?
Creating a new repository:
$ git init
This creates a new repository in the current directory
Time to make some changes
To save your changes, you need to tell git you want to include them
This feels silly, but this means that you can select which changes to actually save, or break them into smaller chunks
Stage your changes:
$ git add foo.html bar.js
Finalize your changes into the git history:
$ git commit
This will prompt you in an editor for a message.
It is possible to change which editor it uses.
https://bit.ly/3hdSdNq
Don't have commitment issues
Commit early and often
It's not that easy! I got lost!
See the current state of things:
$ git status
It'll show something like this:
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: index.html
modified: themes/dark.css
Working locally cheat sheet:
$ git init # once, for a new repo
# make changes to files
$ git add file.txt
$ git commit
Now let's work as a team
Getting an existing repository:
$ git clone git@github.com:torvalds/linux.git
Quick Note: Authentication
This uses ssh to clone:
$ git clone git@github.com:torvalds/linux.git
This uses https to clone:
$ git clone https://github.com/torvalds/linux.git
Select it here on GitHub
SSH relies on the key you already created
HTTPS will prompt you for credentials every time
(Unless you set up a credential manager)
SSH works better with most automation
Back to the commands
Someone made a change to a repository you cloned
Oh no! What do I do? 😢
Pull changes from remote:
$ git pull
Now you're up to date!
Stage your changes:
$ git add foo.html bar.js
Finalize your changes into the git history:
$ git commit
Commiting is local only
To share your changes:
$ git push
The first time you do this in a branch, you'll get an error message with an additional flag. Follow the instructions.
One more important concept
Git is a tree
(sometimes displayed sideways)
Trees have branches
Git has branches!
(and a trunk)
You'll hear tree terminology used a lot around git
The default branch is usually main
Sometimes it's called "master"
It'll be master if you init on your machine. This is a simple configuration option.
Create a new branch:
$ git branch widget-fix
Change to a branch:
$ git checkout widget-fix
Merging is the act of combining branches
We're not going to cover manually merging
With GitHub, you can create a pull request
Also with most hosted git repos
This is a request to merge your branch into another
Typically main
Best practice with a pull request is to have someone else review your code
GitHub has useful commenting and approval tools
GitHub Flow:
Steps:
Step 1) Make a feature branch
Step 2) Make your changes
Step 3) Commit your changes
Step 4) Push your changes
Step 5) Make a Pull Request
Step 6) Fix any feedback from review (repeat 2-4)
Step 7) Merge the PR
Step 1) Make a feature branch
$ git branch widget-fix
$ git checkout widget-fix
Step 2) Make your changes
Step 3) Commit your changes
$ git add fixed-files.txt
$ git commit
Step 4) Push your changes
$ git push
Step 5) Make a Pull Request
Step 6) Fix any feedback from reviews
And repeat steps 2-4 (make changes, commit, push)
Step 7) Finally, merge the PR
The final reviewer will likely do this step
Steps:
Step 1) Make a feature branch
Step 2) Make your changes
Step 3) Commit your changes
Step 4) Push your changes
Step 5) Make a Pull Request
Step 6) Fix any feedback from review (repeat 2-4)
Step 7) Merge the PR
Some final thoughts
VSCode is git aware
It will show you what has changed since your last commit
All of the git commands can be done in VSCode with context menus
Look for the "source control" icon on the left
While I prefer the commandline, this is an easy way to get started.
.gitignore is a special file that tells git which files to ignore.
Those files won't ever be staged or commited
?
Now for some hands on!
Try these commands (or do the following in VSCode):
$ git init # once, for a new repo
$ git add file.txt # create file.txt first
$ git commit
$ git status
$ git branch widget-fix
$ git checkout widget-fix
$ git clone <url> # new repo! get this from github
$ git branch your-username
$ git checkout your-username
$ git add file.txt # create file.txt first
$ git commit
$ git push # follow the instructions
fin.


How do you feel when thinking about your values?
I am confident in my values and what they represent. I feel that my values reflect me as a person and I am appreciative that I discovered this at a young age.
Do you think they can help you mediate stereotype threat?
My most important value is leadership. I recommend reading my Week 2: Cultural Blog expands on my values and how I feel about them. I believe leadership is a very important key to mediating the stereotype threat. Using leadership one could eliminate the stereotype threat in any reasonable situation. Unfortunately, the following values I endorse do not have as much power as leadership does during altercations. However, these values help strengthen an individuals tolerance against the stereotype threat.
Exercises to help feeling down at DevBootcamp
Personally, I am completely confident I will not feel "down" at DBC. I am excited to learn and meet new people in a city filled with life, interaction, and opportunity. I believe preparing and preventive maintenance prevent me from feeling this way. I use the following exercises to keep me positive, optimistic, and upbeat.
- Physical Exercise- relieves stress and releases positive endorphins.
- Yoga/Meditation- balances the mind and brings peace.
- Dream- whenever you mind is idle DREAM it will embed your goals into your subconscious and the Law of Attraction will be put into work.
- Motivate- if you feel like your drifting into a mental tailspin then listen to speeches and watch videos of people who succeed in the face of adversity. You will instantly realize you are more than capable of accomplishing what you desire.
- Live through others success- this is a result from becoming a good leader and will allow you to see the positive in life.
- Religion- everybody has different values and thoughts on this subject. Respect other's opinions and be true to yours!


| Human cervical explants and rabbits |
Up to 2 μM |
No effect on the production of proinflammatory cytokines and chemokines.
No vaginal irritation in rabbits.
|
[
45]
|
| Human cervical epithelial cells, cervicovaginal cells, and PBMCs |
Up to 84 μM |
Minimal changes in secretion of inflammatory cytokines and chemokines
No measurable effect on cell viability and T-cell activation markers.
|
[
43]
|
Guinea pig
BALB/c mice
|
Single 50 mg/kg and 10 daily subcutaneous injections of 10 mg/kg |
Minimal overall toxicity.
Well tolerated.
Increase in spleen and liver mass.
|
[
41]
|
| Mouse PBMC and BALB/c mice with parenteral administration |
Up to 4 μM in vitro, subcutaneously with a single dose of 10 mg/kg, fourteen daily doses of 10 mg/kg, 2 mg/kg subcutaneous, intravaginal, and intraperitoneal administration |
No mitogenic properties in vitro.
No effect on cell surface activation markers or animal fitness.
No major organ toxicity with reversible splenomegaly.
|
[
44]
|
| Rhesus macaques |
Intravaginal 0.1% gels |
No change in rental proteome or microbiome |
[
42]
|


Project
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
About 67% of project is finished...
This project is finished.
This project is finished.
This project is finished.


“What has happened to Dwight? Something that is not easily settled; for as the chickens sputter in the oven below, and the water boils off the potatoes, and the pudding is manufactured, and the cloud deepens and glooms, he does not recover his free-and-easy air and manner. He ceases his walk after a little, from sheer weariness, but he thrusts out his arm and seizes a chair with the air of one who has not time to be leisurely, and flings himself into it, and clasps his arms on the table, and bends his head on his hands and thinks on. The holy hours of the Sabbath afternoon waned.” — Pansy & Mrs C M Livingston, Divers Women


This plugin requires both a grafana.com and NS1 account.
Generate a new Grafana.com API key with Role: Editor or sign up for free.
Generate your NS1 API key or sign up for a free trial.


Translator: Hi_archer
Author: labuladong
We know that for arrays,it is efficient to insert and delete elements at the end,with a time complexity of O(1).However, if we insert and delete elements at the middle or the beginning,it will move many data, with a time complexity of O(N).
Therefore, for the general algorithm problems dealing with arrays, we need to operate on the elements at the end of the array as much as possible to avoid additional time complexity
This article is on how to remove Duplicates from Sorted Array.
Obviously, since the array is sorted, the duplicate elements must be connected together, so it’s not difficult to find them, but if you delete each duplicate element as soon as you find it, you’re going to delete it in the middle of the array, and the total time complexity is going to be O(N2).And the problem asking us must do this by modifying the input array in-place with O(1) extra memory.
In fact,for the array related algorithm problem,there is a general technique: try to avoid deleting the element in the middle, then I want to find a way to swap the element to the last.In this way,the elements to be deleted are dragged to the end of the array and the time complexity of a single deletion is reduced to O(1).
Through this idea, we can derive a common way to solve similar requirements——the two-pointer technique.To be specific, it should be fast or slow pointer.
We let the slow pointer slow
go to the back of the array, and the fast pointerfast
go ahead to find the way. If we find a unique element,letslow
move forward. In this way, when the fast
pointer traverses the entire arraynums
, nums [0..slow]
is a unique element, and all subsequent elements are repeated elements.
int removeDuplicates(int[] nums) {
int n = nums.length;
if (n == 0) return 0;
int slow = 0, fast = 1;
while (fast < n) {
if (nums[fast] != nums[slow]) {
slow++;
// Maintain no repetition of nums[0..slow]
nums[slow] = nums[fast];
}
fast++;
}
//The length is index + 1
return slow + 1;
}
Look at the process of algorithm implementation:
Extending it briefly,how to remove Duplicates from Sorted list.In fact, it is exactly the same as an array.The only difference is that the array assignment operation is turned into an operation pointer:
ListNode deleteDuplicates(ListNode head) {
if (head == null) return null;
ListNode slow = head, fast = head.next;
while (fast != null) {
if (fast.val != slow.val) {
// nums[slow] = nums[fast];
slow.next = fast;
// slow++;
slow = slow.next;
}
// fast++
fast = fast.next;
}
// The list disconnects from the following repeating elements
slow.next = null;
return head;
}


The words swimming across the screen represent the most common activities people are doing when they are attacked by a shark. The size of the word represents the frequency of an attack for that activity.


ATF agent gets $450,000 settlement in harassment case
by Associated PressSEATTLE (AP) — A supervisor for the Bureau of Alcohol, Tobacco, Firearms and Explosives in Seattle is receiving a $450,000 settlement after complaining of racial harassment from a co-worker with a Nazi tattoo.
The Seattle Times reports Cheryl Bishop, a senior supervisory agent who is black, complained of harassment from Bradley Devlin, the bureau’s resident agent in charge in Eugene, Oregon.
Devlin has a “German Eagle SS Lightning bolt” tattoo he says he got infiltrating a white supremacist biker gang in Ohio.
Bishop sued the ATF in 2018, saying the agency retaliated and scuttled her appointment to work at headquarters after she filed a discrimination complaint against Devlin.
Devlin said in court documents he is not racist and called Bishop’s complaints absurd.
He described their conflict as based on personality, not race.
___
Information from: The Seattle Times


Building a professional website - 11/28/15
I've been coding here for nine weeks now. In that time, I have built my own website and learned several different coding languages. When I started learning CSS, I didn't like it, but I've grown to find things I like about it, as well as every other language I've tried out. The trickiest thing about CSS is positioning, and the many ways that it can be achieved. However, once you know how it works, it is pretty straight forward. I've always liked to decorate and design, so the process of building a website was a fun challenge for me. At times I struggled in terms of content to put on the site, but I really liked constructing pages, thinking of code examples to include on the page, and writing these blogs.
There is definitely a benefit to having a page like this. Not only do I get to hone and enhance my coding knowledge by creating examples here, but I also can demonstrate what I've learned and at what rate I've learned it all. It seems like I've absorbed a lot over these past nine weeks, and I'm excited to keep learning. I hope to continue maintaining this blog so I can continue to demonstrate and practice my skills.


[gecode-users] Bugs in Gecode/J
Malcolm Ryan
malcolmr at cse.unsw.edu.au
Tue Apr 15 11:03:36 CEST 2008
On 15/04/2008, at 6:52 PM, Mikael Zayenz Lagerkvist wrote:
>> What determines the maximum heap size available to Gecode?
>
> The system limits (these can be inspected, for example, using ulimit
> on bash in Linux). Unless the system or the JVM restricts the amount
> of memory that can be allocated by native components,
'ulimit' responds with "unlimited" on my machine, so it would appear
that the limit is being imposed by Java. Hmm.
If you're willing to try it out, all my code is available in a jar
file at:
http://www.cse.unsw.edu.au/~malcolmr/aiide08.jar
To run it do:
jar -xf aiide08.jar run1 Maps
chmod +x run1
./run1 7 8
The two numbers after run1 determine the particular experiment.
Experiment 7 8 is one of the ones that causes a crash [1].
Malcolm
[1] Assuming that the random number generator is consistent across
environments (dubious)
More information about the gecode-users
mailing list


Potter lifts George Washington over Milwaukee 66-63
NASSAU, Bahamas (AP) - Armel Potter had 22 points, including seven in the final 36 seconds, and George Washington held on to beat Milwaukee 66-63 at the Bahamas Showcase on Sunday.
Potter hit 12 of 14 free throws, grabbed seven rebounds and had seven assists. Jamison Battle had 12 points and 12 rebounds for George Washington (3-4).
The Colonials took their biggest lead when Javier Langarica’s 3-pointer made it 51-37 with 9:53 left. Milwaukee scored the next six points and a layup by Josh Thomas’ layup made it a five-point game with 28 seconds to go but Potter hit 5-of-6 free throws from there to seal it.
Darius Roy had 14 points and six rebounds for the Panthers (5-3). Thomas added 11 points and Amir Allen scored 10.
George Washington takes on South Carolina on the road next Sunday. Milwaukee plays Drake on the road next Tuesday.
For more AP college basketball coverage: https://apnews.com/Collegebasketball and http://twitter.com/AP_Top25
This was generated by Automated Insights, http://www.automatedinsights.com/ap, using data from STATS LLC, https://www.stats.com
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


| 1 | /* | |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
| 3 | * contributor license agreements. See the NOTICE file distributed with | |
| 4 | * this work for additional information regarding copyright ownership. | |
| 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| 6 | * (the "License"); you may not use this file except in compliance with | |
| 7 | * the License. You may obtain a copy of the License at | |
| 8 | * | |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 | * | |
| 11 | * Unless required by applicable law or agreed to in writing, software | |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 | * See the License for the specific language governing permissions and | |
| 15 | * limitations under the License. | |
| 16 | */ | |
| 17 | package org.apache.commons.collections4.list; | |
| 18 | ||
| 19 | import java.io.IOException; | |
| 20 | import java.io.ObjectInputStream; | |
| 21 | import java.io.ObjectOutputStream; | |
| 22 | import java.io.Serializable; | |
| 23 | import java.util.Collection; | |
| 24 | ||
| 25 | /** | |
| 26 | * A List implementation that stores a cache of internal Node objects | |
| 27 | * in an effort to reduce wasteful object creation. | |
| 28 | *
 | |
| 29 | * A linked list creates one Node for each item of data added. This can result in | |
| 30 | * a lot of object creation and garbage collection. This implementation seeks to | |
| 31 | * avoid that by maintaining a store of cached nodes. | |
| 32 | *
 | |
| 33 | * This implementation is suitable for long-lived lists where both add and remove | |
| 34 | * are used. Short-lived lists, or lists which only grow will have worse performance | |
| 35 | * using this class. | |
| 36 | *
 | |
| 37 | * Note that this implementation is not synchronized. | |
| 38 | * | |
| 39 | * @since 3.0 | |
| 40 | * @version $Id: NodeCachingLinkedList.java 1533984 2013-10-20 21:12:51Z tn $ | |
| 41 | */ | |
| 42 | public class NodeCachingLinkedList<E> extends AbstractLinkedList<E> implements Serializable { | |
| 43 | ||
| 44 | /** Serialization version */ | |
| 45 | private static final long serialVersionUID =<PHONE_NUMBER>562232073L; | |
| 46 | ||
| 47 | /** | |
| 48 | * The default value for {@link #maximumCacheSize}. | |
| 49 | */ | |
| 50 | private static final int DEFAULT_MAXIMUM_CACHE_SIZE = 20; | |
| 51 | ||
| 52 | /** | |
| 53 | * The first cached node, or null if no nodes are cached. | |
| 54 | * Cached nodes are stored in a singly-linked list with | |
| 55 | * next pointing to the next element. | |
| 56 | */ | |
| 57 | private transient Node<E> firstCachedNode; | |
| 58 | ||
| 59 | /** | |
| 60 | * The size of the cache. | |
| 61 | */ | |
| 62 | private transient int cacheSize; | |
| 63 | ||
| 64 | /** | |
| 65 | * The maximum size of the cache. | |
| 66 | */ | |
| 67 | private int maximumCacheSize; | |
| 68 | ||
| 69 | //----------------------------------------------------------------------- | |
| 70 | /** | |
| 71 | * Constructor that creates. | |
| 72 | */ | |
| 73 | public NodeCachingLinkedList() { | |
| 74 | this(DEFAULT_MAXIMUM_CACHE_SIZE); | |
| 75 | } | |
| 76 | ||
| 77 | /** | |
| 78 | * Constructor that copies the specified collection | |
| 79 | * | |
| 80 | * @param coll the collection to copy | |
| 81 | */ | |
| 82 | public NodeCachingLinkedList(final Collection<? extends E> coll) { | |
| 83 | super(coll); | |
| 84 | this.maximumCacheSize = DEFAULT_MAXIMUM_CACHE_SIZE; | |
| 85 | } | |
| 86 | ||
| 87 | /** | |
| 88 | * Constructor that species the maximum cache size. | |
| 89 | * | |
| 90 | * @param maximumCacheSize the maximum cache size | |
| 91 | */ | |
| 92 | public NodeCachingLinkedList(final int maximumCacheSize) { | |
| 93 | super(); | |
| 94 | this.maximumCacheSize = maximumCacheSize; | |
| 95 |
1
1. |
init(); // must call init() as use super(); |
| 96 | } | |
| 97 | ||
| 98 | //----------------------------------------------------------------------- | |
| 99 | /** | |
| 100 | * Gets the maximum size of the cache. | |
| 101 | * | |
| 102 | * @return the maximum cache size | |
| 103 | */ | |
| 104 | protected int getMaximumCacheSize() { | |
| 105 |
1
1. getMaximumCacheSize : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return maximumCacheSize; |
| 106 | } | |
| 107 | ||
| 108 | /** | |
| 109 | * Sets the maximum size of the cache. | |
| 110 | * | |
| 111 | * @param maximumCacheSize the new maximum cache size | |
| 112 | */ | |
| 113 | protected void setMaximumCacheSize(final int maximumCacheSize) { | |
| 114 | this.maximumCacheSize = maximumCacheSize; | |
| 115 |
1
1. setMaximumCacheSize : removed call to org/apache/commons/collections4/list/NodeCachingLinkedList::shrinkCacheToMaximumSize → NO_COVERAGE |
shrinkCacheToMaximumSize(); |
| 116 | } | |
| 117 | ||
| 118 | /** | |
| 119 | * Reduce the size of the cache to the maximum, if necessary. | |
| 120 | */ | |
| 121 | protected void shrinkCacheToMaximumSize() { | |
| 122 | // Rich Dougherty: This could be more efficient. | |
| 123 |
2
1. shrinkCacheToMaximumSize : changed conditional boundary → NO_COVERAGE 2. shrinkCacheToMaximumSize : negated conditional → NO_COVERAGE |
while (cacheSize > maximumCacheSize) { |
| 124 | getNodeFromCache(); | |
| 125 | } | |
| 126 | } | |
| 127 | ||
| 128 | /** | |
| 129 | * Gets a node from the cache. If a node is returned, then the value of | |
| 130 | * {@link #cacheSize} is decreased accordingly. The node that is returned | |
| 131 | * will have null values for next, previous and element. | |
| 132 | * | |
| 133 | * @return a node, or null if there are no nodes in the cache. | |
| 134 | */ | |
| 135 | protected Node<E> getNodeFromCache() { | |
| 136 |
1
1. getNodeFromCache : negated conditional → NO_COVERAGE |
if (cacheSize == 0) { |
| 137 |
1
1. getNodeFromCache : mutated return of Object value for org/apache/commons/collections4/list/NodeCachingLinkedList::getNodeFromCache to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return null; |
| 138 | } | |
| 139 | final Node<E> cachedNode = firstCachedNode; | |
| 140 | firstCachedNode = cachedNode.next; | |
| 141 | cachedNode.next = null; // This should be changed anyway, but defensively | |
| 142 | // set it to null. | |
| 143 |
1
1. getNodeFromCache : Replaced integer subtraction with addition → NO_COVERAGE |
cacheSize--; |
| 144 |
1
1. getNodeFromCache : mutated return of Object value for org/apache/commons/collections4/list/NodeCachingLinkedList::getNodeFromCache to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cachedNode; |
| 145 | } | |
| 146 | ||
| 147 | /** | |
| 148 | * Checks whether the cache is full. | |
| 149 | * | |
| 150 | * @return true if the cache is full | |
| 151 | */ | |
| 152 | protected boolean isCacheFull() { | |
| 153 |
4
1. isCacheFull : changed conditional boundary → NO_COVERAGE 2. isCacheFull : negated conditional → NO_COVERAGE 3. isCacheFull : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE 4. isCacheFull : replaced return of integer sized value with (x == 0 ? 1 : 0) → NO_COVERAGE |
return cacheSize >= maximumCacheSize; |
| 154 | } | |
| 155 | ||
| 156 | /** | |
| 157 | * Adds a node to the cache, if the cache isn't full. | |
| 158 | * The node's contents are cleared to so they can be garbage collected. | |
| 159 | * | |
| 160 | * @param node the node to add to the cache | |
| 161 | */ | |
| 162 | protected void addNodeToCache(final Node<E> node) { | |
| 163 |
1
1. addNodeToCache : negated conditional → NO_COVERAGE |
if (isCacheFull()) { |
| 164 | // don't cache the node. | |
| 165 | return; | |
| 166 | } | |
| 167 | // clear the node's contents and add it to the cache. | |
| 168 | final Node<E> nextCachedNode = firstCachedNode; | |
| 169 | node.previous = null; | |
| 170 | node.next = nextCachedNode; | |
| 171 |
1
1. addNodeToCache : removed call to org/apache/commons/collections4/list/AbstractLinkedList$Node::setValue → NO_COVERAGE |
node.setValue(null); |
| 172 | firstCachedNode = node; | |
| 173 |
1
1. addNodeToCache : Replaced integer addition with subtraction → NO_COVERAGE |
cacheSize++; |
| 174 | } | |
| 175 | ||
| 176 | //----------------------------------------------------------------------- | |
| 177 | /** | |
| 178 | * Creates a new node, either by reusing one from the cache or creating | |
| 179 | * a new one. | |
| 180 | * | |
| 181 | * @param value value of the new node | |
| 182 | * @return the newly created node | |
| 183 | */ | |
| 184 | @Override | |
| 185 | protected Node<E> createNode(final E value) { | |
| 186 | final Node<E> cachedNode = getNodeFromCache(); | |
| 187 |
1
1. createNode : negated conditional → NO_COVERAGE |
if (cachedNode == null) { |
| 188 |
1
1. createNode : mutated return of Object value for org/apache/commons/collections4/list/NodeCachingLinkedList::createNode to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return super.createNode(value); |
| 189 | } | |
| 190 |
1
1. createNode : removed call to org/apache/commons/collections4/list/AbstractLinkedList$Node::setValue → NO_COVERAGE |
cachedNode.setValue(value); |
| 191 |
1
1. createNode : mutated return of Object value for org/apache/commons/collections4/list/NodeCachingLinkedList::createNode to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return cachedNode; |
| 192 | } | |
| 193 | ||
| 194 | /** | |
| 195 | * Removes the node from the list, storing it in the cache for reuse | |
| 196 | * if the cache is not yet full. | |
| 197 | * | |
| 198 | * @param node the node to remove | |
| 199 | */ | |
| 200 | @Override | |
| 201 | protected void removeNode(final Node<E> node) { | |
| 202 |
1
1. removeNode : removed call to org/apache/commons/collections4/list/AbstractLinkedList::removeNode → NO_COVERAGE |
super.removeNode(node); |
| 203 |
1
1. removeNode : removed call to org/apache/commons/collections4/list/NodeCachingLinkedList::addNodeToCache → NO_COVERAGE |
addNodeToCache(node); |
| 204 | } | |
| 205 | ||
| 206 | /** | |
| 207 | * Removes all the nodes from the list, storing as many as required in the | |
| 208 | * cache for reuse. | |
| 209 | * | |
| 210 | */ | |
| 211 | @Override | |
| 212 | protected void removeAllNodes() { | |
| 213 | // Add the removed nodes to the cache, then remove the rest. | |
| 214 | // We can add them to the cache before removing them, since | |
| 215 | // {@link AbstractLinkedList.removeAllNodes()} removes the | |
| 216 | // nodes by removing references directly from {@link #header}. | |
| 217 |
1
1. removeAllNodes : Replaced integer subtraction with addition → NO_COVERAGE |
final int numberOfNodesToCache = Math.min(size, maximumCacheSize - cacheSize); |
| 218 | Node<E> node = header.next; | |
| 219 |
3
1. removeAllNodes : changed conditional boundary → NO_COVERAGE 2. removeAllNodes : Changed increment from 1 to -1 → NO_COVERAGE 3. removeAllNodes : negated conditional → NO_COVERAGE |
for (int currentIndex = 0; currentIndex < numberOfNodesToCache; currentIndex++) { |
| 220 | final Node<E> oldNode = node; | |
| 221 | node = node.next; | |
| 222 |
1
1. removeAllNodes : removed call to org/apache/commons/collections4/list/NodeCachingLinkedList::addNodeToCache → NO_COVERAGE |
addNodeToCache(oldNode); |
| 223 | } | |
| 224 |
1
1. removeAllNodes : removed call to org/apache/commons/collections4/list/AbstractLinkedList::removeAllNodes → NO_COVERAGE |
super.removeAllNodes(); |
| 225 | } | |
| 226 | ||
| 227 | //----------------------------------------------------------------------- | |
| 228 | /** | |
| 229 | * Serializes the data held in this object to the stream specified. | |
| 230 | */ | |
| 231 | private void writeObject(final ObjectOutputStream out) throws IOException { | |
| 232 |
1
1. writeObject : removed call to java/io/ObjectOutputStream::defaultWriteObject → NO_COVERAGE |
out.defaultWriteObject(); |
| 233 |
1
1. writeObject : removed call to org/apache/commons/collections4/list/NodeCachingLinkedList::doWriteObject → NO_COVERAGE |
doWriteObject(out); |
| 234 | } | |
| 235 | ||
| 236 | /** | |
| 237 | * Deserializes the data held in this object to the stream specified. | |
| 238 | */ | |
| 239 | private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { | |
| 240 |
1
1. readObject : removed call to java/io/ObjectInputStream::defaultReadObject → NO_COVERAGE |
in.defaultReadObject(); |
| 241 |
1
1. readObject : removed call to org/apache/commons/collections4/list/NodeCachingLinkedList::doReadObject → NO_COVERAGE |
doReadObject(in); |
| 242 | } | |
| 243 | ||
| 244 | } | |
Mutations | ||
| 95 |
1.1 |
|
| 105 |
1.1 |
|
| 115 |
1.1 |
|
| 123 |
1.1 2.2 |
|
| 136 |
1.1 |
|
| 137 |
1.1 |
|
| 143 |
1.1 |
|
| 144 |
1.1 |
|
| 153 |
1.1 2.2 3.3 4.4 |
|
| 163 |
1.1 |
|
| 171 |
1.1 |
|
| 173 |
1.1 |
|
| 187 |
1.1 |
|
| 188 |
1.1 |
|
| 190 |
1.1 |
|
| 191 |
1.1 |
|
| 202 |
1.1 |
|
| 203 |
1.1 |
|
| 217 |
1.1 |
|
| 219 |
1.1 2.2 3.3 |
|
| 222 |
1.1 |
|
| 224 |
1.1 |
|
| 232 |
1.1 |
|
| 233 |
1.1 |
|
| 240 |
1.1 |
|
| 241 |
1.1 |


{% extends "base_generic.html" %} {% block content %}
There are {% if bestiary.total_creatures %}{{ bestiary.total_creatures }}{% else %}0{% endif %} creatures in this bestiary.
| # | Name | Size | {% for quantity_creature in bestiary.creaturequantity_set.all %} |
|---|---|---|---|
| {{ quantity_creature.quantity }} | {{ quantity_creature.creature.name }} | {{ quantity_creature.creature.size }} |
Deleting a bestiary does not delete the attached creatures.