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" encoding="UTF-8"?> | |
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> | |
<S:Header> | |
<trackingMessageHeader xmlns="http://www.af-klm.com/soa/xsd/MessageHeader-V1_0"> | |
<consumerRef> | |
<userID/> | |
<partyID>unidentified</partyID> | |
<consumerID>unidentified</consumerID> | |
<consumerLocation>unidentified</consumerLocation> | |
<consumerType>unidentified</consumerType> |
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
do $$ | |
declare | |
row_count integer := 449166; | |
batch_size integer := 1000; | |
offset_value integer := 0; | |
begin | |
while row_count > 0 loop | |
update | |
my_table |
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
def recursively_split_dates(start_date, end_date, dates_array, num_days_to_add) | |
if start_date >= end_date | |
last_date = dates_array.pop | |
dates_array << { start_date: last_date[:start_date], end_date: end_date } | |
else | |
start_date += num_days_to_add | |
dates_array << { start_date: dates_array.last[:end_date] + 1.day, |
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
{ | |
"_json": [ | |
{ | |
"email": "[email protected]", | |
"timestamp": 1475218536, | |
"smtp-id": "<14c5d75ce93.dfd.64b469@ismtpd-555>", | |
"event": "processed", | |
"category": "cat facts", | |
"sg_event_id": "djCl3GRt94fqCWtHYHUIJQ==", | |
"sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.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
def group_by_common_chars(strings_array) | |
max_length = strings_array.max_by(&:length).length | |
char_grouped_hash = (0..max_length).each_with_object({}) do |index, hash| | |
hash.merge!(strings_array.group_by { |string| string[0..index] }.select{|k, v| k.length == index + 1}) | |
end | |
index = 0 | |
result_hash = {} | |
char_grouped_hash.each do |key, values_array| | |
index += 1 |