| Class | Aquarium::Finders::MethodFinder |
| In: |
lib/aquarium/finders/method_finder.rb
|
| Parent: | Object |
| NIL_OBJECT | = | MethodFinder.new unless const_defined?(:NIL_OBJECT) | ||
| CANONICAL_OPTIONS | = | { "types" => %w[type for_type for_types on_type on_types in_type in_types within_type within_types], "objects" => %w[object for_object for_objects on_object on_objects in_object in_objects within_object within_objects], "methods" => %w[method within_method within_methods calling invoking invocations_of calls_to sending_message_to sending_messages_to], "options" => %w[method_options method_option restricting_methods_to] | TODO move Pointcut‘s options to here. | |
| ALL_ALLOWED_OPTIONS | = | CANONICAL_OPTIONS.keys.inject([]) {|ary,i| ary << i << CANONICAL_OPTIONS[i]}.flatten | ||
| ALL_ALLOWED_OPTION_SYMBOLS | = | ALL_ALLOWED_OPTIONS.map {|o| o.intern} | ||
| RECOGNIZED_METHOD_OPTIONS | = | { "all" => %w[all_methods], "public" => %w[public_methods], "private" => %w[private_methods], "protected" => %w[protected_methods], "instance" => %w[instance_methods], "class" => %w[class_methods], "singleton" => %w[singleton_methods], "exclude_ancestor_methods" => %w[exclude_ancestors exclude_ancestors_methods suppress_ancestors suppress_ancestor_methods suppress_ancestors_methods] |
# File lib/aquarium/finders/method_finder.rb, line 161 161: def self.all_recognized_method_option_symbols 162: all = RECOGNIZED_METHOD_OPTIONS.keys.map {|key| key.intern} 163: RECOGNIZED_METHOD_OPTIONS.keys.inject(all) do |all, key| 164: all += RECOGNIZED_METHOD_OPTIONS[key].map {|value| value.intern} 165: all 166: end 167: end
# File lib/aquarium/finders/method_finder.rb, line 145 145: def self.init_method_options scope_options_set 146: return Set.new([]) if scope_options_set.nil? 147: options = [] 148: scope_options_set.each do |opt| 149: if RECOGNIZED_METHOD_OPTIONS.keys.include?(opt.to_s) 150: options << opt 151: else 152: RECOGNIZED_METHOD_OPTIONS.keys.each do |key| 153: options << key.intern if RECOGNIZED_METHOD_OPTIONS[key].include?(opt.to_s) 154: end 155: end 156: end 157: options << :instance unless (options.include?(:class) or options.include?(:singleton)) 158: Set.new(options.sort.uniq) 159: end
# File lib/aquarium/finders/method_finder.rb, line 169 169: def self.is_recognized_method_option string_or_symbol 170: sym = string_or_symbol.respond_to?(:intern) ? string_or_symbol.intern : string_or_symbol 171: all_recognized_method_option_symbols.include? sym 172: end
# File lib/aquarium/finders/method_finder.rb, line 130 130: def all_allowed_option_symbols 131: ALL_ALLOWED_OPTION_SYMBOLS 132: end
Returns a Aquarium::Finders::FinderResult for the hash of types, type names, and/or regular expressions and the corresponding method name symbols found. Method names, not method objects, are always returned, because we can only get method objects for instance methods if we have an instance!
finder_result = MethodFinder.new.find :types => … {, :methods => …, :options => […]} where "{}" indicate optional arguments
:types => types_and_type_names_and_regexps:: :type => types_and_type_names_and_regexps:: :for_types => types_and_type_names_and_regexps:: :for_type => types_and_type_names_and_regexps:: :on_types => types_and_type_names_and_regexps:: :on_type => types_and_type_names_and_regexps:: :in_types => types_and_type_names_and_regexps:: :in_type => types_and_type_names_and_regexps:: :within_types => types_and_type_names_and_regexps::
| :within_type => types_and_type_names_and_regexps: | One or more types, type names and/or regular expessions to match. Specify one or an array of values. |
:objects => objects:: :object => objects:: :for_objects => objects:: :for_object => objects:: :on_objects => objects:: :on_object => objects:: :in_objects => objects:: :in_object => objects:: :within_objects => objects::
| :within_object => objects: | One or more objects to match. Specify one or an array of values. Note: Currently, string or symbol objects will be misinterpreted as type names! |
:methods => method_names_and_regexps:: :method => method_names_and_regexps:: :within_methods => method_names_and_regexps:: :within_method => method_names_and_regexps:: :calling => method_names_and_regexps:: :invoking => method_names_and_regexps:: :calls_to => method_names_and_regexps:: :sending_message_to => method_names_and_regexps::
| :sending_messages_to => method_names_and_regexps: | One or more method names and regular expressions to match. Specify one or an array of values. If :all or :all_methods is specified, all methods will be matched. That is, these special values are equivalent to the the regular expression /.+/. |
:exclude_methods => method_names_and_regexps:: :exclude_method => method_names_and_regexps::
| :exclude_<other_method_synonyms> => method_names_and_regexps: | One or more method names and regular expressions to exclude from the match. Specify one or an array of values. |
:options => method_options:: :method_options => method_options:: :method_option => method_options::
| :restricting_methods_to => method_options: | By default, searches for public instance methods. Specify one or more of the following options for alternatives. You can combine any of the :public, :protected, and :private, as well as :instance and :class. |
| :public or :public_methods: | Search for public methods (default). |
| :private or :private_methods: | Search for private methods. |
| :protected or :protected_methods: | Search for protected methods. |
| :instance or :instance_methods: | Search for instance methods. |
| :class or :class_methods: | Search for class methods. |
| :singleton or :singleton_methods: | Search for singleton methods. (Using :class for objects |
won‘t work and :class, :public, :protected, and :private are ignored when looking for singleton methods.)
| :exclude_ancestor_methods: | Suppress "ancestor" methods. This |
means that if you search for a override method foo in a Derived class that is defined in the Base class, you won‘t find it!
# File lib/aquarium/finders/method_finder.rb, line 92 92: def find options = {} 93: init_specification options, CANONICAL_OPTIONS 94: return Aquarium::Finders::FinderResult.new if nothing_to_find? 95: types_and_objects = input_types + input_objects 96: method_names_or_regexps = input_methods 97: if method_names_or_regexps.empty? 98: not_matched = {} 99: types_and_objects.each {|t| not_matched[t] = []} 100: return Aquarium::Finders::FinderResult.new(:not_matched => not_matched) 101: end 102: result = do_find_all_by types_and_objects, method_names_or_regexps 103: unless (input_exclude_methods.nil? or input_exclude_methods.empty?) 104: result -= do_find_all_by types_and_objects, input_exclude_methods 105: end 106: result 107: end
# File lib/aquarium/finders/method_finder.rb, line 229 229: def all_exclude_all_methods? 230: input_exclude_methods.include?(:all) or input_exclude_methods.include?(:all_methods) 231: end
# File lib/aquarium/finders/method_finder.rb, line 176 176: def do_find_all_by types_and_objects, method_names_or_regexps 177: types_and_objects = make_array types_and_objects 178: names_or_regexps = make_methods_array method_names_or_regexps 179: types_and_objects_to_matched_methods = {} 180: types_and_objects_not_matched = {} 181: types_and_objects.each do |type_or_object| 182: reflection_method_names = make_methods_reflection_method_names type_or_object, "methods" 183: found_methods = Set.new 184: names_or_regexps.each do |name_or_regexp| 185: method_array = [] 186: reflection_method_names.each do |reflect| 187: method_array += reflect_methods(type_or_object, reflect).grep(make_regexp(name_or_regexp)) 188: end 189: if exclude_ancestor_methods? 190: method_array = remove_ancestor_methods type_or_object, reflection_method_names, method_array 191: end 192: found_methods += method_array 193: end 194: if found_methods.empty? 195: types_and_objects_not_matched[type_or_object] = method_names_or_regexps 196: else 197: types_and_objects_to_matched_methods[type_or_object] = found_methods.to_a.sort.map {|m| m.intern} 198: end 199: end 200: Aquarium::Finders::FinderResult.new types_and_objects_to_matched_methods.merge(:not_matched => types_and_objects_not_matched) 201: end
# File lib/aquarium/finders/method_finder.rb, line 233 233: def exclude_ancestor_methods? 234: @specification[:options].include?(:exclude_ancestor_methods) 235: end
# File lib/aquarium/finders/method_finder.rb, line 203 203: def init_type_specific_specification original_options, options_hash 204: @specification[:options] = MethodFinder.init_method_options(@specification[:options]) if @specification[:options] 205: extra_validation 206: end
# File lib/aquarium/finders/method_finder.rb, line 225 225: def input_exclude_methods 226: @specification[:exclude_methods] 227: end
# File lib/aquarium/finders/method_finder.rb, line 221 221: def input_methods 222: @specification[:methods] 223: end
# File lib/aquarium/finders/method_finder.rb, line 217 217: def input_objects 218: @specification[:objects] 219: end
# File lib/aquarium/finders/method_finder.rb, line 213 213: def input_types 214: @specification[:types] 215: end


What good is having code running inside your templates, anyway?
The MVC pattern is a wonderful thing. It helps developers design resilient, testable, and well structured applications. Almost every web framework is centered around MVC (Phoenix, withstanding). So why, then, do most of these frameworks allow you to embed code directly into the view layer?
View layers tend to allow code because developers immediately run into problems when they need to iterate over a list of items. And, let’s face it, with a CRUD operation, that’s one of the first things you do. One can justify leaving code in the view layer, because it adds flexibility. The last thing you want is to have your view templates be a limiting factor in your application.
Mexico Insurance Online’s application, however, is a solid exception to that rule. We have some… substantial resellers who sell directly to their customers through the application. Those resellers demand an entirely custom view. From the font on a <label> tag to which fields appear on a given form, everything can, and will, be customized. To that end, a bit of rigidity actually makes life easier, let me show you.
Curly Templates is what Mexico Insurance Online’s application will use for the view layer in our rebuild project. The magic of Curly lies in its Presenter classes:
class Posts::CommentPresenter < Curly::Presenter
presents :comment
def replies
content_tag :div do
for reply in @comment.replies do
render 'reply', reply
end
end
end
end
A single presenter, such as the above, can be shared across multiple views. If a resellers needs to customize the way that replies are presented, then an alternative to the _reply.html.curly
file can be created, leaving the rest of the view un-touched.
Had this view been implemented with the ERB syntax that comes with Ruby on Rails, then both the main application and the custom view for the reseller would need the loop code. Given that Mexico Insurance Online has 296 white-label templates at the moment, this means there would be 296 loops to update if something changed.
This may seem like something simple, but the white-labeling provided by Mexico Insurance Online is crucial to its continued success.


You are the highest bidder at this moment.
Starting bid: {{vm.auction.startingBid}} {{vm.auction.currency}}
Highest bid: {{vm.auction.highestBid}} {{vm.auction.currency}}
No pictures for this auction!


LiveWire enables Grassroot users to issue alerts about events occurring in their community. After review, the alerts are sent to news desks and listed here, forming a news feed of ground-level activity in South Africa's communities.
Alert description
Images:


Driver CRUD Operations
The driver crud operations are defined as the operations performed to insert/update/remove and query for documents. In this tutorial we will cover both the basic CRUD methods as well as the specialized findAndModify based methods and the new Bulk API methods allowing for efficient bulk write operations. But let’s start with a simple introduction to the insert, update and remove operations that are on the collection class.
Write Methods
Inserting Documents
The insertOne and insertMany methods exists on the Collection class and is used to insert documents into MongoDB. Code speaks a thousand words so let’s see two simple examples of inserting documents.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
// Insert a single document
db.collection('inserts').insertOne({a:1}, function(err, r) {
assert.equal(null, err);
assert.equal(1, r.insertedCount);
// Insert multiple documents
db.collection('inserts').insertMany([{a:2}, {a:3}], function(err, r) {
assert.equal(null, err);
assert.equal(2, r.insertedCount);
db.close();
});
});
});
The first insert inserts a single document into the inserts collection. Notice
that we are not explicitly creating a new inserts collection as the server will
create it implicitly when we insert the first document. The method
Db.createIndex
only really needs to be used when creating non standard
collections such as capped collections or where other parameters than the default
collections need to be applied.
The insertOne and insertMany methods also accepts an second argument that can be an options object. This object can have the following fields.
w
, {Number/String, > -1 || ‘majority’} the write concern for the operation where < 1 is no acknowledgment of write and w >= 1 or w = ‘majority’ acknowledges the write.wtimeout
, {Number, 0} set the timeout for waiting for write concern to finish (combines with w option).j
, (Boolean, default:false) write waits for journal sync.serializeFunctions
, (Boolean, default:false) serialize functions on an object to mongodb, by default the driver does not serialize any functions on the passed in documents.forceServerObjectId
, (Boolean, default:false) Force server to assign _id values instead of driver.
Let’s look at a simple example where we are writing to a replicaset and we wish to ensure that we serialize a passed in function as well as have the server assign the _id for each document.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
// Insert a single document
db.collection('inserts').insertOne({
a:1
, b: function() { return 'hello'; }
}, {
w: 'majority'
, wtimeout: 10000
, serializeFunctions: true
, forceServerObjectId: true
}, function(err, r) {
assert.equal(null, err);
assert.equal(1, r.insertedCount);
db.close();
});
});
That wraps up the insert methods. Next let’s look at the update methods.
Updating Documents
The updateOne and updateMany methods exists on the Collection class and is used to update and upsert documents into MongoDB. Let’s look at a couple of usage examples.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('updates');
// Insert a single document
col.insertMany([{a:1}, {a:2}, {a:2}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.insertedCount);
// Update a single document
col.updateOne({a:1}, {$set: {b: 1}}, function(err, r) {
assert.equal(null, err);
assert.equal(1, r.matchedCount);
assert.equal(1, r.modifiedCount);
// Update multiple documents
col.updateMany({a:2}, {$set: {b: 1}}, function(err, r) {
assert.equal(null, err);
assert.equal(2, r.matchedCount);
assert.equal(2, r.modifiedCount);
// Upsert a single document
col.updateOne({a:3}, {$set: {b: 1}}, {
upsert: true
}, function(err, r) {
assert.equal(null, err);
assert.equal(0, r.matchedCount);
assert.equal(1, r.upsertedCount);
db.close();
});
});
});
});
});
The update method also accepts an second argument that can be an options object. This object can have the following fields.
w
, {Number/String, > -1 || ‘majority’} the write concern for the operation where < 1 is no acknowledgment of write and w >= 1 or w = ‘majority’ acknowledges the write.wtimeout
, {Number, 0} set the timeout for waiting for write concern to finish (combines with w option).j
, (Boolean, default:false) write waits for journal sync.multi
, (Boolean, default:false) Update one/all documents with operation.upsert
, (Boolean, default:false) Update operation is an upsert.
Just as for insert the update method allows you to specify a per operation write concern using the w, wtimeout and fsync parameters
Removing Documents
The removeOne and removeMany methods exist on the Collection class and is used to remove documents from MongoDB. Let’s look at a couple of usage examples.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('removes');
// Insert a single document
col.insertMany([{a:1}, {a:2}, {a:2}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.insertedCount);
// Update a single document
col.removeOne({a:1}
, {$set: {b: 1}}, function(err, r) {
assert.equal(null, err);
assert.equal(1, r.deletedCount);
// Update multiple documents
col.removeMany({a:2}
, {$set: {b: 1}}, function(err, r) {
assert.equal(null, err);
assert.equal(2, r.deletedCount);
db.close();
});
});
});
});
The remove method also accepts an second argument that can be an options object. This object can have the following fields.
w
, {Number/String, > -1 || ‘majority’} the write concern for the operation where < 1 is no acknowledgment of write and w >= 1 or w = ‘majority’ acknowledges the write.wtimeout
, {Number, 0} set the timeout for waiting for write concern to finish (combines with w option).j
, (Boolean, default:false) write waits for journal sync.single
, (Boolean, default:false) Removes the first document found.
Just as for update and insert the remove method allows you to specify a per operation write concern using the w, wtimeout and fsync parameters
FindAndModify and FindAndRemove
The two methods findOneAndUpdate, findOneAndDelete and findOneAndReplace are special commands that allows the user to update or upsert a document and have the modified or existing document returned. It comes at a cost as the operation takes a write lock for the duration of the operation as it needs to ensure the modification is atomic. Let’s look at findOneAndUpdate first using an example.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('findAndModify');
// Insert a single document
col.insert([{a:1}, {a:2}, {a:2}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.result.n);
// Modify and return the modified document
col.findOneAndUpdate({a:1}, {$set: {b: 1}}, {
returnOriginal: false
, sort: [[a,1]]
, upsert: true
}, function(err, doc) {
assert.equal(null, err);
assert.equal(1, r.value.b);
// Remove and return a document
col.findOneAndDelete({a:2}, function(err, r) {
assert.equal(null, err);
assert.ok(r.value.b == null);
db.close();
});
});
});
});
The findOneAndUpdate method also accepts an second argument that can be an options object. This object can have the following fields.
w
, {Number/String, > -1 || ‘majority’} the write concern for the operation where < 1 is no acknowledgment of write and w >= 1 or w = ‘majority’ acknowledges the write.wtimeout
, {Number, 0} set the timeout for waiting for write concern to finish (combines with w option).j
, (Boolean, default:false) write waits for journal sync.upsert
, (Boolean, default:false) Perform an upsert operation.sort
, (Object, default:null) Sort for find operation.projection
, (Object, default:null) Projection for returned resultreturnOriginal
, (Boolean, default:true) Set to false if you want to return the modified object rather than the original. Ignored for remove.
The findAndRemove function is a function especially defined to help remove a document. Let’s look at an example of usage.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('findAndModify');
// Insert a single document
col.insert([{a:1}, {a:2}, {a:2}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.result.n);
// Remove a document from MongoDB and return it
col.findOneAndRemove({a:1}, {
sort: [[a,1]]
}
, function(err, doc) {
assert.equal(null, err);
assert.ok(r.value.b == null);
db.close();
});
});
});
Just as for findOneAndUpdate it allows for an object of options to be passed in that can have the following fields.
w
, {Number/String, > -1 || ‘majority’} the write concern for the operation where < 1 is no acknowledgment of write and w >= 1 or w = ‘majority’ acknowledges the write.wtimeout
, {Number, 0} set the timeout for waiting for write concern to finish (combines with w option).j
, (Boolean, default:false) write waits for journal sync.sort
, (Object, default:null) Sort for find operation.
BulkWrite
The bulkWrite function allows for a simple set of bulk operations to be done in a non fluent way as in comparison to the bulk API discussed next. Let’s look at an example.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
// Get the collection
var col = db.collection('bulk_write');
col.bulkWrite([
{ insertOne: { a: 1 } }
, { insertMany: [{ g: 1 }, { g: 2 }] }
, { updateOne: { q: {a:2}, u: {$set: {a:2}}, upsert:true } }
, { updateMany: { q: {a:2}, u: {$set: {a:2}}, upsert:true } }
, { removeOne: { q: {c:1} } }
, { removeMany: { q: {c:1} } }]
, {ordered:true, w:1}, function(err, r) {
assert.equal(null, err);
assert.equal(3, r.insertedCount);
assert.equal(1, r.matchedCount);
assert.equal(0, r.modifiedCount);
assert.equal(1, r.removedCount);
assert.equal(1, r.upsertedCount);
assert.equal(1, r.upsertedIds.length);
// Ordered bulk operation
db.close();
});
});
As we can see the bulkWrite function takes an array of operation that can be objects of either insertOne, insertMany, updateOne, updateMany, removeOne or removeMany. It also takes a second parameter that takes the following options.
ordered
, (Boolean, default:true) Execute in order or out of order.w
, {Number/String, > -1 || ‘majority’} the write concern for the operation where < 1 is no acknowledgment of write and w >= 1 or w = ‘majority’ acknowledges the write.wtimeout
, {Number, 0} set the timeout for waiting for write concern to finish (combines with w option).j
, (Boolean, default:false) write waits for journal sync.
This covers the basic write operations. Let’s have a look at the Bulk write operations next.
Bulk Write Operations
The bulk write operations make it easy to write groups of operations together to MongoDB. There are some caveats and to get the best performance you need to be running against MongoDB 2.6 or higher that support the new write commands. Bulk operations are split into ordered and unordered bulk operations. An ordered bulk operation guarantees the order of execution of writes while the unordered bulk operation makes no assumptions about the order of execution. In the Node.js driver the unordered bulk operations will group operations according to type and write them in parallel. Let’s have a look at how to build an ordered bulk operation.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('bulkops');
// Create ordered bulk, for unordered initializeUnorderedBulkOp()
var bulk = col.initializeOrderedBulkOp();
// Insert 10 documents
for(var i = 0; i < 10; i++) {
bulk.insert({a: i});
}
// Next perform some upserts
for(var i = 0; i < 10; i++) {
bulk.find({b:i}).upsert().updateOne({b:1});
}
// Finally perform a remove operation
bulk.find({b:1}).removeOne();
// Execute the bulk with a journal write concern
bulk.execute(function(err, result) {
assert.equal(null, err);
db.close();
});
});
We will not cover the results object here as it’s documented in the driver API. The Bulk API handles all the splitting of operations into multiple writes and also emulates 2.6 and higher write commands for 2.4 and earlier servers.
There is are some important things to keep in mind when using the bulk API and especially the ordered bulk API mode. The write commands are single operation type. That means they can only do insert/update and remove. If you f.ex do the following combination of operations.
Insert {a:1}
Update {a:1} to {a:1, b:1}
Insert {a:2}
Remove {b:1}
Insert {a:3}
This will result in the driver issuing 4 write commands to the server.
Insert Command with {a:1}
Update Command {a:1} to {a:1, b:1}
Insert Command with {a:2}
Remove Command with {b:1}
Insert Command with {a:3}
If you instead organize the your ordered in the following manner.
Insert {a:1}
Insert {a:2}
Insert {a:3}
Update {a:1} to {a:1, b:1}
Remove {b:1}
The number of write commands issued by the driver will be.
Insert Command with {a:1}, {a:2}, {a:3}
Update Command {a:1} to {a:1, b:1}
Remove Command with {b:1}
Allowing for more efficient and faster bulk write operation.
For unordered bulk operations this is not important as the driver sorts operations by type and executes them in parallel.
This covers write operations for MongoDB. Let’s look at querying for documents next.
Read Methods
The main method for querying the database are the find and the aggregate method. In this CRUD tutorial we will focus on find only as aggregate has it’s own Aggregation Tutorial
The method return a cursor that allows us to operate on the data. The cursor also implements the Node.js 0.10.x or higher stream interface allowing us to pipe the results to other streams. We will not cover streams here as they are covered in the Streams Tutorial
Let’s look at a simple find example that materializes all the documents from a query using the toArray but limits the number of returned results to 2 documents.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('find');
// Insert a single document
col.insertMany([{a:1}, {a:1}, {a:1}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.insertedCount);
// Get first two documents that match the query
col.find({a:1}).limit(2).toArray(function(err, docs) {
assert.equal(null, err);
assert.equal(2, docs.length);
db.close();
});
});
});
The cursor returned by the find method has a lot of methods that allow for chaining of options for a query. Once the query is ready to be executed you can retrieve the documents using the next, each and toArray methods. If the query returns a lot of documents it’s preferable to use the next or each methods as the toArray method will materialize all the documents into memory before calling the callback function potentially using a lot of memory if the query returns a lot of documents.
We won’t look at the options we can set on the cursor as they can be viewed in the Cursor API documentation.
We already looked at toArray method above. Let’s take a look at the next method.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('find');
// Insert a single document
col.insertMany([{a:1}, {a:1}, {a:1}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.insertedCount);
// Get first documents from cursor
col.find({a:1}).limit(2).next(function(err, doc) {
assert.equal(null, err);
assert.ok(doc != null);
db.close();
});
});
});
The next method allows the application to read one document at a time using callbacks. Let’s look at the each method next.
var MongoClient = require('mongodb').MongoClient
, assert = require('assert');
// Connection URL
var url = 'mongodb://localhost:27017/myproject';
// Use connect method to connect to the Server
MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
console.log("Connected correctly to server");
var col = db.collection('find');
// Insert a single document
col.insertMany([{a:1}, {a:1}, {a:1}], function(err, r) {
assert.equal(null, err);
assert.equal(3, r.insertedCount);
// Get first documents from cursor using each
col.find({a:1}).limit(2).each(function(err, doc) {
if(doc) {
db.close();
// Got a document, terminate the each
return false;
}
});
});
});
The each method will call the supplied callback until there are no more documents available that satisfy the query. Once the available documents is exhausted it will return null for the second parameter in the callback. If you wish to terminate the each early you should return false in your each callback. This will stop the cursor from returning documents.
This covers the basic crud operations in the Node.js MongoDB driver.
comments powered by Disqus


