- URL: https://completion.amazon.com/api/2017/
- Resource: suggestions
- Paramters:
- session-id: 133-2190809-5709766
- customer-id: A1CNYR04B8CZOZ
- request-id: NTH41W0H5GYC8N00NVCS
- page-type: Gateway
- lop=en_US
- site-variant=desktop
- client-info=amazon-search-ui
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
| package org.example | |
| import kotlin.math.max | |
| fun main() { | |
| val string = "abcaabgfhdbchfythgjgtuitijgjghjfhhdnnslphopoootkjjajhaabxvcgftyyihkjonpm" | |
| val result = findLongestSubstring(string) | |
| println("result: $result") | |
| println("asserted: ${(result == 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
| package org.example | |
| data class ListNode(var value: Int, var next: ListNode? = null) | |
| // [val, next] -> [val, next] -> null | |
| fun main() { | |
| val head = buildLinkedList() | |
| printListNodes(head) |
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
| // input..: [1,6,10] | |
| // target.: 16 | |
| // output.: [1,2] | |
| fun main() { | |
| val array = arrayOf(1, 6, 10) | |
| val target = 16 | |
| val result = twoInt(array, target) | |
| assert(result == Pair(1,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
| version: "2.1" | |
| services: | |
| rabbit1: | |
| image: "rabbitmq:3-management-alpine" | |
| mem_limit: 2g | |
| memswap_limit: 2g | |
| mem_swappiness: 0 | |
| restart: unless-stopped | |
| ports: | |
| - "15672:15672" |
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
| # Spring | |
| spring: | |
| cloud: | |
| stream: | |
| default: | |
| contentType: application/json | |
| bindings: | |
| input: | |
| destination: pollerIn-process | |
| group: group |
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 the file: | |
| sudo vim /usr/share/applications/intellij.desktop | |
| // add the following entry | |
| [Desktop Entry] | |
| Version=2018.1.1 | |
| Type=Application | |
| Terminal=false | |
| Icon[en_US]=/opt/idea/idea-IC-181.4203.550/bin/idea.png | |
| Name[en_US]=IntelliJ |
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
| version: '2.1' | |
| services: | |
| master: | |
| image: redis:3.2-alpine | |
| command: ["redis-server","/usr/local/etc/redis/redis.conf"] | |
| sysctls: | |
| net.core.somaxconn: '1024' | |
| mem_limit: 8g | |
| memswap_limit: 8g |
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
| if (!doc['request.keyword'].empty) { | |
| def m = /\/api\/(.*[-\/]v[0-9])\/.*/.matcher(doc['request.keyword'].value); | |
| if (m.matches()) { | |
| return m.group(1) | |
| } | |
| } | |
| return "" |
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 Solution { | |
| public int[] twoSum(int[] nums, int target) { | |
| int n = nums.length; | |
| int [][] arr = new int[n][2]; | |
| for (int i=0; i < n; i++) { | |
| arr[i][0] = nums[i]; | |
| arr[i][1] = i; | |
| } |
NewerOlder