Skip to content

Instantly share code, notes, and snippets.

[
{
"Plan": {
"Node Type": "Limit",
"Parallel Aware": false,
"Startup Cost": 91141.8,
"Total Cost": 91141.82,
"Plan Rows": 1,
"Plan Width": 514,
"Actual Startup Time": 167641.939,
QUERY PLAN
Limit (cost=91129.81..91129.83 rows=1 width=514) (actual time=147833.015..147833.110 rows=16 loops=1)
-> Unique (cost=91129.81..91129.82 rows=1 width=514) (actual time=147833.015..147833.110 rows=16 loops=1)
-> Sort (cost=91129.81..91129.82 rows=1 width=514) (actual time=147833.014..147833.066 rows=237 loops=1)
Sort Key: template_set_versions.created_at DESC, ts.id DESC
Sort Method: quicksort Memory: 451kB
-> Nested Loop (cost=24413.59..91129.80 rows=1 width=514) (actual time=573.884..147831.945 rows=237 loops=1)
-> Nested Loop (cost=24413.17..91129.36 rows=1 width=530) (actual time=573.862..147828.139 rows=237 loops=1)
Join Filter: (SubPlan 1)
Rows Removed by Join Filter: 249
SELECT *
FROM (
SELECT DISTINCT ON (tsv.created_at,tsv.id,ts.id) ts.id, ts.team_id, ts.archived_at, ts.type, ts.created_at, ts.updated_at,tsv.id, tsv.version, tsv.public_version, tsv.title, tsv.description, tsv.status, tsv.author_id, tsv.templates, tsv.created_at, tsv.updated_at, tsv.published_version, tsv.attributes, tsv.original_author_id
FROM template_sets ts
INNER JOIN (
SELECT DISTINCT ON (id) id, version, public_version, title, description, status, author_id, templates, created_at, updated_at, published_version, attributes, original_author_id
FROM template_set_versions
ORDER BY id DESC, version DESC
) tsv

How many passwords combinations can we find of length 3?

*    *    *

*    *    *

*    *    *

Jira ticket link

https://parsable.atlassian.net/browse/PA-17168

Problem

It appears as if at one point (Aug 21 2018) a step had a description with four elements. But later on (Aug 22 2018) three of the elements had disappeared without a trace.

Details

@sheac
sheac / a-b-c-f.png
Last active May 22, 2019 17:45
Dependency Resolver
a-b-c-f.png

Questions for Kepware, and Their Answers

How long is data retained for in kepware?

Data is not "retained" in Kepware in any sense we care about.

Data can be modeled like this:

  • We can think of each device as having a set of "memory registers" for things like, last-max-torque, is-disabled, battery-level, etc
  • Kepware ensures a correspondence between the values in those device registers and "local" values stored on the Kepware server

Let's design a URL-shortener service

Requirements:

  • Accepts a long URL string
  • Quickly returns a URL that is:
    • Short
    • Unique
  • Redirects from resulting shortened URLs to corresponding long URL input
  • Has "sane" expiration policy (for negotiable definition of "sane")

Notes from August 20 2018 meeting with Kepware

Attendees

  • Shea
  • Sam
  • Brent (Kep)
  • Nick (Kep

Kepware's IoT Gateway REST Server does not store data in a historical or time-series fashion