output data
An array of arrays of 0-1 floats. The inner arrays are rows.
A 2x2 matrix's output array will look like:
[ [ row1col1, row1col2 ] , [ row2col1, row2col2 ] ]
properties
.matrix
(default data output)
An array of arrays of 0-1 floats. The inner arrays are rows.
A 2x2 matrix's output array will look like:
[ [ row1col1, row1col2 ] , [ row2col1, row2col2 ] ]
methods


Welcome to the OfficeFloor subscription site for using OfficeFloor
In terms of privacy, the code for this site is available at GitHub officefloor/Subscription. The code for the site details capture of contact details, subscription information, payments and any other information captured. Purpose of this information capture is for financial records of the subscriptions.
A purchased subscription is solely to enable OfficeFloor to be utilised for servicing a specified domain under an Apache 2 license. If no active subscription exists within this site, then use of OfficeFloor is under APGL.
Regardless of wording of this, the use of this site and that of OfficeFloor is agreeing to the code and the associated licensing.


This website was made with Angular2, TypeScript, WebPack and SCSS. The source code is available on GitHub.
If that's not your cup of tea, scroll down for a simple lentil stew. It takes about 30 minutes to cook, and works perfectly as an appetizer or together with rice.


Globalize Hello World (AMD + bower)
Requirements
You need to download dependencies and CLDR content yourself. Read README.md for instructions.
Demo output
Open your JavaScript console to see the output.


