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
| // queryParams = { | |
| // max: this.limitHelper_.getMaxServers(), | |
| // region: this.getSelectedProvider_().getName() | |
| // }; | |
| ck.urls.tickets.requestServerLimitIncrease = function (queryParams) { | |
| additionalQueryParams = { 'templateId': 'serverLimitIncrease', 'accountId': ck.UserAccount.accountId() }; | |
| return goog.string.subs( | |
| '%s?%s', | |
| ck.urls.tickets.create(), | |
| ck.urls.tickets.getQueryString(queryParams, additionalQueryParams) |
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
| class AutoCreatorJobFileParser | |
| def initialize(base_path = 'tools/autocreator') | |
| # default base_path is relative path from qetest/pinot/spec/Rakefile | |
| @full_path = "#{base_path}/jobsData/acceptance" | |
| end | |
| def get_acceptance_tests | |
| rake_tasks = [] | |
| get_acc_tests_from_files_in_path @full_path, rake_tasks | |
| rake_tasks.compact |
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
| { | |
| "ticket":{ | |
| "category":{ | |
| "id":"10", | |
| "name":"Cloud Databases", | |
| "sub-category":{ | |
| "id":"33", | |
| "name":"General Support" | |
| } | |
| }, |
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
| { | |
| "ticket":{ | |
| "category":{ | |
| "id":"ord-0000026", | |
| "name":"Fanatical Support for AWS", | |
| "sub-category":{ | |
| "id":"ord-0000083", | |
| "name":"General" | |
| } | |
| }, |
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 whoGoes | |
| wantsToGo = [ 'Bill', 'Hannah', 'Josh', 'Kevin', 'Nathan', 'Robert' ] | |
| wantsToGo.shuffle.shuffle.shuffle.shuffle.shuffle.shuffle.pop(4) | |
| end | |
| def revealWhoGoes | |
| going = whoGoes | |
| puts "" | |
| puts "And the randomly selected attendees of the CONNECT.CONF in September are..." | |
| puts "" |
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
| # foreman ports 5000, 5100, 5200, 5300, 5400, 5500 | |
| ps aux | grep node | grep -v "grep" | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9 | |
| ps aux | grep plovr | grep -v "grep" | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9 | |
| ps aux | grep grunt | grep -v "grep" | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9 | |
| ps aux | grep HTTPServer | grep -v "grep" | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9 |
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
| class BinarySearch | |
| def has_num?(num, array) | |
| num_index(num, array) != nil ? true : false | |
| end | |
| def num_index(num, array) | |
| hi = array.length - 1 | |
| lo = 0 | |
| while lo <= hi |
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
| class WeightedQuickUnionUF | |
| def initialize(n) | |
| @n = n | |
| @num_to_id = Hash[((1..n).to_a).zip((1..n).to_a)] | |
| @size = Hash[((1..n).to_a).zip((1..n).to_a)] | |
| end | |
| def root(x) | |
| while x != @num_to_id[x] |
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
| class QuickUnion | |
| def initialize(n) | |
| @n = n | |
| @num_to_id = Hash[((1..n).to_a).zip((1..n).to_a)] | |
| end | |
| def root(x) | |
| x = @num_to_id[x] while x != @num_to_id[x] # chase root of x to parent root | |
| return x |
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
| class QuickFind | |
| def initialize(n) | |
| @n = n | |
| @num_to_id = Hash[((1..n).to_a).zip((1..n).to_a)] | |
| end | |
| def union(x,y) | |
| xid = @num_to_id[x] | |
| yid = @num_to_id[y] |
NewerOlder