This file contains hidden or 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
Vector<int> my_array = new Vector<int>; | |
my_array.add(1); | |
my_array.add(2); | |
for (int i = 0; i < my_array.length(); i++){ | |
} | |
foreach(int i in my_array) { |
This file contains hidden or 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
L | |
9.5.10 | |
listen_addresses = 'localhost' | |
listen_addresses = '*' | |
max_connections = 100 | |
max_connections = 200 | |
shared_buffers = 128MB | |
shared_buffers = 16GB |
This file contains hidden or 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
Process: rubymine [30235] | |
Path: /Applications/RubyMine.app/Contents/MacOS/rubymine | |
Identifier: com.jetbrains.rubymine | |
Version: 2017.3.3 (RM-173.4548.40) | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: rubymine [30235] | |
User ID: 501 | |
Date/Time: 2018-03-13 13:37:48.696 -0400 |
This file contains hidden or 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
$ cargo build --verbose | |
Fresh lazy_static v0.1.16 | |
Fresh utf8-ranges v0.1.3 | |
Fresh num-traits v0.1.42 | |
Fresh unicode-xid v0.0.4 | |
Fresh unicode-segmentation v1.2.0 | |
Fresh regex-syntax v0.3.9 | |
Fresh winapi-build v0.1.1 | |
Fresh getopts v0.2.17 | |
Fresh void v1.0.2 |
This file contains hidden or 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
Process: rubymine [9344] | |
Path: /Applications/RubyMine.app/Contents/MacOS/rubymine | |
Identifier: com.jetbrains.rubymine | |
Version: 2017.3.2 (RM-173.4301.17) | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: rubymine [9344] | |
User ID: 501 | |
Date/Time: 2018-02-03 15:26:40.835 -0500 |
This file contains hidden or 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
#Create User with Role and Password | |
CREATE USER postgres WITH PASSWORD 'password' CREATEDB CREATEROLE SUPERUSER; |
This file contains hidden or 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
Process: rubymine [14719] | |
Path: /Applications/RubyMine.app/Contents/MacOS/rubymine | |
Identifier: com.jetbrains.rubymine | |
Version: 2017.3.2 (RM-173.4301.17) | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [1] | |
Responsible: rubymine [14719] | |
User ID: 501 | |
Date/Time: 2018-01-26 20:47:56.271 -0500 |
This file contains hidden or 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
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/ransack-d8ab32f813a0/lib/ransack/helpers/form_builder.rb:9:in `value' | |
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/rails-634dbfcd6f4c/actionview/lib/action_view/helpers/tags/base.rb:53:in `value_before_type_cast' | |
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/rails-634dbfcd6f4c/actionview/lib/action_view/helpers/tags/text_field.rb:15:in `block in render' | |
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/rails-634dbfcd6f4c/actionview/lib/action_view/helpers/tags/text_field.rb:15:in `fetch' | |
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/rails-634dbfcd6f4c/actionview/lib/action_view/helpers/tags/text_field.rb:15:in `render' | |
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/rails-634dbfcd6f4c/actionview/lib/action_view/helpers/form_helper.rb:1502:in `email_field' | |
/Users/cj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/bundler/gems/rails-634dbfcd6f4c/actionview/lib/act |
This file contains hidden or 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
iex(49)> MyRewards.Merchants.new_merchant_transactions(1,60) | |
[debug] QUERY OK source="my_rewards_transactions" db=2.6ms decode=0.2ms | |
SELECT m0."id", m0."amount", m0."type", m0."reference_number", m0."user_id", m0."merchant_id", m0."reward_id", m0."inserted_at", m0."updated_at" FROM "my_rewards_transactions" AS m0 INNER JOIN (SELECT m0."id" AS "id", COUNT(*) OVER (PARTITION BY m0."user_id") AS "count" FROM "my_rewards_transactions" AS m0 WHERE (m0."merchant_id" = $1)) AS s1 ON s1."id" = m0."id" WHERE (s1."count" > 1) [1] | |
** (Protocol.UndefinedError) protocol Ecto.Queryable not implemented for [%MyRewards.Transaction{__meta__: #Ecto.Schema.Metadata<:loaded, "my_rewards_transactions">, amount: %Money{amount: 300, currency: :USD}, id: 1, inserted_at: ~N[2017-03-09 16:48:34.514414], merchant: #Ecto.Association.NotLoaded<association :merchant is not loaded>, merchant_id: 1, reference_number: nil, reward: #Ecto.Association.NotLoaded<association :reward is not loaded>, reward_id: nil, type: "debit", updated_at: ~N[ |
This file contains hidden or 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
def try_async(files, num_process) do | |
files | |
|> Enum.chunk_every(round(length(files)/num_process)) | |
|> Enum.each(fn(x) -> load_async(x, 3) end) | |
end | |
#Break that chunk into a few tasks to run parallel | |
def load_async(files, chunk_by) do | |
files | |
|> Enum.chunk_every(chunk_by) |