public class Notification
extends java.lang.Object
| Constructor and Description |
|---|
Notification(Trade trade)
Class constructor specifying details of notifications.
|
| Modifier and Type | Method and Description |
|---|---|
Trade |
getTrade()
Gets a trade that was offered.
|
void |
setRead(boolean read)
Changes whether or not the notification has been read.
|
void |
setTrade(Trade trade)
Changes a trade that was offered.
|
java.lang.String |
toString()
Returns the printing format of the notification.
|
public Notification(Trade trade)
public Trade getTrade()
public void setTrade(Trade trade)
trade
- trade that has been modifiedpublic void setRead(boolean read)
read
- read or unread status of the notificationpublic java.lang.String toString()
The format of the notification is [owner/borrower] offered a [trade/counter trade] for [item].
toString
in class java.lang.Object


Xonsh in TOP10 trending projects
We're listing down the top 10 trending open-source projects In Python on GitHub and the xonsh shell is one of these projects.
The xonsh shell lets you easily mix Python and shell commands in a powerful and simplified approach to the command line.
The xonsh language has shell primitives that you are used to from Bash. Read more →
cd /home cat /etc/passwd | grep root ls -la
The xonsh language is a superset of Python 3.6+ and you can run Python code and import modules. Read more →
2 + 2 import json j = json.loads('{"Hello": "world!", "Answer": 42}') print(j['Answer'])
With xonsh you can combine Python with shell commands. Read more →
len($(curl -L https://xon.sh)) for filename in `.*`: print(filename) du -sh @(filename)
Prepare environment variables and arguments in Python and use them in shell commands. Read more →
var = 'he' + 'llo' echo @(var) > /tmp/@(var) echo @(i for i in range(42))
Xonsh is a super-charged shell that enables you to work quickly and effectively! Some of the features that help set xonsh apart are:
The language is a superset of Python 3.6+ with additional shell primitives that you are used to from Bash and IPython.
Xontributions, or xontribs, are a set of tools and conventions for extending the functionality of xonsh.
The xonsh shell creates history files with rich structure and metadata and an API for interacting with them.
Customisable tab completion, key bindings, color styles are on board by default.
Xonsh can be installed and run with various package managers, by using appimage, or from a docker container.
AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application. The xonsh AppImage file contains both xonsh and Python and allows xonsh to be run on any AppImage-supported Linux distribution without installation or root access.
Download and run:
wget https://github.com/xonsh/xonsh/releases/latest/download/xonsh-x86_64.AppImage chmod +x xonsh-x86_64.AppImage ./xonsh-x86_64.AppImageLearn more →
Xonsh publishes a handful of containers, primarily targeting CI and automation use cases. All of them are published on Docker Hub.
Run the xonsh shell in a small size docker container:
docker run -it --rm xonsh/xonsh:slim
Another way is to install xonsh from the package manager that is supplied by the operating system. This way is not recommended because in operating systems without the rolling release concept the xonsh shell version may be very old (check latest release).
OSX brew:
brew install xonsh
Debian/Ubuntu apt:
apt install xonsh
Arch Linux pacman:
pacman -S xonsh
Fedore dnf:
dnf install xonsh
GNU guix:
guix install xonsh
Xontributions, or xontribs, are a set of tools and conventions for extending the functionality of xonsh.
Let your pipe lines from the standard output flow thru the Python code in the xonsh shell.
Get identifiers, paths, URLs and words from the previous command output and use them for the next command in the xonsh shell.
Return to the most recently used directory when starting the xonsh shell.
Argcomplete support to tab completion of python and xonsh scripts in the xonsh shell.
Some interesting publications around xonsh.
We're listing down the top 10 trending open-source projects In Python on GitHub and the xonsh shell is one of these projects.
A. Scopatz and G. Forsyth gave a two hour presentation of xonsh.


Product Details
Row Material:-
{{pro.row_material}}
Company Name:-
{{pro.company_name}}
Manufacturing Date:-
{{pro.manufacturing_date}}
Expiry Date:-
{{pro.expiry_date}}
Name Of Process:-
{{pro.name_of_process}}
Crude Product:-
{{pro.crude_product}}
Purification:-
{{pro.purification}}
Quality control:-
{{pro.quality}}


Welcome to my DBC blog. I hope you enjoy it!
Week topics:
- Cultural Week 1: Chefs in the Kitchen
- Technical Week 1: My Favorite Websites
- Cultural Week 2: [no cultural blog this week]
- Technical Week 2: Talk About CSS
- Cultural Week 3: My Thinking Style and Learning
- Technical Week 3: JavaScript in Web Development
- Cultural Week 4: Issues in Tech
- Technical Week 4: Ruby Methods
- Cultural Week 5: Pairing and Giving Feedback
- Technical Week 5: Classes in Ruby
- Cultural Week 6: Stereotype Threat
- Technical Week 6: Classes vs. Modules
- Cultural Week 7: Affirmation and Stereotype Threat
- Technical Week 7: SQL databases vs. NoSQL databases


I make 2D and 3D games and simulations using Unity Engine with other tools,
Blender for making 2D and 3D graphics and animations,
Inkscape for 2D vectore based graphics,
Audacity for editing audio and
GIMP 2 for editing photos.
I made data minning scripts that gets data from the internet.
One can get around 1000 tweets from twitter and edite it to a spicific format in less than 4 minutes.
The other one I made it to get all arabic reviews on booking.com website and put it in a file with formating, I was able to collect half a million review each one has a positive review and a nigative one.


About Me
Hello!
I am a former hospitality professional and farmer turned fullstack javascript developer! I started my journey by taking the Northwestern coding boot camp. I am still an avid gardener and great cook, but these days I'm spending much more time in front of a computer!


Netflix's You season two set to be gorier and scarier than ever before
by Ciara WalshIs Joe up to his old tricks again?
Netflix have just released first look images from the upcoming second season of You.
In this new chapter, Joe leaves New York for LA as he runs from his long-lost ex-girlfriend Candace, but will he fall in love again after the death of his former flame?
The new season sees Joe running from his ex-girlfriend Candace who is hell-bent on getting revenge on the psychopathic bookstore owner.
Season one of the drama, based on Caroline Kepnes' 2014 book of the same name, follows Penn Badgley's Joe and his dogged obsession with a woman named Guienevere Beck, played by Elizabeth Lail.
Although the follow-up will see Joe move to LA in the hope of a fresh start and "fully intending to start over a new leaf", a brand new image from You's second season reveals that nothing much appears to have changed.
In Entertainment Weekly's exclusive look at season two, Joe can be seen watching a young woman doing her shopping - newcomer Victoria Pedretti's Love Quinn - from a distance.
You's showrunner Sera Gamble spoke to EW about Joe's relationship with Love, insisting that he is "a different guy" from the one viewers watched unravel in the first season.
"It's not that simple love-at-first-sight Joe might've been looking for a couple of years ago," Sera explained. "He's a different guy. He's been through more. The circumstances of his encounter with Love are very informed by what he went through with Beck."
While Joe might have learned a lesson over his pursuit of Beck, You is still going to be a bleak watch, with Sera Gamble recently singling out her favourite scene in an upcoming episode as something "gorier and scarier" than ever before.
"Joe is always trying to be a good guy but yet somehow he's finding himself in these thriller, horror kind of situations," she said. "It's terrible for him but I think it's going to be so much fun for the audience."
You season one is streaming now on Netflix. Season two will premiere on Stephens' Day, December 26.


To get started immediately, check out our Quickstart Guide for examples using our three available analysis pipelines. Also, watch out for the release of additional Knowledge-Guided Pipelines that are currently in development. For a more comprehensive set of resources, visit our Support page.
The knowledge-guided analyses use the KnowEnG Knowledge Network, which integrates many and varied public biological datasets of gene/protein interactions, relationships, and annotations. Explore information about the Knowledge Network and how it can be used in the KnowEnG platform pipelines here.
The KnowEnG YouTube Channel provides tutorials on how to set up, run and explore results for each pipeline. More videos are in development and will be added to the channel as they become available. Access to the tutorial videos is also available from our Support page.


--- layout: post title: Focus categories: - General tags: - distraction - focus - productivity status: publish type: post published: true meta: _edit_last: '1' _wpas_done_all: '1' gplus_authorship_disabled: '1' _wpas_skip_6000158: '1' _wpas_skip_6000169: '1' --- I’ve been working on focus. We live in a world of distractions and it’s way too easy to lose time to things that are in front of us instead of what’s a real priority. Smart devices have multiplied and so have their power to get our attention. Each notification is a clever pull for your attention. You have new messages, you have an appointment tomorrow, someone likes something. Sure it’s great to be informed, but it’s killing my focus. Why am I acting like each notification is a critical situation requiring my immediate and full attention? Instead of responding to a text/email/im/whatever, I should be considering its priority and dealing with it at the right time. If I immediately respond, I’m moving it to the top of my list. Is it more important than what I was doing? Sometimes it may be, but most of the time it’s just a distraction. I owe my friends/family/employer better focus. So, I’m striving to be disciplined instead of distracted. Related:


nic jansma | SOASTA | nicj.net | @nicj
Nic Jansma
SOASTA
Philip Tellis
SOASTA
SOASTA mPulse is a Real User Monitoring (RUM) tool for measuring page load performance
boomerang.js
from a CDN to our customers using
a script loader snippet they include in their HTMLboomerang.js
version (if they ask)<script>
nodes or async
IFRAME
(function(url){
// Section 1
var dom,doc,where,iframe = document.createElement('iframe');
iframe.src = "javascript:void(0)";
iframe.title = ""; iframe.role="presentation"; // a11y
(iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";
where = document.getElementsByTagName('script');
where = where[where.length - 1];
where.parentNode.insertBefore(iframe, where);
// Section 2
try {
doc = iframe.contentWindow.document;
} catch(e) {
dom = document.domain;
iframe.src="javascript:var d=document.open();d.domain='"+dom+"';void(0);";
doc = iframe.contentWindow.document;
}
doc.open()._l = function() {
var js = this.createElement("script");
if(dom) this.domain = dom;
js.id = "js-iframe-async";
js.src = url;
this.body.appendChild(js);
};
doc.write('<body onload="document._l();">');
doc.close();
})('http://some.site.com/script.js');
What happens when our customers think our third-party script is causing an issue on their site?
Aren't you supposed to be non-blocking?
Customer:
"Hi guys, So, I was running some WPT tests today and saw this… I thought that this was supposed to be non-blocking. If anyone sees this, they'll hang me up by my heels."
Screenshot #2 from our customer:
The customer shared their WebPageTest results URL, and we looked closer at the test pass
Out of the 9 runs, 2 showed what appeared to be boomerang.js blocking other downloads
Repro #1:
Repro #1 Larger view
Repro #2:
We looked at the 9 test runs, and found 3 more that had some sort of period where nothing happens
The tests show periods of time where the CPU is 100%, and bandwidth (bytes transferred) drops to 0 for 1-4 seconds.
Repro #1 and #2 show 100% CPU and no bandwidth for over a second:
Non-repros: boomerang.js loaded quickly, but two images appeared to "hang"
Non-repros: boomerang.js loaded much earlier, but other content appears to "hang"
Non-repros: Other content "hanging"
WebPageTest has many options for diving deeper
Gives a breakdown of main thread processing and timeline
libpcap
is a portable library for capturingtcpdump.org/manpages/tcpdump.1.html
tcpdump -nS
Higher-level analysis of tcpdump
Analyze PCAP (tcpdump) files in your browser
At this point, we downloaded the WebPageTest tcpdump files to dive deeper into the data
In all of the runs that showed a period of "no progress", we found zero network activity
(Repro #1)
We expect the OS network stack to continue TCP communications even if the browser was "blocked" on a script
(Repro #2)
The usefulness of Browser Dev Tools could be a talk on its own, but we'll give some highlights during our investigations
chrome://tracing
WebPageTest provides Chrome Traces
Repro #2:
Repro #2:
NetLog: Chrome’s network logging system
https://www.chromium.org/developers/design-documents/network-stack/netlog
{"params":{"load_flags":2163712,"method":"GET","priority":"LOWEST",
"url":"http://c.go-mpulse.net/boomerang/KQTS5-4NBTD-EYGLE-64UYR-S5892"},
"phase":1,"source":{"id":588,"type":1},"time":"5454412310","type":91},
{"phase":1,"source":{"id":588,"type":1},"time":"5454412310","type":93},
{"phase":2,"source":{"id":588,"type":1},"time":"5454412310","type":93},
{"phase":1,"source":{"id":588,"type":1},"time":"5454412310","type":101},
{"phase":2,"source":{"id":588,"type":1},"time":"5454412310","type":101},
{"phase":1,"source":{"id":588,"type":1},"time":"5454412310","type":102},
{"params":{"byte_count":1460},"phase":0,"source":{"id":275,"type":4},
"time":"5454412311","type":62},
{"phase":2,"source":{"id":529,"type":1},"time":"5454412311","type":143},
{"phase":1,"source":{"id":529,"type":1},"time":"5454412311","type":143},
{"params":{"byte_count":443},"phase":0,"source":{"id":275,"type":4},
"time":"5454412313","type":62},
{"phase":2,"source":{"id":529,"type":1},"time":"5454412313","type":143},
{"phase":1,"source":{"id":529,"type":1},"time":"5454412313","type":143},
{"phase":2,"source":{"id":275,"type":4},"time":"5454412313","type":37},
{"phase":2,"source":{"id":529,"type":1},"time":"5454412313","type":143},
It will be great to (re)prove that our script loader works even if our CDN is down, or if there are delays in the network
How can we do this? There are a couple tools that can help with Single Point of Failure (SPOF) testing
blackhole.webpagetest.org
drops all traffic
setDnsName c.go-mpulse.net blackhole.webpagetest.org
navigate our-customer.com
No issues with blocking our CDN c.go-mpulse.net
Let's try to do SPOF on our local machine as well
/etc/hosts
On Windows: C:\windows\system32\drivers\etc\hosts
blackhole.webpagetest.org == <IP_ADDRESS>
<IP_ADDRESS> apis.google.com
<IP_ADDRESS> www.google-analytics.com
<IP_ADDRESS> c.go-mpulse.net
Conclusion:
Conclusion:
/etc/hosts
, and FiddlerCustomer:
"I'm seeing pages that should match showing up in No Page Group again"
(No Page Group)
category that should have
matched a URLWe obviously work for SOASTA, and mPulse is our RUM product
RUM lets you view your real-world customer data from an aggregate level
What are the most common causes of (No Page Group)
?
iOS Mobile Safari sticks out:
RUM Waterfalls let you look at real-world individual page loads
One great use of Fiddler is to monitor external browser traffic without having Browser Dev Tools open (including mobile traffic!)
At this point, we sat with an iPad, reloading the home page hundreds of times to try to get a repro...
And tried...
And tried...
... an hour later, after trying many ways of loading the home page, we finally got a hit!
www.customer.com
in the address bar, but got a phone
call, so didn't hit Go
yetNow that we had a repro, we were able to narrow down the issue to a bug in Boomerang that didn't deal with pre-render state transitions properly.
The fix was pretty straightforward, but we needed to test it.
Fiddler allows you to inject your own content in place other live content on any host
We injected our fixed version into the customer' site, and validated that it worked
Conclusion:
Stop messing with my readyState
www.customer.com
and found that Boomerang wasn't reliably sending a Page Load beaconwindow.onload
and fire a beacon, but this wasn't happeningdocument.readyState == "loading"
even though window.onload
had firedwindow.pageshow
was firing before window.onload
-- window.onload
should be firstOur guess was that there was a script running on our customer's site that was messing with some of the document loading states, but had to prove it
One way is to fetch, unminify and analyze all of the site's JavaScript, but there are a couple easier ways if you want to use the Browser Dev Tools to work for you
We started out with a guess that something was changing window.onload
or
document.readyState
One way of modifying pre-existing DOM properties is via Object.defineProperty
Inject this in the page to find anyone using it:
Object.defineProperty = function(obj, prop, descriptor) {
debugger;
};
Chrome/IE/FF pretty-print (unminify) is the greatest thing
Chrome/IE/FF pretty-print (unminify) is the greatest thing
We also a similar change of document.readyState
Object.defineProperty(
document,
"readyState",
{
get:
function()
{
return document.someOtherReadyState;
}
});
Conclusion:
window.onload
and document.readyState
were intentional
by another third-party script for FEO optimizationPremature optimization is the root of all good intentions
We use NodeJS for many things at SOASTA:
Useful NodeJS NPM modules for command-line scripts:
jetty
: ANSI control sequencesfast-stats
: Statistical analysis of numeric datasetscli-table
: Tables for the command-linecommander
: Command-line argument parsingline-by-line
: Reads large files without buffering into memoryWe fetched gigabytes of dropped-beacon log files, and started doing some statistical analysis on the causes
We can break down the dropped-beacons data by dimensions to help guide us towards finding a repro:
NodeJS cli-table
output. By browser:
┌──────────────────────────────┬──────────┬──────────┐ │ URL │ Count │ % │ ├──────────────────────────────┼──────────┼──────────┤ │ IE/7.0 │ 1559 │ 66.65 │ ├──────────────────────────────┼──────────┼──────────┤ │ IE/9.0 │ 293 │ 12.53 │ ├──────────────────────────────┼──────────┼──────────┤ │ Safari/5.1.9 │ 283 │ 12.10 │ ├──────────────────────────────┼──────────┼──────────┤
NodeJS cli-table
output. By beacon type:
┌──────────────────────────────┬──────────┬──────────┐ │ URL │ Count │ % │ ├──────────────────────────────┼──────────┼──────────┤ │ xhr │ 2222 │ 95.00 │ ├──────────────────────────────┼──────────┼──────────┤ │ navigation │ 37 │ 1.58 │ ├──────────────────────────────┼──────────┼──────────┤ │ ... │ 7 │ 0.30 │ ├──────────────────────────────┼──────────┼──────────┤ │ Total │ 2339 │ 100 │ └──────────────────────────────┴──────────┴──────────┘
NodeJS cli-table
output. By URL:
┌───────────────────────────────────────┬──────────┬──────────┐ │ URL │ Count │ % │ ├───────────────────────────────────────┼──────────┼──────────┤ │ http://www.customer.com/api/foo │ 2187 │ 93.50 │ ├───────────────────────────────────────┼──────────┼──────────┤ │ http://www.customer.com/anotherurl │ 9 │ 0.38 │ ├───────────────────────────────────────┼──────────┼──────────┤
/api/foo
endpointWe sat our VirtualBox IE 9 browser on www.customer.com
for a while, watching XHRs
and beacons flow past
Both IE 9 Developer Tools and Fiddler showed something interesting:
IE 9 Developer Tools showing aborted requests to our injected <javascript>
that updates the token and timestamp:
Conclusion:
<javascript>
node that was fetching the updated CSRF token and timestamp<javascript>
node around
for a bit) via the same toolsThe many ways to send a beacon
... and the many ways to not send a beacon
We send the boomerang.js beacon to mPulse via several methods:
IMG
element with
a img.src
containing the payload in the query stringFORM
element and call form.submit()
on itWindows 10 and Edge had just been released, and a customer reported that their site was hanging in Edge on some pages, and that it no longer did when boomerang.js was removed from their site
We had tested Windows 10 Techincal Preview (the previous Edge build) thoroughly, but something in the final release was causing problems
Sure enough, loading customer.com
would hang Edge for up to
30 seconds.
Since the browser was hung, it was hard to use the Edge debugger
Time to dive into system-level tracing!
Available tracing:
Simple trace of system evenst:
xperf.exe -on latency -stackwalk profile
// [run scenario]
xperf.exe -stop -d myscenario.etl
Internet Explorer and Chrome both fire ETW events that you can overlay in the charts and see in the tables
Microsoft-IE events:
Microsoft-IEFRAME:
performance.mark("startTime1");
performance.mark("endTime1");
performance.mark("startTime2");
performance.mark("endTime2");
performance.measure("durationTime1", "startTime1", "endTime1");
performance.measure("durationTime2", "startTime2", "endTime2");
By using -stackwalk
on the command line, you can enable stacks on many events
Public symbol servers:
https://msdl.microsoft.com/download/symbols
http://symbols.mozilla.org/firefox
https://chromium-browser-symsrv.commondatastorage.googleapis.com/
More great tutorials on ETW, UIForETW, and xperf are available at: randomascii.wordpress.com
via Bruce Dawson @BruceDawson0xB
xperf -on latency -stackwalk profile
xperf -d repro.etl
The trace shows Edge spending nearly 100% CPU for over 70 seconds:
FORM
submission, was triggering this Edge hang200 OK
response, or204 No Content
response that was missing a Content-Length: 0
header.We were able to test different fixes across our test matrix (IE 6 - Edge, Chrome, Firefox, Safari, Mobile Safari, Android, Lynx, etc) using Fiddler


Lektion 2 Introduction to Bookdownplus
The R package bookdownplus
(???) is an extension of bookdown
(???). It is a collection of multiple templates on the basis of LaTeX, which are tailored so that I can work happily under the umbrella of bookdown
. bookdownplus
helps you write academic journal articles, guitar books, chemical equations, mails, calendars, and diaries.
2.1 Features
bookdownplus
extends the features of bookdown
, and simplifies the procedure. Users only have to choose a template, clarify the book title and author name, and then focus on writing the text. No need to struggle in YAML and LaTeX.
With bookdownplus
users can
record guitar chords,
write a mail in an elegant layout,
write a laboratory journal, or a personal diary,
draw a monthly or weekly or conference calendar,
and, of course, write academic articles in your favourite way,
with chemical molecular formulae and equations,
even in Chinese,
and more wonders will come soon.
Full documentation can be found in the book R bookdownplus Textbook. The webpage looks so-so, while the pdf file might give you a little surprise.
2.2 Quick start
Although this section might not be the latest version, the general idea won’t change. Please see R bookdownplus Textbook to keep up with the update.
2.2.1 Preparation
Before starting, you have to install R, RStudio, bookdown package, and other software and packages (i.e. Pandoc, LaTeX, rmarkdown, rticle, knitr, etc.) which bookdown depends on. See the official manual of bookdown for details. Additionally, if you want to produce a poster, phython must be installed before using, and the path of phython might have to be added to the environmental variables for Windows users.
2.2.2 Installation
install.package("bookdownplus")
# or
devtools::
install_github("pzhaonet/bookdownplus")
2.2.3 Generate demo files
Run the following codes, and you will get some files (e.g. index.Rmd
, body.Rmd
, bookdownplus.Rproj
) and folders in your working directory.
getwd() # this is your working directory. run setwd() to change it.
bookdownplus::bookdownplus()
2.2.4 Build a demo book
Now open bookdownplus.Rproj
with RStudio, and press ctrl+shift+b
to compile it. Your will get a book file named *.pdf
in _book/
folder.
2.2.5 Write your own
Write your own text in index.Rmd
and body.Rmd
, and build your own lovely book.
2.2.6 More outputs
By default, the book is in a pdf file. From ‘bookdownplus’ 1.0.3, users can get more output formats, including ‘word’, ‘html’ and ‘epub’. Run:
bookdownplus::
bookdownplus(template = 'article',
more_output = c('html', 'word', 'epub'))
2.2.7 Recommendations
I have been developing some other packages, which bring more features into ‘bookdown’, such as:
mindr (???), which can extract the outline of your book and turn it into a mind map, and
pinyin (???), which can automatically generate ‘{#ID}’ of the chapter headers even if there are Chinese characters in them.
Both of them have been released on CRAN and can be installed via:
install.packages('mindr')
install.packages('pinyin')
Enjoy your bookdowning!
2.2.8 Models
Eq. (2.1) is an equation.
\[\begin{equation} E = mc^2 \tag{2.1} \end{equation}\]It can be written as \(E = mc^2\).
2.3 Results
Fig. 2.1 psum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Tab. 2.1 psum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
| Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species |
|---|---|---|---|---|
| 5.1 | 3.5 | 1.4 | 0.2 | setosa |
| 4.9 | 3.0 | 1.4 | 0.2 | setosa |
| 4.7 | 3.2 | 1.3 | 0.2 | setosa |
| 4.6 | 3.1 | 1.5 | 0.2 | setosa |
| 5.0 | 3.6 | 1.4 | 0.2 | setosa |
| 5.4 | 3.9 | 1.7 | 0.4 | setosa |
| 4.6 | 3.4 | 1.4 | 0.3 | setosa |
| 5.0 | 3.4 | 1.5 | 0.2 | setosa |
| 4.4 | 2.9 | 1.4 | 0.2 | setosa |
| 4.9 | 3.1 | 1.5 | 0.1 | setosa |
| 5.4 | 3.7 | 1.5 | 0.2 | setosa |
| 4.8 | 3.4 | 1.6 | 0.2 | setosa |
| 4.8 | 3.0 | 1.4 | 0.1 | setosa |
| 4.3 | 3.0 | 1.1 | 0.1 | setosa |
| 5.8 | 4.0 | 1.2 | 0.2 | setosa |
| 5.7 | 4.4 | 1.5 | 0.4 | setosa |
| 5.4 | 3.9 | 1.3 | 0.4 | setosa |
| 5.1 | 3.5 | 1.4 | 0.3 | setosa |
| 5.7 | 3.8 | 1.7 | 0.3 | setosa |
| 5.1 | 3.8 | 1.5 | 0.3 | setosa |
2.4 Conclusions
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum


public class JoinCursor extends java.lang.Object implements ForwardCursor, java.io.Closeable
A join cursor is returned when calling Database.join
.
To open a join cursor using two secondary cursors:
Transaction txn = ... Database primaryDb = ... SecondaryDatabase secondaryDb1 = ... SecondaryDatabase secondaryDb2 = ...SecondaryCursor cursor1 = null; SecondaryCursor cursor2 = null; JoinCursor joinCursor = null; try { DatabaseEntry key = new DatabaseEntry(); DatabaseEntry data = new DatabaseEntry();
cursor1 = secondaryDb1.openSecondaryCursor(txn, null); cursor2 = secondaryDb2.openSecondaryCursor(txn, null);
key.setData(...); // initialize key for secondary index 1 OperationStatus status1 = cursor1.getSearchKey(key, data, LockMode.DEFAULT); key.setData(...); // initialize key for secondary index 2 OperationStatus status2 = cursor2.getSearchKey(key, data, LockMode.DEFAULT);
if (status1 == OperationStatus.SUCCESS && status2 == OperationStatus.SUCCESS) {
SecondaryCursor[] cursors = {cursor1, cursor2}; joinCursor = primaryDb.join(cursors, null);
while (true) { OperationStatus joinStatus = joinCursor.getNext(key, data, LockMode.DEFAULT); if (joinStatus == OperationStatus.SUCCESS) { // Do something with the key and data. } else { break; } } } } finally { if (cursor1 != null) { cursor1.close(); } if (cursor2 != null) { cursor2.close(); } if (joinCursor != null) { joinCursor.close(); } }
The join algorithm is described here so that its cost can be estimated and compared to other approaches for performing a query. Say that N cursors are provided for the join operation. According to the order they appear in the array the cursors are labeled C(1) through C(n), and the keys at each cursor position are labeled K(1) through K(n).
Cursor.getNextDup
operation on the secondary index. The primary key of a
candidate record is determined in this manner. The primary record itself is
not retrieved and the primary database is not accessed.Cursor.getSearchBoth
operation on the secondary index.
The primary record itself is not retrieved and the primary database is not
accessed.getNext
method. If the getNext(DatabaseEntry,DatabaseEntry,LockMode)
method signature is used,
then the primary database is read to obtain the record data, as if Cursor.getSearchKey
were called for the primary
database. If the getNext(DatabaseEntry,LockMode)
method signature
is used, then only the primary key is returned and the primary database is
not accessed.getNext
method will then return OperationStatus.NOTFOUND
.| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the cursors that have been opened by this join cursor.
|
OperationResult |
get(DatabaseEntry key,
DatabaseEntry data,
Get getType,
ReadOptions options)
Returns the next primary key and data resulting from the join operation.
|
JoinConfig |
getConfig()
Returns this object's configuration.
|
OperationStatus |
getCurrent(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
This operation is not allowed on a join cursor.
|
Database |
getDatabase()
Returns the primary database handle associated with this cursor.
|
OperationStatus |
getNext(DatabaseEntry key,
DatabaseEntry data,
LockMode lockMode)
Returns the next primary key and data resulting from the join operation.
|
OperationStatus |
getNext(DatabaseEntry key,
LockMode lockMode)
Returns the next primary key resulting from the join operation.
|
public void close() throws DatabaseException
The cursors passed to Database.join
are not
closed by this method, and should be closed by the caller.
WARNING: To guard against memory leaks, the application should discard all references to the closed handle. While BDB makes an effort to discard references from closed objects to the allocated memory for an environment, this behavior is not guaranteed. The safe course of action for an application is to discard all references to closed BDB objects.
close
in interface ForwardCursor
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.DatabaseException
public Database getDatabase()
getDatabase
in interface ForwardCursor
public JoinConfig getConfig()
public OperationResult get(DatabaseEntry key, DatabaseEntry data, Get getType, ReadOptions options)
get
in interface ForwardCursor
getType
- is Get.NEXT
.key
- the key returned as
output.data
- the data returned as
output.options
- the ReadOptions, or null to use default options.public OperationStatus getCurrent(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
UnsupportedOperationException
will always be thrown by this method.getCurrent
in interface ForwardCursor
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.KEYEMPTY
if the key/pair at the cursor position has
been deleted; otherwise, OperationStatus.SUCCESS
.public OperationStatus getNext(DatabaseEntry key, LockMode lockMode)
An entry is returned by the join cursor for each primary key/data
pair having all secondary key values that were specified using the array
of secondary cursors passed to Database.join
.
key
- the key returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.OperationFailureException
- if one of the Read Operation
Failures occurs.EnvironmentFailureException
- if an unexpected, internal or
environment-wide failure occurs.java.lang.IllegalStateException
- if the cursor or database has been closed,
or the non-transactional cursor was created in a different thread.java.lang.IllegalArgumentException
- if an invalid parameter is specified.public OperationStatus getNext(DatabaseEntry key, DatabaseEntry data, LockMode lockMode)
An entry is returned by the join cursor for each primary key/data
pair having all secondary key values that were specified using the array
of secondary cursors passed to Database.join
.
getNext
in interface ForwardCursor
key
- the key returned as
output.data
- the data returned as
output.lockMode
- the locking attributes; if null, default attributes are
used. LockMode.READ_COMMITTED
is not allowed.OperationStatus.NOTFOUND
if no matching key/data pair is found;
otherwise, OperationStatus.SUCCESS
.Copyright (c) 2002, 2017 Oracle and/or its affiliates. All rights reserved.


class Net::FTP::MLSxEntry
MLSxEntry represents an entry in responses of MLST/MLSD. Each entry has the facts (e.g., size, last modification time, etc.) and the pathname.
Attributes
Public Class Methods
# File lib/net/ftp.rb, line 930 def initialize(facts, pathname) @facts = facts @pathname = pathname end
Public Instance Methods
Returns true
if the APPE command may be applied to the file.
# File lib/net/ftp.rb, line 966 def appendable? return facts["perm"].include?(?a) end
Returns true
if files may be created in the directory by STOU,
STOR, APPE, and RNTO.
# File lib/net/ftp.rb, line 974 def creatable? return facts["perm"].include?(?c) end
Returns true
if the file or directory may be deleted by
DELE/RMD.
# File lib/net/ftp.rb, line 981 def deletable? return facts["perm"].include?(?d) end
Returns true
if the entry is a directory (i.e., the value of
the type fact is dir, cdir, or pdir).
# File lib/net/ftp.rb, line 955 def directory? if /\A[cp]?dir\z/.match(facts["type"]) return true else return false end end
Returns true
if the MKD command may be used to create a new
directory within the directory.
# File lib/net/ftp.rb, line 1011 def directory_makable? return facts["perm"].include?(?m) end
Returns true
if the directory may be entered by CWD/CDUP.
# File lib/net/ftp.rb, line 988 def enterable? return facts["perm"].include?(?e) end
Returns true
if the entry is a file (i.e., the value of the
type fact is file).
# File lib/net/ftp.rb, line 947 def file? return facts["type"] == "file" end
Returns true
if the listing commands, LIST, NLST, and MLSD are
applied to the directory.
# File lib/net/ftp.rb, line 1003 def listable? return facts["perm"].include?(?l) end
Returns true
if the objects in the directory may be deleted,
or the directory may be purged.
# File lib/net/ftp.rb, line 1019 def purgeable? return facts["perm"].include?(?p) end
Returns true
if the RETR command may be applied to the file.
# File lib/net/ftp.rb, line 1026 def readable? return facts["perm"].include?(?r) end
Returns true
if the file or directory may be renamed by RNFR.
# File lib/net/ftp.rb, line 995 def renamable? return facts["perm"].include?(?f) end
Returns true
if the STOR command may be applied to the file.
# File lib/net/ftp.rb, line 1033 def writable? return facts["perm"].include?(?w) end


Use spaces rather than tabs. |
Low |
StampNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
StampNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
InteractionCommandsNode.java |
12 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
InteractionCommandsNode.java |
13 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
InteractionCommandsNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
InteractionCommandsNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
InteractionCommandsNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
InteractionCommandsNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
13 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnClickNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
13 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnKeyNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
13 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OnMoveNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
AtanNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
CosNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
25 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
26 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
27 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
28 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
29 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
30 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
31 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
32 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
33 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
DifferenceNode.java |
34 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
LogNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MathOperationsNode.java |
11 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MathOperationsNode.java |
12 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MathOperationsNode.java |
13 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MathOperationsNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MathOperationsNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MathOperationsNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
MinusNode.java |
25 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OneChildMathOperationsNode.java |
11 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OneChildMathOperationsNode.java |
12 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OneChildMathOperationsNode.java |
13 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OneChildMathOperationsNode.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
OneChildMathOperationsNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
PowNode.java |
25 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
25 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
26 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
27 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
ProductNode.java |
28 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
27 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
28 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
29 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
30 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
31 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
32 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
33 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
34 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
35 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
36 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
37 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
38 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
39 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
41 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
42 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
43 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
44 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
45 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoNodeFactory.java |
46 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
14 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
15 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
26 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
39 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
40 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
41 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
42 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
43 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
44 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
45 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
46 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
SLogoPen.java |
47 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
18 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
25 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
26 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
27 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
28 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
29 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
30 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
31 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
32 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
33 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
35 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
43 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
44 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
45 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Turtle.java |
46 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
16 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
17 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
19 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
20 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
21 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
28 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
29 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
30 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
32 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
39 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
40 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
41 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
42 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
44 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
49 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
50 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
51 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
52 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
TurtleCollection.java |
53 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
31 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
32 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
33 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
34 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
36 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
37 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
38 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
39 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
41 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
49 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
50 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
51 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
52 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
53 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
54 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
55 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
57 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
63 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
64 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
View.java |
65 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
22 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
23 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
24 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
25 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
27 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
28 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
29 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
30 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
31 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
32 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
33 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
34 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
35 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
36 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
37 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
38 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
40 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
50 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
51 |
| Use of tab character after start of line |
Use spaces rather than tabs. |
Low |
Workspace.java |
52 |


Hello Dearest One I am writting this letter with due respect and heartful of tears since we have not known or met ourselves previously. I am asking for your assistance after I have gone through my search and find your contact eamil, I believe that you are capable to assiste me. I will be so glad if you can allow and lead me to the right channel towards your assistance to my situation now. I will make my proposal well known if I am given the opportunity. I would like to use this opportunity to introduce myself to you. I am Victoria Karegaye 22years old girl from Rwanda, and I know that this proposal might be a surprise to you but do consider it as an emmergency.In nutshell, My (late) father Dr.Michael Kagame Karegaye ,was the managing and director of( Royal Dimaond COMPANY) KIGALI the capital of Rwanda. But he was killed along side with my mother during the longing civil war and all his properties was totally destroyed. However, after their death I managed to escape with a very important document (DEPOSIT CERTIFICATE that he made on my Name, in a bank which I will tell you the amount when I recive your reply. Now I have formaly claim the money with all relevent Document filed by my father and after seriess of inquiry and investigation into my application the Bank approved my claim but due to the new international Banking monetary policy/laws does not allow a person with refugee status to operate Bank account and since I am on run/hidding for my Dear life. I have been advice to look for a trusth worthy foreign person/ contact who help me make this claim on my behalf.for this is reason I decided to contact you if you can make up your time and your mind to contact the Bank. I will furnish you will all the document about this transaction, and tell you more of the deatils when I hear from you. Thnaks for giveing out your time to read my proposal, as am waiting to hear from you. Have a gooday yours Victoria