This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24322,"tid":0,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24291,"tid":775,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24291,"tid":35075,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":88158,"tid":775,"ts":0}, | |
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":88143,"tid":18691,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":88140,"tid":775,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":88143,"tid":775,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24322,"tid":85251,"ts":0}, | |
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24322,"tid":7 |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"args":{"name":"swapper"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24352,"tid":0,"ts":0}, | |
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24291,"tid":775,"ts":0}, | |
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24291,"tid":35075,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24352,"tid":775,"ts":0}, | |
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":36618,"tid":775,"ts":0}, | |
{"args":{"name":"ThreadPoolServiceThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24291,"tid":38667,"ts":0}, | |
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24322,"tid":775,"ts":0}, | |
{"args":{"name":"VizCompositorThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":24322,"tid":85251,"ts":0}, | |
{"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":36618,"tid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ContextValueType<T extends React.Context<unknown>[]> = | |
| { | |
[K in keyof T]: T[K] extends React.Context<infer U> ? U : never; | |
} | |
| []; | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
function consumerWrapper<T extends React.Context<any>[]>(...contexts: T) { | |
return ({ | |
children, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resolve = require('../resolve'); | |
const Benchmark = require('benchmark'); | |
const suite = new Benchmark.Suite; | |
suite.add('uncached', () => { | |
delete process.env.CACHE; | |
resolve.sync('./frontend/homes-pdp-marketplace/components/Policies.jsx'); | |
}); | |
suite.add('cached', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resolve = require('../resolve'); | |
var performance = require('perf_hooks').performance; | |
for(var i = 0; i < 10000; i++) { | |
resolve.sync('./frontend/homes-pdp-marketplace/components/Policies.jsx'); | |
} | |
console.log(performance.getEntriesByName('parsePkg').reduce((sum, e) => sum + e.duration, 0)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<listing xmlns="http://www.airbnb.com/schemas/airbnb-listing/v1" schemaVersion="1.0"> | |
<lastUpdated>2017-11-13T02:43:18Z</lastUpdated> | |
<published>true</published> | |
<basicDetails> | |
<bathrooms>3</bathrooms> | |
<bedrooms>4</bedrooms> | |
<propertyType>house</propertyType> | |
<listingType>entire_home</listingType> | |
<amenities> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function extractOrientation(imgBlob) { | |
// written based on https://www.media.mit.edu/pia/Research/deepview/exif.html | |
// the exif orientation values are pretty nonsensical. | |
const orientationValueToRotateDegrees = { | |
1: 0, | |
3: 180, | |
6: 90, | |
8: 270, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autovivifying = proc {|x| proc { Hash.new {|h,k| h[k] = x.call(x).call } } }.call(proc {|x| proc { Hash.new {|h,k| h[k] = x.call(x).call } } }).call | |
[53] pry(main)> autovivifying[:foo] | |
=> {} | |
[54] pry(main)> autovivifying[:foo][:bar] | |
=> {} | |
[55] pry(main)> autovivifying[:foo][:bar][:baz] | |
=> {} | |
[56] pry(main)> autovivifying | |
=> {:foo=>{:bar=>{:baz=>{}}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb | |
index c6e8762..56985fa 100644 | |
--- a/activerecord/lib/active_record/relation/finder_methods.rb | |
+++ b/activerecord/lib/active_record/relation/finder_methods.rb | |
@@ -226,16 +226,42 @@ module ActiveRecord | |
end | |
def apply_join_dependency(relation, join_dependency) | |
- join_dependency.join_associations.each do |association| | |
- relation = association.join_relation(relation) |