I hereby claim:
- I am titanium-cranium on github.
- I am titaniumcranium (https://keybase.io/titaniumcranium) on keybase.
- I have a public key ASCNk17EHHaVmuOHQJR1vlktiMMVOWk7lgAjpdicv_rv4Qo
To claim this, I am signing this object:
| --- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
| --- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
| -- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
| ------------ | |
| -- Basics -- | |
| ------------ | |
| -- Get indexes of tables |
I hereby claim:
To claim this, I am signing this object:
| # This linked list reversal does not involve a stack, it simply | |
| #creates a new set of nodes that point the opposite direction. | |
| class LinkedListNode | |
| attr_accessor :value, :next_node | |
| def initialize(value, next_node=nil) | |
| @value = value | |
| @next_node = next_node | |
| end |
| def fib(n) | |
| return n if (0..1).include? n | |
| fib(n-1) + fib(n-2) if n > 1 | |
| end | |
| puts fib(7) |
| # linked_list reversal using a stack | |
| class LinkedListNode | |
| attr_accessor :value, :next_node | |
| def initialize(value, next_node = nil) | |
| @value = value | |
| @next_node = next_node | |
| end |
| def iter_fibonacci(num) | |
| if num == 0 | |
| puts "fib(#{num}) = 0" and return | |
| elsif num == 1 | |
| puts "fib(#{num}) = 1" and return | |
| else | |
| series = [0,1] | |
| i = 2 | |
| while i <= num | |
| result = series[i-2] + series[i-1] |
| class BTreeNode | |
| attr_accessor :payload, :left, :right | |
| def initialize(payload, left=nil, right=nil) | |
| @payload = payload | |
| @left = left | |
| @right = right | |
| end | |
| end |
| var Hello = React.createClass({ | |
| render: function(){ | |
| return ( | |
| <div> | |
| <p>Hello {this.props.name}</p> | |
| </div> | |
| ) | |
| } | |
| }); |